1 #ifndef SDMDataObjectReader_CLASS
2 #define SDMDataObjectReader_CLASS
43 #include <boost/regex.hpp>
62 namespace asdmbinaries {
100 return "SDMDataObjectReaderException : " +
message;
181 std::string::size_type
find(
const std::string& s);
182 bool compare(
const std::string& s);
190 #ifndef WITHOUT_BOOST
209 void tokenize(
const std::string& str, std::vector<std::string>& tokens,
const std::string& delimiters);
210 void getFields(
const std::string& header, std::map<std::string, std::string>& fields);
247 #endif // SDMDataObjectReader_CLASS
unsigned long int nZeroLags_
std::string::size_type position_
SDMDataObject:: declarations.
const AUTODATATYPE * autoData_
void processBinaryAttachment(const std::string &boundary, const SDMDataSubset &sdmDataSubset)
static const boost::regex CONTENTIDDATASTRUCTUREREGEXP
Regular expressions used to identify a Content-ID field in a MIME header.
const ACTUALDURATIONSTYPE * actualDurations_
float FLOATCROSSDATATYPE
Type of cross data when those are encoded as 32bits float.
void processMIMEIntegration()
static const boost::regex CONTENTIDBINREGEXP1
int16_t SHORTCROSSDATATYPE
Type of cross data when those are encoded as 16bits unsigned integers.
const SDMDataObject & ref() const
This method returns a reference to the SDMDataObject instance built during the execution of the read ...
unsigned long int nAutoData_
static const boost::regex CONTENTIDBINREGEXP2
static const bool initClass_
std::bitset< 6 > attachmentFlags
void getFields(const std::string &header, std::map< std::string, std::string > &fields)
SDMDataObjectParser parser_
SDMDataObject related stuff.
const ACTUALTIMESTYPE * actualTimes_
static std::set< std::string > BINATTACHNAMES
Set of valid binary attachment names.
static std::map< std::string, BINATTACHCODES > name2code
const SDMDataObject * ptr() const
This method returns a pointer to the SDMDataObject instance built during the execution of the read me...
float AUTODATATYPE
Type of auto data.
const SHORTCROSSDATATYPE * shortCrossData_
SDMDataObjectReaderException()
An empty contructor.
std::string::size_type lastPosition_
int64_t ACTUALTIMESTYPE
Type of actual times.
const INTCROSSDATATYPE * longCrossData_
const SDMDataObject & sdmDataObject()
void processMIMEIntegrations()
int32_t INTCROSSDATATYPE
Type of cross data when those are encoded as 32bits unsigned integers.
std::string getMessage() const
Returns the message associated to this exception.
static const std::string MIMEBOUNDARY_2
unsigned long int nActualTimes_
std::string getContentLocation()
virtual ~SDMDataObjectReader()
The destructor.
static const boost::regex CONTENTIDBINREGEXP
unsigned long int nActualDurations_
void processMIMESDMDataHeader()
static const boost::regex CONTENTIDSUBSETREGEXP
unsigned long int nFlags_
uint32_t FLAGSTYPE
Type of flags.
void done()
A method to release the resources allocated by the read operation.
SDMDataObjectReader()
An empty constructor.
virtual ~SDMDataObjectReaderException()
The destructor.
A class to represent an exception thrown while reading a MIME message containing ALMA binary data...
bool compare(const std::string &s)
const SDMDataObject & read(std::string filename)
This method reads a MIME message contained in a disk file and returns a reference to an SDMDataObject...
std::string::size_type find(const std::string &s)
A class to read a MIME message containing ALMA binary data and provide a view on these binary data th...
unsigned int integrationNum_
TableExprNode regex(const TableExprNode &node)
Functions for regular expression matching and pattern matching.
unsigned long int nCrossData_
std::string extractXMLHeader(const std::string &boundary)
float ZEROLAGSTYPE
Type of zero lags.
const FLOATCROSSDATATYPE * floatCrossData_
std::string getContentID()
const ZEROLAGSTYPE * zeroLags_
void tokenize(const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters)
void processMIMESDMDataSubsetHeader(SDMDataSubset &sdmDataSubset)
static const std::string MIMEBOUNDARY_1
Two strings used as MIME boundaries.
void processMIMESubscan()
std::string::size_type endPosition_
int64_t ACTUALDURATIONSTYPE
Type of actual durations.
SDMDataObject sdmDataObject_