![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
PDMS Lexer. More...
#include <PdmsParser.h>


Public Member Functions | |
| PdmsLexer () | |
| virtual | ~PdmsLexer () |
| virtual bool | initializeSession () |
| bool | gotoNextToken () |
| void | finish () |
| virtual void | closeSession (bool destroyLoadedObject=false) |
| PointCoordinateType | valueFromBuffer () |
| const char * | nameFromBuffer () const |
| virtual void | printWarning (const char *str)=0 |
| Token | getCurrentToken () const |
| PdmsObjects::GenericItem * | getLoadedObject () const |
| const char * | getBufferContent () const |
| void | setLoadedObject (PdmsObjects::GenericItem *o) |
Protected Member Functions | |
| void | pushIntoDictionary (const char *str, Token token, int minSize=0) |
| virtual void | parseCurrentToken () |
| virtual void | skipComment ()=0 |
| virtual void | skipHandleCommand ()=0 |
| virtual bool | moveForward () |
Protected Attributes | |
| PdmsObjects::GenericItem * | loadedObject |
| Token | currentToken |
| char | tokenBuffer [c_max_buff_size] |
| char | nextBuffer [c_max_buff_size] |
| std::map< std::string, Token > | dictionary |
| bool | stop |
| char | metaGroupMask |
Static Protected Attributes | |
| static const int | c_max_buff_size = 2048 |
PDMS Lexer.
PDMS sessions are made to provide an input stream to the parser (file, keyboard, pipe, ...)
Definition at line 22 of file PdmsParser.h.
| PdmsLexer::PdmsLexer | ( | ) |
Definition at line 29 of file PdmsParser.cpp.
References nextBuffer, and tokenBuffer.
|
inlinevirtual |
Definition at line 25 of file PdmsParser.h.
|
virtual |
Reimplemented in PdmsFileSession.
Definition at line 117 of file PdmsParser.cpp.
References dictionary, and loadedObject.
Referenced by PdmsFileSession::closeSession(), and PdmsParser::parseSessionContent().
|
inline |
Definition at line 29 of file PdmsParser.h.
Referenced by PdmsParser::processCurrentToken().
|
inline |
Definition at line 39 of file PdmsParser.h.
|
inline |
Definition at line 37 of file PdmsParser.h.
Referenced by PdmsParser::processCurrentToken().
|
inline |
Definition at line 38 of file PdmsParser.h.
Referenced by PdmsParser::getLoadedObject().
| bool PdmsLexer::gotoNextToken | ( | ) |
Definition at line 124 of file PdmsParser.cpp.
References currentToken, metaGroupMask, moveForward(), parseCurrentToken(), PdmsTools::PDMS_COMMENT_BLOCK, PdmsTools::PDMS_COMMENT_LINE, PdmsTools::PDMS_CREATE, PdmsTools::PDMS_END, PdmsTools::PDMS_ENTER_METAGROUP, PdmsTools::PDMS_EOS, PdmsTools::PDMS_GROUP, PdmsTools::PDMS_INVALID_TOKEN, PdmsTools::PDMS_LEAVE_METAGROUP, PdmsTools::PDMS_NAME_STR, PdmsTools::PDMS_UNUSED, skipComment(), and stop.
Referenced by PdmsParser::parseSessionContent().
|
virtual |
Reimplemented in PdmsFileSession.
Definition at line 38 of file PdmsParser.cpp.
References c_max_buff_size, currentToken, dictionary, loadedObject, metaGroupMask, nextBuffer, PdmsTools::PDMS_AND, PdmsTools::PDMS_ANGLE, PdmsTools::PDMS_BOTTOM_DIAMETER, PdmsTools::PDMS_BOX, PdmsTools::PDMS_CONE, PdmsTools::PDMS_CREATE, PdmsTools::PDMS_CTORUS, PdmsTools::PDMS_DIAMETER, PdmsTools::PDMS_DISH, PdmsTools::PDMS_DOWN, PdmsTools::PDMS_END, PdmsTools::PDMS_EQUIPMENT, PdmsTools::PDMS_EST, PdmsTools::PDMS_EXTRU, PdmsTools::PDMS_GROUP, PdmsTools::PDMS_HEIGHT, PdmsTools::PDMS_INSIDE_RADIUS, PdmsTools::PDMS_INVALID_TOKEN, PdmsTools::PDMS_IS, PdmsTools::PDMS_LAST, PdmsTools::PDMS_LOOP, PdmsTools::PDMS_METRE, PdmsTools::PDMS_MILLIMETRE, PdmsTools::PDMS_NAME, PdmsTools::PDMS_NBOX, PdmsTools::PDMS_NEXTRU, PdmsTools::PDMS_NORTH, PdmsTools::PDMS_ORIENTATION, PdmsTools::PDMS_OUTSIDE_RADIUS, PdmsTools::PDMS_OWNER, PdmsTools::PDMS_POSITION, PdmsTools::PDMS_PYRAMID, PdmsTools::PDMS_RADIUS, PdmsTools::PDMS_RETURN, PdmsTools::PDMS_RTORUS, PdmsTools::PDMS_SCYLINDER, PdmsTools::PDMS_SITE, PdmsTools::PDMS_SNOUT, PdmsTools::PDMS_SOUTH, PdmsTools::PDMS_STRUCTURE, PdmsTools::PDMS_SUBSTRUCTURE, PdmsTools::PDMS_TOP_DIAMETER, PdmsTools::PDMS_UP, PdmsTools::PDMS_VERTEX, PdmsTools::PDMS_WEST, PdmsTools::PDMS_WORLD, PdmsTools::PDMS_WRT, PdmsTools::PDMS_X, PdmsTools::PDMS_X_BOTTOM, PdmsTools::PDMS_X_BOTTOM_SHEAR, PdmsTools::PDMS_X_OFF, PdmsTools::PDMS_X_TOP, PdmsTools::PDMS_X_TOP_SHEAR, PdmsTools::PDMS_XLENGTH, PdmsTools::PDMS_Y, PdmsTools::PDMS_Y_BOTTOM, PdmsTools::PDMS_Y_BOTTOM_SHEAR, PdmsTools::PDMS_Y_OFF, PdmsTools::PDMS_Y_TOP, PdmsTools::PDMS_Y_TOP_SHEAR, PdmsTools::PDMS_YLENGTH, PdmsTools::PDMS_Z, PdmsTools::PDMS_ZLENGTH, PdmsTools::PDMS_ZONE, pushIntoDictionary(), stop, and tokenBuffer.
Referenced by PdmsFileSession::initializeSession(), and PdmsParser::parseSessionContent().
|
protectedvirtual |
Reimplemented in PdmsFileSession.
Definition at line 245 of file PdmsParser.cpp.
References PdmsTools::c_max_str_length, nextBuffer, and tokenBuffer.
Referenced by gotoNextToken(), and PdmsFileSession::moveForward().
| const char * PdmsLexer::nameFromBuffer | ( | ) | const |
Definition at line 243 of file PdmsParser.cpp.
References tokenBuffer.
Referenced by PdmsParser::processCurrentToken().
|
protectedvirtual |
Reimplemented in PdmsFileSession.
Definition at line 190 of file PdmsParser.cpp.
References currentToken, dictionary, PdmsTools::PDMS_COMMENT_BLOCK, PdmsTools::PDMS_COMMENT_LINE, PdmsTools::PDMS_NAME_STR, PdmsTools::PDMS_NUM_VALUE, PdmsTools::PDMS_UNKNOWN, PdmsTools::PDMS_UNUSED, skipHandleCommand(), and tokenBuffer.
Referenced by gotoNextToken(), and PdmsFileSession::parseCurrentToken().
|
pure virtual |
Implemented in PdmsFileSession.
Referenced by PdmsParser::parseSessionContent(), and PdmsParser::processCurrentToken().
|
protected |
Definition at line 254 of file PdmsParser.cpp.
References dictionary.
Referenced by initializeSession().
|
inline |
Definition at line 40 of file PdmsParser.h.
Referenced by PdmsParser::parseSessionContent().
|
protectedpure virtual |
Implemented in PdmsFileSession.
Referenced by gotoNextToken().
|
protectedpure virtual |
Implemented in PdmsFileSession.
Referenced by parseCurrentToken().
| PointCoordinateType PdmsLexer::valueFromBuffer | ( | ) |
Definition at line 213 of file PdmsParser.cpp.
References length(), nextBuffer, and tokenBuffer.
Referenced by PdmsParser::processCurrentToken().
|
staticprotected |
Definition at line 45 of file PdmsParser.h.
Referenced by initializeSession(), PdmsFileSession::moveForward(), and PdmsFileSession::skipComment().
|
protected |
Definition at line 48 of file PdmsParser.h.
Referenced by gotoNextToken(), initializeSession(), parseCurrentToken(), PdmsFileSession::parseCurrentToken(), PdmsFileSession::printWarning(), and PdmsFileSession::skipComment().
|
protected |
Definition at line 51 of file PdmsParser.h.
Referenced by closeSession(), initializeSession(), parseCurrentToken(), and pushIntoDictionary().
|
protected |
Definition at line 47 of file PdmsParser.h.
Referenced by closeSession(), and initializeSession().
|
protected |
Definition at line 53 of file PdmsParser.h.
Referenced by gotoNextToken(), initializeSession(), and PdmsFileSession::skipComment().
|
protected |
Definition at line 50 of file PdmsParser.h.
Referenced by initializeSession(), moveForward(), PdmsLexer(), and valueFromBuffer().
|
protected |
Definition at line 52 of file PdmsParser.h.
Referenced by gotoNextToken(), and initializeSession().
|
protected |
Definition at line 49 of file PdmsParser.h.
Referenced by initializeSession(), moveForward(), PdmsFileSession::moveForward(), nameFromBuffer(), parseCurrentToken(), PdmsFileSession::parseCurrentToken(), PdmsLexer(), PdmsFileSession::printWarning(), PdmsFileSession::skipComment(), PdmsFileSession::skipHandleCommand(), and valueFromBuffer().