|
|
||||||
|
Classes |
Public Types |
Public Member Functions |
Static Public Member Functions |
Private Types |
Private Member Functions |
Private Attributes |
Friends |
List of all members
faudes::Token Class Reference
Detailed DescriptionTokens model atomic data for stream IO. A Token models a string or numeric datum that can be read from a or written to a C++ stream. The class itself implements the representation of the data including its type and parsing from/to C++ streams. For section handling see TokenReader and TokenWriter. There is no one-to-one correspondence between elementary faudes data types like string or index with a particlular representation. The class Token therefore takes a relaxed approach and indicates possible interpretations when reading from a stream and requiering specific directions when writing. See TokenType for a list of supported formats/interpretations. Definition at line 54 of file cfl_token.h. Member Typedef Documentation◆ aiterator
Convenience typedef Definition at line 669 of file cfl_token.h. ◆ caiterator
Definition at line 670 of file cfl_token.h. Member Enumeration Documentation◆ TokenTypeToken types: Definition at line 82 of file cfl_token.h. Constructor & Destructor Documentation◆ Token() [1/2]
Empty constructor, constructs None token Definition at line 30 of file cfl_token.cpp. ◆ Token() [2/2]
Copy constructor Definition at line 42 of file cfl_token.cpp. ◆ ~Token()
Token destructor Definition at line 69 of file cfl_token.cpp. Member Function Documentation◆ AttributeFloatValue()
Access attribute value
Definition at line 407 of file cfl_token.cpp. ◆ AttributeIntegerValue()
Access attribute value
Definition at line 397 of file cfl_token.cpp. ◆ AttributeStringValue()
Access attribute value
Definition at line 386 of file cfl_token.cpp. ◆ ClearAttributes()
Clear all attributes. Definition at line 293 of file cfl_token.cpp. ◆ ClrAttribute()
◆ ClrEnd()
Clear End type (resolve empty section) Definition at line 161 of file cfl_token.cpp. ◆ ExistsAttributeFloat()
Test attibute existence.
Definition at line 376 of file cfl_token.cpp. ◆ ExistsAttributeInteger()
Test attibute existence.
Definition at line 366 of file cfl_token.cpp. ◆ ExistsAttributeString()
Test attibute existence.
Definition at line 356 of file cfl_token.cpp. ◆ FloatValue()
Get float value of a numeric token
Definition at line 173 of file cfl_token.cpp. ◆ InsAttribute()
Insert named attribute, no type. Note: only begin tags can have attributes.
Definition at line 300 of file cfl_token.cpp. ◆ InsAttributeBoolean()
Insert named attribute with boolean value. Note: only begin tags can have attributes.
Definition at line 337 of file cfl_token.cpp. ◆ InsAttributeFloat()
Insert named attribute with integer value. Note: only begin tags can have attributes.
Definition at line 347 of file cfl_token.cpp. ◆ InsAttributeInteger()
Insert named attribute with integer value. Note: only begin tags can have attributes.
Definition at line 319 of file cfl_token.cpp. ◆ InsAttributeInteger16()
Insert named attribute with integer value. Note: only begin tags can have attributes.
Definition at line 328 of file cfl_token.cpp. ◆ InsAttributeString()
Insert named attribute with string value. Note: only begin tags can have attributes.
Definition at line 310 of file cfl_token.cpp. ◆ IntegerValue()
Get integer value of a numeric token
Definition at line 167 of file cfl_token.cpp. ◆ InterpretAttribute()
Interpret attribute value from string Definition at line 645 of file cfl_token.cpp. ◆ InterpretNumber() [1/2]
Interpret string a s number Definition at line 659 of file cfl_token.cpp. ◆ InterpretNumber() [2/2]
Interpret string a s number Definition at line 654 of file cfl_token.cpp. ◆ IsBegin() [1/2]
Test token Type
Definition at line 264 of file cfl_token.cpp. ◆ IsBegin() [2/2]
◆ IsBinary()
◆ IsBoolean()
◆ IsCdata()
◆ IsEmpty()
◆ IsEnd() [1/2]
Test token Type
Definition at line 275 of file cfl_token.cpp. ◆ IsEnd() [2/2]
◆ IsFloat()
◆ IsInteger()
◆ IsInteger16()
◆ IsNone()
◆ IsOption()
◆ IsString()
◆ operator=()Assignment operator Definition at line 56 of file cfl_token.cpp. ◆ OptionValue()
Get option value of a name token
Definition at line 184 of file cfl_token.cpp. ◆ PreceedingSpace() [1/2]
Preceeding space when writing to stream
Definition at line 194 of file cfl_token.cpp. ◆ PreceedingSpace() [2/2]
Preceeding space when writing to stream
Definition at line 189 of file cfl_token.cpp. ◆ Read()
Read Token from input stream
Definition at line 1206 of file cfl_token.cpp. ◆ ReadAttributes()
Read and interpret attribute definitions of begin tags from an input file stream.
Definition at line 958 of file cfl_token.cpp. ◆ ReadBinary()
Read a base64 binary string from an input file stream
Definition at line 514 of file cfl_token.cpp. ◆ ReadCharacterData()
Read chracter data from an input file stream. Reads the stream until the next "<" character. The plain character data is returned, no entities re-substituted. If fcomments is set, faudes-comments are ignored.
Definition at line 919 of file cfl_token.cpp. ◆ ReadEscapedString()
Read a std::string value from an input file stream. Read an XML escaped string until excluding the specified stop character.
Definition at line 858 of file cfl_token.cpp. ◆ ReadMarkup()
Read and interpret markup an input file stream. This method will identify begin and end tags. Any other XML markup is meant to be gracefully ignored.
Definition at line 1041 of file cfl_token.cpp. ◆ ReadSpace()
Read (ignore) spaces on input file stream
Definition at line 590 of file cfl_token.cpp. ◆ ReadString()
Read a std::string value from an input file stream. This method assumes that the string was written in the format of WriteString, i.e. either enclosed by single stop characters or with a trailing space as stop character. For practical reasons, it is assumed that the first stop character has been allready read.
Definition at line 852 of file cfl_token.cpp. ◆ SetBegin()
Initialize as Begin token
Definition at line 92 of file cfl_token.cpp. ◆ SetBinary()
Initialize Binary token. This method allocates a copy of the data. For writing only, you may use the TokenWriter interface to avoid the local copy.
Definition at line 153 of file cfl_token.cpp. ◆ SetBoolean()
Initialize as Boolean token
Definition at line 137 of file cfl_token.cpp. ◆ SetEmpty()
Initialize as empty-tag token
Definition at line 106 of file cfl_token.cpp. ◆ SetEnd()
Initialize as End token
Definition at line 99 of file cfl_token.cpp. ◆ SetFloat()
Initialize as Float token
Definition at line 145 of file cfl_token.cpp. ◆ SetInteger()
Initialize as Integer token
Definition at line 121 of file cfl_token.cpp. ◆ SetInteger16()
Initialize as Integer16 token
Definition at line 129 of file cfl_token.cpp. ◆ SetNone()
Initialize None token Definition at line 73 of file cfl_token.cpp. ◆ SetOption()
Initialize as Option token
Definition at line 113 of file cfl_token.cpp. ◆ SetString()
Initialize as String token Definition at line 85 of file cfl_token.cpp. ◆ Str()
Pretty print string representation Convenience functio for inspection/debugging
Definition at line 1297 of file cfl_token.cpp. ◆ StringValue()
Get string value of a name token
Definition at line 178 of file cfl_token.cpp. ◆ Type()
Get token Type This method is for backward compatibility only. It returns a token type with only one bit set to indicate the type as in libfaudes up to version 2.17. To test for possible token interpretations, use the 2.17 interface IsInteger(), IsString() etc.
Definition at line 199 of file cfl_token.cpp. ◆ Write()
Write Token to output stream
Definition at line 750 of file cfl_token.cpp. ◆ WriteBinary() [1/2]
Write my binary data as base64 string to output stream
Definition at line 507 of file cfl_token.cpp. ◆ WriteBinary() [2/2]
Write specified binary data as base64 string to output stream
Definition at line 446 of file cfl_token.cpp. ◆ WriteEscapedString()
Write a std::string value to an output stream. This method replace critical characters by their XML entities and streams the resulting string. No whitespace etc added.
Definition at line 813 of file cfl_token.cpp. ◆ WriteString()
Write a std::string value to an output stream. This method writes the string enclosed by a the specified delimiter, typically '"' or ' '. Relevant XML entities are replaced by references, e.g. < && etc. A single white space is added as a sepqrqtor.
Definition at line 839 of file cfl_token.cpp. ◆ WriteVerbatim()
Write a std::string value to an output stream. This method writes a string as verbatim character data using the markup "<[!CDATA[ ... ]]> i.e. incl all control characters. The flag is used to insert extra formating at the begin and the end of the markup.
Definition at line 417 of file cfl_token.cpp. Friends And Related Function Documentation◆ TokenReader
Definition at line 58 of file cfl_token.h. ◆ TokenWriter
Definition at line 57 of file cfl_token.h. Member Data Documentation◆ mAttributeCount
Attribute sort index (for nice output only) Definition at line 666 of file cfl_token.h. ◆ mAttributes
Attribute value map Definition at line 663 of file cfl_token.h. ◆ mFloatValue
Token float value (if Token is of type Float or Integer) Definition at line 646 of file cfl_token.h. ◆ mIntegerValue
Token integer value (if Token is of type Integer or Integer16) Definition at line 643 of file cfl_token.h. ◆ mOptionValue
Token std::string value (if token is of type Option) Definition at line 640 of file cfl_token.h. ◆ mPreceedingSpace
Preceeding space (cosmetic) Definition at line 649 of file cfl_token.h. ◆ mStringValue
Token std::string value (for any token type) Definition at line 637 of file cfl_token.h. ◆ mType
Token type Definition at line 634 of file cfl_token.h. The documentation for this class was generated from the following files: libFAUDES 2.33c --- 2025.05.15 --- c++ api documentaion by doxygen |