30 endOfElementTagNames
(),
31 endOfElemenReached (
false),
34 tokenStream (_tokenStream),
35 weOwnTokenStream (
false)
42 endOfElementTagNames
(),
43 endOfElemenReached (
false),
47 weOwnTokenStream (
false)
49 bool fileOpened =
false;
51 weOwnTokenStream =
true;
69 if (factoryManagers.size () > 0)
70 factoryManagers.back ()->RegisterFactory (factory);
72 XmlFactory::RegisterFactory (factory);
80 endOfElementTagNames.push_back (sectionName);
81 factoryManagers.push_back (
new XmlFactoryManager (sectionName));
88 if ((endOfElementTagNames.size () < 1) || (factoryManagers.size () < 1))
91 endOfElementTagNames.pop_back ();
93 factoryManagers.pop_back ();
102 kkuint32 level = factoryManagers.size ();
103 while ((level > 0) && (result == NULL))
106 result = factoryManagers[level]->FactoryLookUp (sectionName);
120 if (endOfElemenReached || cancelFlag)
141 log.Level (50) <<
"XmlStream::GetNextToken Factory Selected: " << factory->ClassName () << endl;
145 KKStr endTagName = endOfElementTagNames.back ();
146 PopXmlElementLevel ();
147 endOfElemenReached =
false;
156 endOfElemenReached =
true;
161 log.Level (-1) <<
"XmlStream::GetNextToken ***WARNING*** The element just read[" << tag->Name () <<
"] Did not consume all its elements." << endl;
169 endOfElemenReached =
false;
170 PopXmlElementLevel ();
175 if (endOfElementTagNames.size () < 1)
178 log.Level (-1) << endl
179 <<
"XmlStream::GetNextToken ***ERROR*** Encountered end-tag </" << tag->Name () <<
"> with no matching start-tag." << endl
184 endOfElemenReached =
true;
185 nameOfLastEndTag = tag->Name ();
186 if (!endOfElementTagNames.back ().EqualIgnoreCase (nameOfLastEndTag))
188 log.Level (-1) << endl
189 <<
"XmlStream::GetNextToken ***ERROR*** Encountered end-tag </" << nameOfLastEndTag <<
"> does not match StartTag <" << endOfElementTagNames.back () <<
">." << endl
193 tokenStream->PushTokenOnFront (
new KKStr (
"<" + tag->Name () +
" />"));
215 KKStrConstPtr peekNext = tokenStream
->Peek (0
);
243 XmlAttributeList::const_iterator idx;
244 for (idx = attributes.begin (); idx != attributes.end (); ++idx)
252 KKQueue<XmlAttribute>::PushOnBack (a);
253 nameIndex.insert (NameIndexPair (a->Name (), a));
259 KKQueue<XmlAttribute>::PushOnFront (a);
260 nameIndex.insert (NameIndexPair (a->Name (), a));
268 DeleteFromNameIndex (a);
277 DeleteFromNameIndex (a);
286 NameIndex::iterator idx;
287 idx = nameIndex.find (a->Name ());
288 while ((idx != nameIndex.end ()) &&
289 (idx->first == a->Name ()) &&
294 if ((idx != nameIndex.end ()) && (idx->second == a))
295 nameIndex.erase (idx);
313 if (index >= size ())
316 return &(at (index)->Value ());
322 if (index >= size ())
325 return &(at (index)->Name ());
377 NameIndex::const_iterator idx;
378 idx = nameIndex.find (name);
379 if (idx == nameIndex.end ())
382 if (idx->first != name)
397 char nextCh = i.get ();
399 tagStr.Append (nextCh);
413 KKStr& attributeName,
414 KKStr& attributeValue
423 while (startIdx < len)
425 if (strchr (
"\n\t\r ", tagStr[startIdx]) == NULL)
441 if (tagStr
[idx] ==
'=')
459 if (strchr (
"\n\t\r ", tagStr[idx]) == NULL)
470 int valueStartIdx = idx;
474 if (strchr (
"\n\t\r ", tagStr[idx]) != NULL)
495 if (i.peek () ==
'<')
536 if (!attributeName.Empty ())
537 attributes.AddAttribute (attributeName, attributeValue);
579 attributes.AddAttribute (attributeName, attributeValue);
603 const KKStr& attributeValue
606 attributes.AddAttribute (attributeName, attributeValue);
615 attributes.AddAttribute (attributeName, (attributeValue ?
"Yes" :
"No"));
624 attributes.AddAttribute (attributeName, StrFromInt32 (attributeValue));
633 attributes.AddAttribute (attributeName, StrFromInt64 (attributeValue));
639 double attributeValue
644 attributes.AddAttribute (attributeName, s);
653 attributes.AddAttribute (attributeName, attributeValue.YYYY_MM_DD_HH_MM_SS ());
660 return attributes.AttributeValueByName (name);
666 return attributes.AttributeValueByIndex (index);
672 return attributes.AttributeNameByIndex (index);
678 return this->attributes.AttributeValueInt32 (attributeName);
684 return this->attributes.AttributeValueDateTime (attributeName);
690 return attributes.AttributeValueKKStr (attributeName);
696 KKStr s (name.Len () + attributes.size () * 30);
704 XmlAttributeList::const_iterator idx;
705 for (idx = attributes.begin(); idx != attributes.end (); ++idx)
753 nameTag (
new XmlTag (sectionName
, tagType
))
847 KKStrPtr c = content;
857 const char* str = s
.Str ();
865 case '&': o
<< "&";
break;
866 case '<': o
<< "<";
break;
867 case '>': o
<< ">";
break;
868 default: o << ch;
break;
885 atexit (FinalCleanUp);
901 KKStr errMsg =
"XmlStream::RegisterFactory ***ERROR*** (factory == NULL).";
902 cerr << endl << errMsg << endl << endl;
911 atexit (FinalCleanUp);
932 className
(_clasName
) 948 map<KKStr, XmlFactory*>::iterator idx;
949 for (idx = factories.begin (); idx != factories.end (); ++idx)
967 errMsg <<
"XmlFactoryManager::RegisterFactory FactoryManager[" << name <<
"] Factory[" << factory
->ClassName () <<
"] already exists." ;
968 cerr << endl << errMsg << endl << endl;
973 factories.insert (pair<KKStr, XmlFactory*> (factory->ClassName (), factory));
984 map<KKStr, XmlFactory*>::const_iterator idx;
985 idx = factories.find (className);
986 if (idx == factories.end ())
989 result = idx->second;
1036 const KKStr& varName,
1062 value->push_back (t);
1072 for (
auto idx: *value)
1082 deque<XmlTokenPtr>* v = value;
1092 return XmlFactoryUnKnown::FactoryInstance ();
1114 const KKStr& varName,
1149 value =
new vector<pair<KKStr,KKStr> > ();
1165 if (p.LastDelimiter () ==
'\n')
1166 value->push_back (pair<KKStr,KKStr> (key,
""));
1168 value->push_back (pair<KKStr,KKStr> (key, p.GetRestOfLine ()));
1187 vector<pair<KKStr,KKStr> >* v = value;
1197 value->push_back (pair<KKStr,KKStr> (key, v));
1236 KKStr vStr =
"False";
1237 if (v) vStr
= "True";
1262 vector<pair<KKStr,KKStr> >::const_iterator idx;
1263 for (idx = value->begin (); idx != value->end (); ++idx)
1265 XmlContent::WriteXml (idx->first, o);
1267 XmlContent::WriteXml (idx->second, o);
1296 log.Level (-1) << endl
1297 <<
"XmlElementArrayFloat2DVarying ***ERROR*** Height[" << height <<
"] must be greater than 0." << endl
1302 value =
new float*[height];
1309 if (
typeid(*tok) ==
typeid(XmlElementArrayFloat))
1311 if (rowCount >= height)
1313 log.Level (-1) << endl
1314 <<
"XmlElementArrayFloat2DVarying ***ERROR*** Number of defined rows exceeds defined Height[" << height <<
"]" << endl
1316 widths[rowCount] = 0;
1317 value[rowCount] = NULL;
1321 XmlElementArrayFloatPtr f =
dynamic_cast<XmlElementArrayFloatPtr>(tok);
1322 widths[rowCount] = f->Count ();
1323 value[rowCount] = f->TakeOwnership ();
1330 while (rowCount < height)
1332 value[rowCount] = NULL;
1343 for (
kkuint32 x = 0; x < height; ++x)
1349 delete value; value = NULL;
1350 delete widths; widths = NULL;
1377 const KKStr& varName,
1388 for (
kkuint32 r = 0; r < height; ++r)
1391 XmlElementArrayFloat::WriteXML (widths[r], mat[r], rowName, o);
1417 return XmlFactoryKKStr::FactoryInstance ();
1438 #define XmlElementBuiltInTypeBody(T,TypeName,ParseMethod) 1439 XmlElement##TypeName::XmlElement##TypeName (XmlTagPtr tag, 1441 VolConstBool& cancelFlag, 1444 XmlElement (tag, s, log), 1447 KKStrConstPtr valueStr = tag->AttributeValueByName ("Value"); 1449 value = (T)valueStr->##ParseMethod (); 1450 XmlTokenPtr tok = s.GetNextToken (cancelFlag, log); 1453 if (tok->TokenType () == XmlToken::TokenTypes::tokContent) 1455 XmlContentPtr c = dynamic_cast<XmlContentPtr> (tok); 1456 value = (T)c->Content ()->##ParseMethod (); 1459 tok = s.GetNextToken (cancelFlag, log); 1464 ##TypeName::~ XmlElement##TypeName () \ 1469 XmlElement##TypeName::WriteXML (T d, 1470 const KKStr& varName, 1474 XmlTag startTag (#TypeName, XmlTag::TagTypes::tagEmpty); 1475 if (!varName.Empty ()) 1476 startTag.AddAtribute ("VarName", varName); 1477 startTag.AddAtribute ("Value", d); 1478 startTag.WriteXML (o); 1483 XmlElement##TypeName::ToBool () const {return value != 0
;} KKStr 1484 XmlElement##TypeName::ToKKStr () const {return (KKStr)value;} double 1485 XmlElement##TypeName::ToDouble () const {return (double)value;} float 1486 XmlElement##TypeName::ToFloat () const {return (float)value;} kkint32 1487 XmlElement##TypeName::ToInt32 () const {return (kkint32)value;} 1496 #define XmlElementArrayBody(T,TypeName,ParserNextTokenMethod) XmlElement 1497 ##TypeName::XmlElement##TypeName (XmlTagPtr tag, 1499 VolConstBool& cancelFlag, 1502 XmlElement (tag, s, log), 1506 count = tag->AttributeValueInt32 ("Count"); 1509 log.Level (-1
) << endl 1510 << "XmlElement##TypeName ***ERROR*** Attribute Count[" << count 1511 << "] must be a positive value; will set array to NULL." << endl 1523 value = new T[count]; 1526 kkuint32 fieldsExtracted = 0
; 1527 XmlTokenPtr tok = s.GetNextToken (cancelFlag, log); 1530 if (tok->TokenType () == XmlToken::TokenTypes::tokContent) 1532 XmlContentPtr c = dynamic_cast<XmlContentPtr> (tok); 1534 KKStrParser p (*(c->Content ())); 1536 while (p.MoreTokens ()) 1538 double zed = p.##ParserNextTokenMethod ("\t,"); 1539 if (fieldsExtracted < count) 1540 value[fieldsExtracted] = (T)zed; 1545 tok = s.GetNextToken (cancelFlag, log); 1548 if (fieldsExtracted != count) 1550 log.Level (-1
) << endl 1551 << "XmlElement##TypeName<> ***ERROR*** FieldsExtracted[" 1552 << fieldsExtracted << "] differs from specified Count[" 1553 << count << "]" << endl 1559 ##TypeName::~XmlElement##TypeName () \ 1566 * XmlElement##TypeName::TakeOwnership () \ 1574 XmlElement##TypeName::WriteXML (kkuint32 count, 1576 const KKStr& varName, 1580 XmlTag startTag (#TypeName, XmlTag::TagTypes::tagStart); 1581 if (!varName.Empty ()) 1582 startTag.AddAtribute ("VarName", varName); 1583 startTag.AddAtribute ("Count", (kkint32)count); 1584 startTag.WriteXML (o); 1586 for (kkuint32 x = 0
; x < count; ++x) 1592 XmlTag endTag (#TypeName, XmlTag::TagTypes::tagEnd); 1593 endTag.WriteXML (o); 1613 #define XmlElementArray2DBody(T,TypeName,XmlElementToUse) XmlElement 1614 ##TypeName::XmlElement##TypeName (XmlTagPtr tag, 1616 VolConstBool& cancelFlag, 1619 XmlElement (tag, s, log), 1624 height = tag->AttributeValueInt32 ("Height"); 1627 log.Level (-1
) << endl 1628 << "XmlElement" << #TypeName << " ***ERROR*** Attribute Height[" 1629 << height << "] must be a positive value; will set array to NULL." 1634 width = tag->AttributeValueInt32 ("Width"); 1637 log.Level (-1
) << endl 1638 << "XmlElement" << #TypeName << " ***ERROR*** Attribute Width[" 1639 << width << "] must be a positive value; will set array to NULL." 1644 if ((height <= 0
) || (width <= 0
)) 1652 value = new T*[width]; 1655 kkuint32 rowCount = 0
; 1656 XmlTokenPtr tok = s.GetNextToken (cancelFlag, log); 1659 if (typeid(*tok) != typeid(XmlElementToUse)) 1661 log.Level (-1
) << endl 1662 << "XmlElement" << #TypeName << " ***ERROR*** Element: " 1663 << tok->SectionName () << " unexpected." 1668 XmlElementToUse* row = dynamic_cast<XmlElementToUse*> (tok); 1669 if (row->Count () != width) 1671 log.Level (-1
) << endl 1672 << "XmlElement" << #TypeName << " ***ERROR*** Row Count[ " 1673 << row->Count () << " not equal to Width[" << width << "]." 1678 if (rowCount < height) 1679 value[rowCount] = row->TakeOwnership (); 1684 tok = s.GetNextToken (cancelFlag, log); 1687 if (rowCount != height) 1689 log.Level (-1
) << endl 1690 << "XmlElement" << #TypeName << " ***ERROR*** RowCount[ " 1691 << rowCount << "] differs from specified height[" << height << "]." 1694 while (rowCount < height) 1696 value[rowCount] = new T[width]; 1697 for (kkuint32 x = 0
; x < width; ++x) 1698 value[rowCount][x] = (T)0
; 1704 ##TypeName::~XmlElement##TypeName () \ 1708 for (kkuint32 x = 0
; x < height; ++x) 1716 ** XmlElement##TypeName::TakeOwnership () \ 1724 XmlElement##TypeName::WriteXML (kkuint32 height, 1727 const KKStr& varName, 1731 XmlTag startTag (#TypeName, XmlTag::TagTypes::tagStart); 1732 if (!varName.Empty ()) 1733 startTag.AddAtribute ("VarName", varName); 1734 startTag.AddAtribute ("Height", (kkint32)height); 1735 startTag.AddAtribute ("Width", (kkint32)width); 1736 startTag.WriteXML (o); 1738 for (kkuint32 r = 0
; r < height; ++r) 1740 KKStr vn = "Row_" + StrFormatInt (r, "0000"); 1741 XmlElementToUse::WriteXML (width, mat[r], vn, o); 1743 XmlTag endTag (#TypeName, XmlTag::TagTypes::tagEnd); 1744 endTag.WriteXML (o); 1758 #define XmlElementVectorBody(T,TypeName,ParserNextTokenMethod) XmlElement 1759 ##TypeName::XmlElement##TypeName (XmlTagPtr tag, 1761 VolConstBool& cancelFlag, 1764 XmlElement (tag, s, log) \ 1767 KKStrConstPtr countStr = tag->AttributeValueByName ("Count"); 1769 count = countStr->ToInt32 (); 1771 value = new vector<T> (); 1773 XmlTokenPtr tok = s.GetNextToken (cancelFlag, log); 1776 if (tok->TokenType () == XmlToken::TokenTypes::tokContent) 1778 XmlContentPtr c = dynamic_cast<XmlContentPtr> (tok); 1780 KKStrParser p (*(c->Content ())); 1782 while (p.MoreTokens ()) 1784 T zed = p.##ParserNextTokenMethod ("\t,"); 1785 value->push_back ((T)zed); 1789 tok = s.GetNextToken (cancelFlag, log); 1795 ##TypeName::~XmlElement##TypeName () \ 1803 <T>* XmlElement##TypeName::TakeOwnership () \ 1805 vector<T>* v = value; 1812 XmlElement##TypeName::WriteXML (const vector<T>& v, 1813 const KKStr& varName, 1817 XmlTag startTag (#TypeName, XmlTag::TagTypes::tagStart); 1818 if (!varName.Empty ()) 1819 startTag.AddAtribute ("VarName", varName); 1820 startTag.WriteXML (o); 1822 for (kkuint32 x = 0
; x < v.size (); ++x) 1828 XmlTag endTag (#TypeName, XmlTag::TagTypes::tagEnd); 1829 endTag.WriteXML (o);
KKStr(kkint32 size)
Creates a KKStr object that pre-allocates space for 'size' characters.
XmlTag(const KKStr &_name, TagTypes _tagType)
#define XmlElementBuiltInTypeBody(T, TypeName, ParseMethod)
void ExtractAttribute(KKStr &tagStr, KKStr &attributeName, KKStr &attributeValue)
KKStr StrFromFloat(float f)
void AddAtribute(const KKStr &attributeName, const DateTime &attributeValue)
virtual ~XmlElementArrayFloat2DVarying()
void AddAtribute(const KKStr &attributeName, bool attributeValue)
XmlFactory * FactoryLookUp(const KKStr &className) const
KKStrConstPtr AttributeValue(const char *attributeName)
Manages the break down a stream into a set of logical tokens compatible with the XML format...
void RegisterFactory(XmlFactory *factory)
void TrimWhiteSpace(const char *_whiteSpace=" ")
After this call all leading and trailing whitespace will be trimmed from tokens.
XmlElementArrayFloat2DVarying(XmlTagPtr tag, XmlStream &s, VolConstBool &cancelFlag, RunLog &log)
KKStr & TrimRight(const char *whiteSpaceChars="\n\r\t ")
void Add(const KKStr &key, float v)
XmlElement(XmlTagPtr _nameTag, XmlStream &s, RunLog &log)
KKStr ExtractToken2(const char *delStr="\n\t\r ")
Extract first Token from the string.
const KKStr & AttributeValueKKStr(const KKStr &name) const
virtual ~XmlElementUnKnown()
KKStrConstPtr AttributeValueByIndex(kkuint32 index) const
KKStr GetNextToken(const char *delStr="\n\t\r ")
Extract next Token from string, tokens will be separated by delimiter characters. ...
XmlFactoryManager(const KKStr &_name)
XmlAttribute * XmlAttributePtr
const KKStr & Name() const
const KKStr & AttributeValueKKStr(const KKStr &name) const
KKStrConstPtr AttributeValueByName(const KKStr &name) const
unsigned __int16 kkuint16
16 bit unsigned integer.
KKStr & operator=(const char *src)
DateTime AttributeValueDateTime(const KKStr &attributeName) const
void AddAtribute(const KKStr &attributeName, kkint64 attributeValue)
XmlContent * XmlContentPtr
virtual ~XmlElementKeyValuePairs()
XmlTokenizer(const KKStr &_fileName, bool &_fileOpened)
XmlElementUnKnown(XmlTagPtr tag, XmlStream &s, VolConstBool &cancelFlag, RunLog &log)
kkint32 AttributeValueInt32(const KKStr &name) const
const KKStr & Value() const
void ReadWholeTag(istream &i, KKStr &tagStr)
void Add(const KKStr &key, kkint32 v)
static void RegisterFactory(XmlFactory *factory)
std::deque< XmlTokenPtr > * TakeOwnership()
static void WriteXML(const bool b, const KKStr &varName, std::ostream &o)
const KKStr & Name() const
void AddAttribute(const KKStr &name, const KKStr &value)
unsigned __int32 kkuint32
#define XmlElementArrayBody(T, TypeName, ParserNextTokenMethod)
float GetNextTokenFloat(const char *delStr="\n\t\r ")
XmlFactory(const KKStr &_clasName)
XmlElementBool(XmlTagPtr tag, XmlStream &s, VolConstBool &cancelFlag, RunLog &log)
void Add(const KKStr &key, bool v)
XmlElementKeyValuePairs(XmlTagPtr tag, XmlStream &s, VolConstBool &cancelFlag, RunLog &log)
KKStr & operator=(KKStr &&src)
KKStrConstPtr AttributeNameByIndex(kkuint32 index) const
kkuint32 Len() const
Returns the number of characters in the string.
KKStrConstPtr AttributeValueByName(const KKStr &name) const
char PeekNextChar() const
void AddAtribute(const KKStr &attributeName, kkint32 attributeValue)
void Add(const KKStr &key, double v)
KKStrParser(const KKStr &_str)
KKStr operator+(const char *left, const KKStr &right)
void Add(const KKStr &key, const KKStr &v)
kkint32 AttributeValueInt32(const KKStr &attributeName) const
void SkipWhiteSpace(const char *whiteSpace=" ")
Advances the next-character pointer to the next NOT white space character.
char PeekLastChar() const
KKStr(const KKStr &str)
Copy Constructor.
void AddAtribute(const KKStr &attributeName, const KKStr &attributeValue)
virtual XmlAttributePtr PopFromBack()
void TrimLeft(const char *whiteSpaceChars="\n\r\t ")
kkuint32 * TakeOwnershipWidths()
Manages the reading and writing of objects in a simple XML format. For a class to be supported by Xml...
KKStr SubStrPart(kkint32 firstChar, kkint32 lastChar) const
returns a SubString consisting of all characters starting at index 'firstChar' and ending at 'lastInd...
static void WriteXML(kkuint32 height, const kkint32 *widths, float **const mat, const KKStr &varName, std::ostream &o)
XmlElement derived class that will be used when there is no Factory defined for the element...
static XmlFactory * FactoryLookUp(const KKStr &className)
KKStr StrFromDouble(double d)
XmlTokenizer * XmlTokenizerPtr
bool EndsWith(const char *value)
virtual ~XmlElementDateTime()
kkuint32 GetNextTokenUint(const char *delStr="\n\t\r ")
virtual ~XmlElementBool()
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of 'std::string' strings.
virtual const KKStr & ClassName() const
KKStrConstPtr AttributeValue(const KKStr &attributeName)
static const KKStr & EmptyStr()
Static method that returns an Empty String.
XmlFactory * XmlFactoryPtr
KKStrConstPtr Peek(kkuint32 idx)
Allows you to look at future tokens in the stream; index of 0 would be the next token to be extracted...
double GetNextTokenDouble(const char *delStr="\n\t\r ")
virtual const KKStr & VarName() const
XmlElementDateTime(XmlTagPtr tag, XmlStream &s, VolConstBool &cancelFlag, RunLog &log)
KKStrConstPtr AttributeValueByIndex(kkuint32 index) const
kkint32 GetNextTokenInt(const char *delStr="\n\t\r ")
KKStr StrFormatInt(kkint32 val, const char *mask)
KKStr YYYY_MM_DD_HH_MM_SS() const
XmlAttributeList(bool _owner)
std::ostream &__cdecl operator<<(std::ostream &os, const KKStr &str)
XmlAttributePtr LookUpByName(const KKStr &name) const
XmlStream(const KKStr &_fileName, RunLog &_log)
virtual XmlElementPtr ManufatureXmlElement(XmlTagPtr tag, XmlStream &s, VolConstBool &cancelFlag, RunLog &log)=0
void RegisterFactory(XmlFactoryPtr factory)
Registers a Factory at the current hierarchy that is being processed.
std::vector< std::pair< KKStr, KKStr > > * TakeOwnership()
virtual const KKStr & SectionName() const
const char * Str() const
Returns a pointer to a ascii string.
XmlFactoryManager * XmlFactoryManagerPtr
virtual void PushOnBack(XmlAttributePtr a)
XmlElement(const KKStr §ionName, XmlTag::TagTypes tagType)
static XmlFactoryManagerPtr globalXmlFactoryManager
static void WriteXml(const KKStr &s, std::ostream &o)
XmlContent(KKStrPtr _content)
char operator[](kkint32 i) const
void WriteXML(std::ostream &o)
KKStrPtr const Content() const
Used for logging messages.
static void FinalCleanUp()
XmlTag(const KKStrConstPtr tagStr)
#define XmlElementVectorBody(T, TypeName, ParserNextTokenMethod)
static void WriteXML(const DateTime &d, const KKStr &varName, std::ostream &o)
virtual TokenTypes TokenType()=0
Class that manages the extraction of tokens from a String without being destructive to the original s...
KKStrPtr GetNextToken()
Will retrieve the next token in the stream which will be either a tag token or up to one line of the ...
virtual XmlTokenPtr GetNextToken(VolConstBool &cancelFlag, RunLog &log)
KKException(const KKStr &_exceptionStr)
bool ToBool() const
Returns the bool equivalent of the string, ex 'Yes' = true, 'No' = false, 'True' = true...
#define XmlElementArray2DBody(T, TypeName, XmlElementToUse)
virtual XmlAttributePtr PopFromFromt()
XmlElementKeyValuePairs()
Used to construct an instance that will be written out to a XML file.
Maintains one instance of a GoalKeeper object that can be used anywhere in the application.
KKStr SubStrPart(kkint32 firstChar) const
returns a SubString consisting of all characters starting at index 'firstChar' until the end of the s...
virtual void PushOnFront(XmlAttributePtr a)
#define XmlFactoryMacro(NameOfClass)
XmlFactoryPtr XmlElementKKStrFactoryInstance()
virtual XmlContentPtr GetNextContent(RunLog &log)
void Add(const KKStr &key, const KKB::DateTime &v)
XmlFactoryPtr XmlElementUnKnownFactoryInstance()
XmlStream(XmlTokenizerPtr _tokenStream)
XmlAttributeList(const XmlAttributeList &attributes)
KKStrConstPtr AttributeNameByIndex(kkuint32 index) const
~XmlFactoryManager()
summary>Give the FactoryManager instance ownership of this factory; the name of the factory must be u...
void AddAtribute(const KKStr &attributeName, double attributeValue)
KKStr QuotedStr() const
Returns a quoted version of string where special characters Line-Feed, Carriage Return, and Tab, are encoded as escape sequences.
DateTime & operator=(const DateTime &right)
void WriteXML(const KKStr &varName, std::ostream &o)
DateTime AttributeValueDateTime(const KKStr &name) const
XmlAttribute(const KKStr &_name, const KKStr &_value)
KKStr StrFromInt32(kkint32 i)
volatile const bool VolConstBool