My Project
OSrLReader.cpp
Go to the documentation of this file.
1/* $Id$ */
17#include "OSrLReader.h"
18#include "OSOutput.h"
19
20
21
22
23void yygetOSResult( const char *ch, OSResult* m_osresult, OSrLParserData *m_parserData, OSgLParserData *osglData, OSnLParserData *osnlData);
24int osrllex_init(void** ptr_yy_globals);
25int osrllex_destroy (void* scanner );
26void osrlset_extra (OSrLParserData* parserData , void* yyscanner );
27
28
30{
31#ifndef NDEBUG
32 osoutput->OSPrint(ENUM_OUTPUT_AREA_OSrL_parser, ENUM_OUTPUT_LEVEL_trace, "new OSrLParserData()");
33#endif
35#ifndef NDEBUG
36 osoutput->OSPrint(ENUM_OUTPUT_AREA_OSrL_parser, ENUM_OUTPUT_LEVEL_trace, "new OSgLParserData()");
37#endif
39#ifndef NDEBUG
40 osoutput->OSPrint(ENUM_OUTPUT_AREA_OSrL_parser, ENUM_OUTPUT_LEVEL_trace, "new OSnLParserData()");
41#endif
43#ifndef NDEBUG
45#endif
46 m_osresult = new OSResult();
47 // initialize the lexer and set yyextra
48#ifndef NDEBUG
49 osoutput->OSPrint(ENUM_OUTPUT_AREA_OSrL_parser, ENUM_OUTPUT_LEVEL_trace, "initialize the lexer");
50#endif
53#ifndef NDEBUG
55#endif
56}
57
59{
60 // delete the osresult object
61#ifndef NDEBUG
63#endif
64 if(m_osresult != NULL) delete m_osresult;
65 m_osresult = NULL;
66
67 // now delete the scanner that was initialized
68#ifndef NDEBUG
70#endif
72
73 // finally delete parser data
74#ifndef NDEBUG
75 osoutput->OSPrint(ENUM_OUTPUT_AREA_OSrL_parser, ENUM_OUTPUT_LEVEL_trace, "delete parser data");
76#endif
77 if( m_parserData != NULL) delete m_parserData;
78 m_parserData = NULL;
79
80#ifndef NDEBUG
82#endif
83 if( m_osglData != NULL) delete m_osglData;
84 m_osglData = NULL;
85
86#ifndef NDEBUG
88#endif
89 if( m_osnlData != NULL) delete m_osnlData;
90 m_osnlData = NULL;
91
92#ifndef NDEBUG
94#endif
95}
96
97OSResult* OSrLReader::readOSrL(const std::string& posrl)
98{
99 if (posrl.length() > 0)
100 {
101 const char *ch = posrl.c_str();
103 }
104 return m_osresult;
105}
const OSSmartPtr< OSOutput > osoutput
Definition OSOutput.cpp:39
#define scanner
OSgLParserData * osglData
OSnLParserData * osnlData
OSoLParserData * parserData
void yygetOSResult(const char *ch, OSResult *m_osresult, OSrLParserData *m_parserData, OSgLParserData *osglData, OSnLParserData *osnlData)
int osrllex_init(void **ptr_yy_globals)
int osrllex_destroy(void *scanner)
void osrlset_extra(OSrLParserData *parserData, void *yyscanner)
The Result Class.
Definition OSResult.h:2549
The OSgLParserData Class.
The OSnLParserData Class.
The OSrLParserData Class.
void * scanner
scanner is used to store data in a reentrant lexer we use this to pass an OSrLParserData object to th...
~OSrLReader()
OSrL class destructor.
OSResult * readOSrL(const std::string &posrl)
Get an OSResult object from an OSrL string.
OSrLReader()
OSrL class constructor.
OSResult * m_osresult
m_osresult is the OSResult object returned by the OSrLReader
Definition OSrLReader.h:73
OSgLParserData * m_osglData
m_osglData is the object used in the parser to temporarily store data from the OSgL schema elements.
Definition OSrLReader.h:83
OSnLParserData * m_osnlData
m_osnlData is the object used in the parser to temporarily store data from the OSnL schema elements.
Definition OSrLReader.h:88
OSrLParserData * m_parserData
m_parserData is the object used in the parser to temporarily store data from the OSrL schema elements...
Definition OSrLReader.h:78
@ ENUM_OUTPUT_LEVEL_trace
@ ENUM_OUTPUT_AREA_OSrL_parser