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

libFAUDES 2.33h --- 2025.06.18 --- c++ api documentaion by doxygen