Archon::X3D::XML::Parser Struct Reference

Inheritance diagram for Archon::X3D::XML::Parser:

Inheritance graph
[legend]
Collaboration diagram for Archon::X3D::XML::Parser:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Element {
  elem_nil, elem_toplevel, elem_x3d, elem_head,
  elem_meta, elem_component, elem_scene, elem_route,
  elem_proto, elem_field, elem_node, elem_use
}

Public Member Functions

string getElementName (Element e, const NodeType *t=0)
string getElementName (const StackEntry &e)
Element elementLookup (string name)
void warning (string message)
 Parser (Ref< ExecutionContext > context, Ref< GroupingNode > rootGroup, string sourceName, XML_Parser xmlParser, ProgressTracker *progressTracker, Logger *logger, Time creationTimeStamp, bool progressive)
bool isWhiteSpace (const char *s)
 Does the string consist of whitespace characters only?
bool eatWord (const char *&s, const char *&from)
 Skip whitespace, then return false if there is no more characters.
bool eat (const char *&s, bool &v, bool &more)
bool eat (const char *&s, int &v, bool &more)
bool eat (const char *&s, double &v, bool &more)
bool eat (const char *&s, Vector2 &v, bool &more)
bool eat (const char *&s, Vector3 &v, bool &more)
bool eat (const char *&s, Vector4 &v, bool &more)
bool eat (const char *&s, Rotation3 &v, bool &more)
bool eat (const char *&s, Image &v, bool &more)
bool eat (const char *&s, Time &v, bool &more)
template<class T>
bool parseValue (const char *s, T &v)
template<class T>
bool parseValue (const char *s, vector< T > &l)
bool parseValue (const char *s, string &v)
 We need special handling of SFString fields because anything is valid.
bool parseValue (const char *s, vector< string > &v)
void initialize ()
Ref< NodeBaselookupUseNode (string name, const NodeType *type)
Ref< NodeBasecheckUseAttribute (const char *atts[], const NodeType *nodeType)
void displayStack (bool push)
bool attr_cmp (string s, string attribute, Element element, bool deprecated=false)
void parseStartElement (const char *name, const char *atts[], StackEntry *stackEntry)
void startElement (const char *name, const char *atts[])
void endElement ()
void injectChild (StackEntry *stackEntry)
void characterDataHandler (const char *s, int n)

Public Attributes

XML_Parser xmlParser
ProgressTrackerprogressTracker
Time creationTimeStamp
bool progressive
vector< StackEntrycontainmentStack
map< const FieldType *, const
ValueParserBase * > 
valueParsers
map< string, string > compatibilityFieldTypeNameMap

Classes

struct  SequenceValueParser
struct  SingleValueParser
struct  StackEntry
struct  ValueParserBase

Detailed Description

Definition at line 71 of file parse_xml.C.


Member Function Documentation

bool Archon::X3D::XML::Parser::eat const char *&  s,
Image v,
bool &  more
[inline]
 

Todo:
Needs to be implemented after completing new Image class.

Definition at line 370 of file parse_xml.C.

References eatWord(), and warning().

bool Archon::X3D::XML::Parser::eatWord const char *&  s,
const char *&  from
[inline]
 

Skip whitespace, then return false if there is no more characters.

Otherwise return true and set 'from' to the start of the word and 's' to the character imediately following the last non-whitespace character.

Note: We include , as a whitespace character. This seems to be in line with the X3D specification.

Definition at line 213 of file parse_xml.C.

Referenced by eat().

Element Archon::X3D::XML::Parser::elementLookup string  name  )  [inline]
 

Todo:
Should be changed so that initially a case sensitive search is done.
Then afterwards, if not found, a case insensitive search should be done for maximum tollerance but without loosing specification conformanse.

Returns elem_nil for an unknown or unimplemented element

Definition at line 157 of file parse_xml.C.

Referenced by parseStartElement().

bool Archon::X3D::XML::Parser::parseValue const char *  s,
vector< string > &  v
[inline]
 

Todo:
How is MFString represented in the XML encoding?

Definition at line 444 of file parse_xml.C.

References n, and warning().


The documentation for this struct was generated from the following file:
Generated on Sun Jul 30 23:03:56 2006 for Archon by  doxygen 1.4.4