cfl_nameset.cpp
Go to the documentation of this file.
1 /** @file cfl_nameset.cpp @brief Classes NameSet */
2 
3 /* FAU Discrete Event Systems Library (libfaudes)
4 
5  Copyright (C) 2006 Bernd Opitz
6  Exclusive copyright is granted to Klaus Schmidt
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Lesser General Public
10  License as published by the Free Software Foundation; either
11  version 2.1 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
21 
22 
23 #include "cfl_nameset.h"
24 
25 namespace faudes {
26 
27 /*
28 *********************************************************************************
29 *********************************************************************************
30 *********************************************************************************
31 
32  NameSet
33 
34 *********************************************************************************
35 *********************************************************************************
36 *********************************************************************************
37 */
38 
39 
40 // std faudes type (cannot do New() with macro)
41 FAUDES_TYPE_IMPLEMENTATION_COPY(EventSet,NameSet,TBaseSet<Idx>)
42 FAUDES_TYPE_IMPLEMENTATION_CAST(EventSet,NameSet,TBaseSet<Idx>)
43 FAUDES_TYPE_IMPLEMENTATION_ASSIGN(EventSet,NameSet,TBaseSet<Idx>)
44 FAUDES_TYPE_IMPLEMENTATION_EQUAL(EventSet,NameSet,TBaseSet<Idx>)
45 
46 
47 // empty constructor
49  mpSymbolTable = SymbolTable::GlobalEventSymbolTablep();
50  mXElementTagDef="Event";
51  Name("NameSet");
52  FD_DC("NameSet("<<this<<")::NameSet() with symtab "<< mpSymbolTable);
53 }
54 
55 // constructor from nameset
56 NameSet::NameSet(const NameSet& rOtherSet) : TBaseSet<Idx>() {
57  FD_DC("NameSet(" << this << ")::NameSet(rOtherSet " << &rOtherSet << ")");
58  mpSymbolTable = rOtherSet.mpSymbolTable;
59  mXElementTagDef="Event";
60  Assign(rOtherSet);
61  FD_DC("NameSet(" << this << ")::NameSet(rOtherSet " << &rOtherSet << "): done");
62 }
63 
64 // read file constructor
65 NameSet::NameSet(const std::string& rFilename, const std::string& rLabel) : TBaseSet<Idx>() {
66  FD_DC("NameSet(" << this << ")::NameSet(" << rFilename << ")");
68  mXElementTagDef="Event";
69  Read(rFilename, rLabel);
70 }
71 
72 // destructor
74  FD_DC("NameSet("<<this<<")::~NameSet()");
75 }
76 
77 // New()
78 NameSet* NameSet::New(void) const {
79  NameSet* res= new NameSet();
81  return res;
82 }
83 
84 
85 // copy (attributes to default)
86 void NameSet::DoAssign(const NameSet& rSourceSet) {
87  FD_DC("NameSet(" << this << ")::DoAssign(..)");
88  // fix my symboltable
89  mpSymbolTable=rSourceSet.mpSymbolTable;
90  // call base
91  TBaseSet<Idx>::DoAssign(rSourceSet);
92 }
93 
94 // Compare
95 bool NameSet::DoEqual(const NameSet& rOtherSet) const {
96  FD_DC("NameSet::DoEqual()");
97 #ifdef FAUDES_CHECKED
98  if(rOtherSet.mpSymbolTable!=mpSymbolTable) {
99  std::stringstream errstr;
100  errstr << "symboltable mismazch aka not implemented" << std::endl;
101  throw Exception("NameSet::DoEqual()", errstr.str(), 67);
102  }
103 #endif
104  return TBaseSet<Idx>::DoEqual(rOtherSet);
105 }
106 
107 // SymbolTablep()
109  return mpSymbolTable;
110 }
111 
112 // SymbolTablep(pSymTab)
114  FD_DC("NameSet(" << this << ")::SymbolTablep(" << pSymTab << ")");
115  if(!Empty()) {
116  Clear();
117  }
118  mpSymbolTable=pSymTab;
119 }
120 
121 // DoWrite(tw, rLabel)
122 void NameSet::DoWrite(TokenWriter& tw, const std::string& rLabel, const Type* pContext) const {
123  std::string label=rLabel;
124  if(label=="") label=Name();
125  FD_DC("NameSet(" << this << ")::DoWrite(..): section " << label << " #" << Size());
126  tw.WriteBegin(label);
127  Token token;
128  Iterator it;
129  for (it = Begin(); it != End(); ++it) {
130 #ifdef FAUDES_DEBUG_CODE
131  if (SymbolicName(*it) == "") {
132  FD_ERR("NameSet::Write(): "
133  << "index " << *it << " not in SymbolTable. aborting...");
134  abort();
135  }
136 #endif
137  token.SetString(SymbolicName(*it));
138  tw << token;
139  Attribute(*it).Write(tw,"",pContext);
140  }
141  tw.WriteEnd(label);
142 }
143 
144 // DoDWrite()
145 void NameSet::DoDWrite(TokenWriter& tw, const std::string& rLabel, const Type* pContext) const {
146  std::string label=rLabel;
147  if(label=="") label=Name();
148  if(label=="") label=TypeName();
149  tw.WriteBegin(label);
150  Token token;
151  Iterator it;
152  for (it = Begin(); it != End(); ++it) {
153  tw << Str(*it);
154  Attribute(*it).Write(tw,"",pContext);
155  }
156  tw.WriteEnd(label);
157 }
158 
159 
160 // DoXWrite(tw, rLabel)
161 void NameSet::DoXWrite(TokenWriter& tw, const std::string& rLabel, const Type* pContext) const {
162  // Set up outer tag
163  Token btag=XBeginTag(rLabel,"NameSet");
164  tw.Write(btag);
165  FD_DC("NameSet(" << this << ")::DoXWrite(..): section " << btag.StringValue() << " #" << Size());
166  // loop elements
167  std::string etstr=XElementTag();
168  for (Iterator it = Begin(); it != End(); ++it) {
169  Token etoken;
170  const AttributeVoid& attr=Attribute(*it);
171  // case a: no attribute value
172  if(attr.IsDefault()) {
173  etoken.SetEmpty(etstr);
174  etoken.InsAttributeString("name",SymbolicName(*it));
175  tw << etoken;
176  }
177  // case b: incl attribute value
178  if(!attr.IsDefault()) {
179  etoken.SetBegin(etstr);
180  etoken.InsAttributeString("name",SymbolicName(*it));
181  tw << etoken;
182  Attribute(*it).XWrite(tw,"",pContext);
183  etoken.SetEnd(etstr);
184  tw << etoken;
185  }
186  }
187  tw.WriteEnd(btag.StringValue());
188 }
189 
190 // DoRead(rTr, rLabel, pContext)
191 void NameSet::DoRead(TokenReader& rTr, const std::string& rLabel, const Type* pContext) {
192  // set up defaults
193  std::string label=rLabel;
194  std::string ftype=TypeName();
195  std::string etstr=XElementTag();
196  // figure section
197  Token token;
198  if(label=="") {
199  rTr.Peek(token);
200  if(token.Type()==Token::Begin) label=token.StringValue();
201  }
202  if(label=="") label=ftype;
203  Name(label);
204  // read begin
205  rTr.ReadBegin(label,token);
206  if(token.ExistsAttributeString("name"))
207  Name(token.AttributeStringValue("name"));
208  FD_DC("NameSet(" << this << ")::DoRead(..): section " << label << " with symtab " << mpSymbolTable);
209  // prepare attribute
210  AttributeVoid* attrp = AttributeType()->New();
211  FD_DC("NameSet(" << this << ")::DoRead(..): attribute type " << typeid(*attrp).name());
212  // loop tokens
213  std::string name;
214  while(!rTr.Eos(label)) {
215  rTr.Peek(token);
216  // read by name (faudes format)
217  if(token.IsString()) {
218  FD_DC("TaNameSet(" << this << ")::DoRead(..): inserting element in faudes format \""
219  << token.StringValue() << "\"");
220  rTr.Get(token);
221  name=token.StringValue();
222  // read faudes attribute
223  attrp->Read(rTr,"",pContext);
224  // skip unknown faudes attributes
225  AttributeVoid::Skip(rTr);
226  // insert element with attribute
227  Idx index=Insert(name);
228  Attribute(index,*attrp);
229  continue;
230  }
231  // read element section (XML format)
232  if(token.IsBegin(etstr)) {
233  FD_DC("TaNameSet(" << this << ")::DoRead(..): inserting element in xml format \""
234  << token.StringValue() << "\"");
235  rTr.ReadBegin(etstr,token);
236  name=token.AttributeStringValue("name");
237  // read faudes attribute
238  attrp->Read(rTr,"",pContext);
239  // skip unknown faudes attributes
240  rTr.ReadEnd(etstr);
241  // insert element with attribute
242  Idx index=Insert(name);
243  Attribute(index,*attrp);
244  continue;
245  }
246  // cannot process token
247  delete attrp;
248  std::stringstream errstr;
249  errstr << "Invalid token of type " << token.Type() << " at " << rTr.FileLine();
250  throw Exception("NameSet::DoRead", errstr.str(), 50);
251  }
252  rTr.ReadEnd(label);
253  delete attrp;
254  FD_DC("NameSet(" << this << ")::DoRead(tr," << label << ", " << pContext << "): done");
255 }
256 
257 
258 // Insert(index)
259 bool NameSet::Insert(const Idx& index) {
260 #ifdef FAUDES_CHECKED
261  if(!mpSymbolTable->Exists(index)) {
262  std::stringstream errstr;
263  errstr << "index " << index << " not known to symboltable" << std::endl;
264  throw Exception("NameSet::Insert", errstr.str(), 65);
265  }
266 #endif
267  return TBaseSet<Idx>::Insert(index);
268 }
269 
270 // Insert(rName)
271 Idx NameSet::Insert(const std::string& rName) {
272  FD_DC("NameSet(" << this << ")::Insert(" << rName <<")");
273  Idx index = mpSymbolTable->InsEntry(rName);
274  TBaseSet<Idx>::Insert(index);
275  return index;
276 }
277 
278 // InsertSet(set)
279 void NameSet::InsertSet(const TBaseSet<Idx>& rOtherSet) {
280 #ifdef FAUDES_CHECKED
281  const NameSet* nset = dynamic_cast<const NameSet*>(&rOtherSet);
282  if(!nset) {
283  std::stringstream errstr;
284  errstr << "cannot cast to nameset" << std::endl;
285  throw Exception("NameSet::InsertSet", errstr.str(), 67);
286  }
287  if(nset->mpSymbolTable!=mpSymbolTable) {
288  std::stringstream errstr;
289  errstr << "symboltable mismatch aka not implemented" << std::endl;
290  throw Exception("NameSet::InsertSet", errstr.str(), 67);
291  }
292 #endif
293  TBaseSet<Idx>::InsertSet(rOtherSet);
294 }
295 
296 
297 // InsertSet(set)
298 void NameSet::InsertSet(const NameSet& rOtherSet) {
299  FD_DC("NameSet(" << this << ")::InsertSet(" << rOtherSet.ToString() << ")");
300 #ifdef FAUDES_CHECKED
301  if(rOtherSet.mpSymbolTable!=mpSymbolTable) {
302  std::stringstream errstr;
303  errstr << "symboltable mismatch aka not implemented" << std::endl;
304  throw Exception("NameSet::InsertSet", errstr.str(), 67);
305  }
306 #endif
307  TBaseSet<Idx>::InsertSet(rOtherSet);
308 }
309 
310 // Erase(index)
311 bool NameSet::Erase(const Idx& index) {
312  FD_DC("NameSet(" << this << ")::Erase(" << index <<")");
313  return TBaseSet<Idx>::Erase(index);
314 }
315 
316 // Erase(rName)
317 bool NameSet::Erase(const std::string& rName) {
318  FD_DC("NameSet(" << this << ")::Erase(" << rName <<")");
319  Idx index = mpSymbolTable->Index(rName);
320 #ifdef FAUDES_CHECKED
321  if (index == 0) {
322  std::stringstream errstr;
323  errstr << "name \"" << rName << "\" not found in NameSet" << std::endl;
324  throw Exception("NameSet::Erase", errstr.str(), 66);
325  }
326 #endif
327  return TBaseSet<Idx>::Erase(index);
328 }
329 
330 // Erase(pos)
331 NameSet::Iterator NameSet::Erase(const Iterator& pos) {
332  return TBaseSet<Idx>::Erase(pos);
333 }
334 
335 // EraseSet(set)
336 void NameSet::EraseSet(const TBaseSet<Idx>& rOtherSet) {
337 #ifdef FAUDES_CHECKED
338  const NameSet* nset = dynamic_cast<const NameSet*>(&rOtherSet);
339  if(!nset) {
340  std::stringstream errstr;
341  errstr << "cannot cast to nameset" << std::endl;
342  throw Exception("NameSet::EraseSet", errstr.str(), 67);
343  }
344  if(nset->mpSymbolTable!=mpSymbolTable) {
345  std::stringstream errstr;
346  errstr << "symboltable mismatch aka not implemented" << std::endl;
347  throw Exception("NameSet::EraseSet", errstr.str(), 67);
348  }
349 #endif
350  TBaseSet<Idx>::EraseSet(rOtherSet);
351 }
352 
353 
354 // EraseSet(set)
355 void NameSet::EraseSet(const NameSet& rOtherSet) {
356 #ifdef FAUDES_CHECKED
357  if(rOtherSet.mpSymbolTable!=mpSymbolTable) {
358  std::stringstream errstr;
359  errstr << "symboltable mismatch aka not implemented" << std::endl;
360  throw Exception("NameSet::EraseSet", errstr.str(), 67);
361  }
362 #endif
363  TBaseSet<Idx>::EraseSet(rOtherSet);
364 }
365 
366 
367 // RestrictSet(set)
368 void NameSet::RestrictSet(const TBaseSet<Idx>& rOtherSet) {
369 #ifdef FAUDES_CHECKED
370  const NameSet* nset = dynamic_cast<const NameSet*>(&rOtherSet);
371  if(!nset) {
372  std::stringstream errstr;
373  errstr << "cannot cast to nameset" << std::endl;
374  throw Exception("NameSet::RestrictSet", errstr.str(), 67);
375  }
376  if(nset->mpSymbolTable!=mpSymbolTable) {
377  std::stringstream errstr;
378  errstr << "symboltable mismatch aka not implemented" << std::endl;
379  throw Exception("NameSet::RestrictSet", errstr.str(), 67);
380  }
381 #endif
382  TBaseSet<Idx>::RestrictSet(rOtherSet);
383 }
384 
385 // RestrictSet(set)
386 void NameSet::RestrictSet(const NameSet& rOtherSet) {
387 #ifdef FAUDES_CHECKED
388  if(rOtherSet.mpSymbolTable!=mpSymbolTable) {
389  std::stringstream errstr;
390  errstr << "symboltable mismatch aka not implemented" << std::endl;
391  throw Exception("NameSet::RestrictSet", errstr.str(), 67);
392  }
393 #endif
394  TBaseSet<Idx>::RestrictSet(rOtherSet);
395 }
396 
397 // SymbolicName(index)
398 std::string NameSet::SymbolicName(Idx index) const {
399  return mpSymbolTable->Symbol(index);
400 }
401 
402 // SymbolicName(index, name)
403 void NameSet::SymbolicName(Idx index, const std::string& rName) {
404  FD_DC("NameSet(" << this << ")::SymbolicName(" << index << ", " << rName <<")");
405 #ifdef FAUDES_CHECKED
406  if (! Exists(index)) {
407  std::stringstream errstr;
408  errstr << "index " << index << " not in this set" << std::endl;
409  throw Exception("NameSet::SymbolicName", errstr.str(), 60);
410  }
411 #endif
412  mpSymbolTable->SetEntry(index, rName);
413 }
414 
415 // SymbolicName(name, name)
416 void NameSet::SymbolicName(const std::string& rName,
417  const std::string& rNewName) {
418  FD_DC("NameSet(" << this << ")::SymbolicName(" << rName << ", "
419  << rNewName <<")");
420 #ifdef FAUDES_CHECKED
421  if (! Exists(rName)) {
422  std::stringstream errstr;
423  errstr << "name \"" << rName << "\" not found in NameSet" << std::endl;
424  throw Exception("NameSet::Symbolic", errstr.str(), 66);
425  }
426 #endif
427  mpSymbolTable->SetEntry(Index(rName), rNewName);
428 }
429 
430 // Index(rName)
431 Idx NameSet::Index(const std::string& rName) const {
432  return mpSymbolTable->Index(rName);
433 }
434 
435 // Exists(index)
436 bool NameSet::Exists(const Idx& index) const {
437  return TBaseSet<Idx>::Exists(index);
438 }
439 
440 // Exists(rName)
441 bool NameSet::Exists(const std::string& rName) const {
442  return TBaseSet<Idx>::Exists(mpSymbolTable->Index(rName)) ;
443 }
444 
445 // Find(index) const
446 NameSet::Iterator NameSet::Find(const Idx& index) const {
447  return TBaseSet<Idx>::Find(index);
448 }
449 
450 // Find(rName) const
451 NameSet::Iterator NameSet::Find(const std::string& rName) const {
452  return TBaseSet<Idx>::Find(mpSymbolTable->Index(rName));
453 }
454 
455 
456 // operator +
457 NameSet NameSet::operator + (const NameSet& rOtherSet) const {
458  FD_DC("NameSet(" << this << ")::operator + (" << &rOtherSet << ")");
459 #ifdef FAUDES_CHECKED
460  if(rOtherSet.mpSymbolTable!=mpSymbolTable) {
461  std::stringstream errstr;
462  errstr << "symboltable mismazch aka not implemented" << std::endl;
463  throw Exception("NameSet::Operator+", errstr.str(), 67);
464  }
465 #endif
466  NameSet res;
468  res.InsertSet(*this);
469  res.InsertSet(rOtherSet);
470  return res;
471 }
472 
473 // operator -
474 NameSet NameSet::operator - (const NameSet& rOtherSet) const {
475  FD_DC("NameSet(" << this << ")::operator - (" << &rOtherSet << ")");
476 #ifdef FAUDES_CHECKED
477  if(rOtherSet.mpSymbolTable!=mpSymbolTable) {
478  std::stringstream errstr;
479  errstr << "symboltable mismazch aka not implemented" << std::endl;
480  throw Exception("NameSet::Operator-", errstr.str(), 67);
481  }
482 #endif
483  NameSet res;
485  res.InsertSet(*this);
486  res.EraseSet(rOtherSet);
487  return res;
488 }
489 
490 
491 // operator*
492 NameSet NameSet::operator * (const NameSet& rOtherSet) const {
493  FD_DC("NameSet(" << this << ")::operator * (" << &rOtherSet << ")");
494 #ifdef FAUDES_CHECKED
495  if(rOtherSet.mpSymbolTable!=mpSymbolTable) {
496  std::stringstream errstr;
497  errstr << "symboltable mismazch aka not implemented" << std::endl;
498  throw Exception("NameSet::Operator*", errstr.str(), 67);
499  }
500 #endif
501  NameSet res;
503  res.InsertSet(*this);
504  res.RestrictSet(rOtherSet);
505  return res;
506 }
507 
508 // operator <=
509 bool NameSet::operator <= (const NameSet& rOtherSet) const {
510 #ifdef FAUDES_CHECKED
511  if(rOtherSet.mpSymbolTable!=mpSymbolTable) {
512  std::stringstream errstr;
513  errstr << "symboltable mismazch aka not implemented" << std::endl;
514  throw Exception("NameSet::Operator<=", errstr.str(), 67);
515  }
516 #endif
517  return TBaseSet<Idx>::operator <= (rOtherSet);
518 }
519 
520 // operator >=
521 bool NameSet::operator >= (const NameSet& rOtherSet) const {
522 #ifdef FAUDES_CHECKED
523  if(rOtherSet.mpSymbolTable!=mpSymbolTable) {
524  std::stringstream errstr;
525  errstr << "symboltable mismazch aka not implemented" << std::endl;
526  throw Exception("NameSet::Operator>=", errstr.str(), 67);
527  }
528 #endif
529  return TBaseSet<Idx>::operator >= (rOtherSet);
530 }
531 
532 // Str(index)
533 std::string NameSet::Str(const Idx& index) const {
534  return mpSymbolTable->Symbol(index)+"#"+faudes::ToStringInteger(index);
535 }
536 
537 
538 /*
539 *********************************************************************************
540 *********************************************************************************
541 *********************************************************************************
542 
543  Misc
544 
545 *********************************************************************************
546 *********************************************************************************
547 *********************************************************************************
548 */
549 
550 
551 // RTI convenience function
552 void SetIntersection(const EventSetVector& rSetVec, EventSet& rRes) {
553  // prepare result
554  rRes.Clear();
555  // ignore empty
556  if(rSetVec.Size()==0) return;
557  // copy first
558  rRes.Assign(rSetVec.At(0));
559  // perform intersecttion
560  for(EventSetVector::Position i=1; i<rSetVec.Size(); i++)
561  SetIntersection(rSetVec.At(i),rRes,rRes);
562 }
563 
564 
565 // RTI convenience function
566 void SetUnion(const EventSetVector& rSetVec, EventSet& rRes) {
567  // prepare result
568  rRes.Clear();
569  // ignore empty
570  if(rSetVec.Size()==0) return;
571  // copy first
572  rRes.Assign(rSetVec.At(0));
573  // perform union
574  for(EventSetVector::Position i=1; i<rSetVec.Size(); i++)
575  SetUnion(rSetVec.At(i),rRes,rRes);
576 }
577 
578 
579 } // namespace faudes
580 
581 
#define FD_DC(message)
#define FD_ERR(message)
Classes NameSet, TaNameSet.
#define FAUDES_TYPE_IMPLEMENTATION_EQUAL(ftype, ctype, cbase)
Definition: cfl_types.h:909
#define FAUDES_TYPE_IMPLEMENTATION_COPY(ftype, ctype, cbase)
Definition: cfl_types.h:896
#define FAUDES_TYPE_IMPLEMENTATION_CAST(ftype, ctype, cbase)
Definition: cfl_types.h:898
#define FAUDES_TYPE_IMPLEMENTATION_ASSIGN(ftype, ctype, cbase)
Definition: cfl_types.h:901
virtual bool IsDefault(void) const
static void Skip(TokenReader &rTr)
bool Exists(const Idx &rIndex) const
NameSet::Iterator Find(const Idx &rIndex) const
void SymbolicName(Idx index, const std::string &rName)
virtual void DoRead(TokenReader &tr, const std::string &rLabel="", const Type *pContext=0)
std::string Str(const Idx &rIndex) const
virtual void InsertSet(const NameSet &rOtherSet)
NameSet operator-(const NameSet &rOtherSet) const
bool DoEqual(const NameSet &rOtherSet) const
Definition: cfl_nameset.cpp:95
bool operator<=(const NameSet &rOtherSet) const
NameSet operator*(const NameSet &rOtherSet) const
SymbolTable * SymbolTablep(void) const
bool Insert(const Idx &rIndex)
NameSet operator+(const NameSet &rOtherSet) const
bool operator>=(const NameSet &rOtherSet) const
virtual void DoDWrite(TokenWriter &tw, const std::string &rLabel="", const Type *pContext=0) const
virtual void DoXWrite(TokenWriter &tw, const std::string &rLabel="", const Type *pContext=0) const
void EraseSet(const NameSet &rOtherSet)
Idx Index(const std::string &rName) const
void RestrictSet(const NameSet &rOtherSet)
virtual ~NameSet(void)
Definition: cfl_nameset.cpp:73
virtual void DoWrite(TokenWriter &tw, const std::string &rLabel="", const Type *pContext=0) const
SymbolTable * mpSymbolTable
Definition: cfl_nameset.h:432
void DoAssign(const NameSet &rSourceSet)
Definition: cfl_nameset.cpp:86
virtual bool Erase(const Idx &rIndex)
static SymbolTable * GlobalEventSymbolTablep(void)
std::string Symbol(Idx index) const
bool Exists(Idx index) const
void SetEntry(Idx index, const std::string &rName)
Idx InsEntry(Idx index, const std::string &rName)
Idx Index(const std::string &rName) const
std::string mXElementTagDef
Definition: cfl_baseset.h:1014
std::vector< int >::size_type Position
virtual const T & At(const Position &pos) const
std::string FileLine(void) const
bool Eos(const std::string &rLabel)
void ReadEnd(const std::string &rLabel)
void ReadBegin(const std::string &rLabel)
bool Get(Token &token)
bool Peek(Token &token)
void Write(Token &rToken)
void WriteEnd(const std::string &rLabel)
void WriteBegin(const std::string &rLabel)
const std::string & StringValue(void) const
Definition: cfl_token.cpp:178
@ Begin
<label> (begin of section)
Definition: cfl_token.h:84
bool IsString(void) const
Definition: cfl_token.cpp:244
void SetString(const std::string &rName)
Definition: cfl_token.cpp:85
bool ExistsAttributeString(const std::string &name)
Definition: cfl_token.cpp:356
bool IsBegin(void) const
Definition: cfl_token.cpp:259
void SetEmpty(const std::string &rName)
Definition: cfl_token.cpp:106
void SetBegin(const std::string &rName)
Definition: cfl_token.cpp:92
void InsAttributeString(const std::string &name, const std::string &value)
Definition: cfl_token.cpp:310
const std::string & AttributeStringValue(const std::string &name)
Definition: cfl_token.cpp:386
TokenType Type(void) const
Definition: cfl_token.cpp:199
virtual Token XBeginTag(const std::string &rLabel="", const std::string &rFallbackLabel="") const
Definition: cfl_types.cpp:316
void Read(const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
Definition: cfl_types.cpp:262
std::string ToString(const std::string &rLabel="", const Type *pContext=0) const
Definition: cfl_types.cpp:170
virtual void XWrite(const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const
Definition: cfl_types.cpp:201
virtual Type & Assign(const Type &rSrc)
Definition: cfl_types.cpp:77
virtual Type * New(void) const
Definition: cfl_types.cpp:54
void Write(const Type *pContext=0) const
Definition: cfl_types.cpp:140
Idx Size(void) const
virtual bool Insert(const T &rElem)
Definition: cfl_baseset.h:1977
bool DoEqual(const TBaseSet &rOtherSet) const
Definition: cfl_baseset.h:2161
virtual const AttributeVoid * AttributeType(void) const
Definition: cfl_baseset.h:2188
virtual const std::string & XElementTag(void) const
Definition: cfl_baseset.h:1794
void DoAssign(const TBaseSet &rSourceSet)
Definition: cfl_baseset.h:1278
bool Empty(void) const
Definition: cfl_baseset.h:1841
bool Exists(const T &rElem) const
Definition: cfl_baseset.h:2132
virtual void Clear(void)
Definition: cfl_baseset.h:1919
Iterator Find(const T &rElem) const
Definition: cfl_baseset.h:2127
Iterator End(void) const
Definition: cfl_baseset.h:1913
virtual void RestrictSet(const TBaseSet &rOtherSet)
Definition: cfl_baseset.h:2081
virtual void InsertSet(const TBaseSet &rOtherSet)
Definition: cfl_baseset.h:2004
Iterator Begin(void) const
Definition: cfl_baseset.h:1908
NameSet EventSet
Definition: cfl_nameset.h:533
virtual const std::string & TypeName(void) const
Definition: cfl_baseset.h:1812
virtual const AttributeVoid & Attribute(const Idx &rElem) const
Definition: cfl_baseset.h:2307
virtual bool Erase(const T &rElem)
Definition: cfl_baseset.h:2036
bool operator<=(const TBaseSet &rOtherSet) const
Definition: cfl_baseset.h:2170
bool operator>=(const TBaseSet &rOtherSet) const
Definition: cfl_baseset.h:2176
const std::string & Name(void) const
Definition: cfl_baseset.h:1772
void SetUnion(const TBaseSet< T, Cmp > &rSetA, const TBaseSet< T, Cmp > &rSetB, TBaseSet< T, Cmp > &rRes)
Definition: cfl_baseset.h:1033
void SetIntersection(const TBaseSet< T, Cmp > &rSetA, const TBaseSet< T, Cmp > &rSetB, TBaseSet< T, Cmp > &rRes)
Definition: cfl_baseset.h:1063
virtual void EraseSet(const TBaseSet &rOtherSet)
Definition: cfl_baseset.h:2059
Idx Size(void) const
Definition: cfl_baseset.h:1836
uint32_t Idx
std::string ToStringInteger(Int number)
Definition: cfl_utils.cpp:43

libFAUDES 2.33b --- 2025.05.07 --- c++ api documentaion by doxygen