|
|
Go to the documentation of this file.
52 FD_DC( "vBaseVector(" << this << ")::vBaseVector()");
55 mElementTagDef= "Element";
63 FD_DC( "vBaseVector(" << this << ")::vBaseVector()");
68 Read(rFileName,rLabel);
76 FD_DC( "vBaseVector(" << this << ")::vBaseVector(rOtherVector " << &rOtherVector << "): copy construct");
82 FD_DC( "vBaseVector(" << this << ")::~vBaseVector()");
87 FD_DC( "vBaseVector(" << this << ")::~vBaseVector(): done");
114 FD_DC( "vBaseVector(" << this << ")::DoAssign(rOtherVector " << &rSourceVector << ")");
116 if( this==&rSourceVector) return;
126 mVector[pos].pElement = rSourceVector. mVector[pos].pElement->Copy();
127 mVector[pos].pElement->Name(rSourceVector. mVector[pos].pElement->Name());
132 FD_DC( "vBaseVector(" << this << ")::DoAssign(rOtherVector " << &rSourceVector << "): done");
137 FD_DC( "vBaseVector(" << this << ")::AssignByReference(rOtherVector " << &rSourceVector << ")");
139 if( this==&rSourceVector) return;
154 FD_DC( "vBaseVector(" << this << ")::AssignByReference(rOtherVector " << &rSourceVector << "): done");
169 FD_DC( "vBaseVector(" << this << ")::DoEqual()");
170 if( Size()!=rOther. Size()) return false;
174 FD_DF( "vBaseVector(" << this << ")::DoEqual(): " << p << ": " << eq);
175 if(!eq) return false;
187 FD_DC( "vBaseVector(" << this << ")::Size(..): from " << mVector.size() << " to " << len);
191 for( Position pos=len; pos<olen; pos++)
196 for( Position pos=olen; pos < len; pos++) {
202 FD_DC( "vBaseVector(" << this << ")::Size(..): done");
220 std::stringstream errstr;
221 errstr << "index out of range" << std::endl;
222 throw Exception( "vBaseVector::At", errstr.str(), 62);
232 std::stringstream errstr;
233 errstr << "index out of range" << std::endl;
234 throw Exception( "vBaseVector::At", errstr.str(), 62);
246 std::stringstream errstr;
247 errstr << "index out of range" << std::endl;
248 throw Exception( "vBaseVector::At", errstr.str(), 62);
252 std::stringstream errstr;
253 errstr << "cannot cast element " << std::endl;
254 throw Exception( "vBaseVector::Replace(pos,elem)", errstr.str(), 63);
257 if(pit->mMine) delete pit->pElement;
258 pit->pElement=rElem. Copy();
267 std::stringstream errstr;
268 errstr << "index out of range" << std::endl;
269 throw Exception( "vBaseVector::At", errstr.str(), 62);
273 std::stringstream errstr;
274 errstr << "cannot cast element " << std::endl;
275 throw Exception( "vBaseVector::Replace(pos,elem)", errstr.str(), 63);
278 if(pit->mMine) delete pit->pElement;
288 std::stringstream errstr;
289 errstr << "index out of range" << std::endl;
290 throw Exception( "vBaseVector::At", errstr.str(), 62);
294 if(pit->mMine) delete pit->pElement;
297 pit->pElement->Read(rFileName);
298 pit->mFileName=rFileName;
305 std::stringstream errstr;
306 errstr << "index out of range" << std::endl;
307 throw Exception( "vBaseVector::At", errstr.str(), 62);
311 if(pit->mMine) delete pit->pElement;
320 std::stringstream errstr;
321 errstr << "index out of range" << std::endl;
322 throw Exception( "vBaseVector::At", errstr.str(), 62);
326 std::stringstream errstr;
327 errstr << "cannot cast element " << std::endl;
328 throw Exception( "vBaseVector::Insert(pos,elem)", errstr.str(), 63);
331 elem.pElement = rElem. Copy();
342 std::stringstream errstr;
343 errstr << "index out of range" << std::endl;
344 throw Exception( "vBaseVector::At", errstr.str(), 62);
348 std::stringstream errstr;
349 errstr << "cannot cast element " << std::endl;
350 throw Exception( "vBaseVector::Insert(pos,elem)", errstr.str(), 63);
364 std::stringstream errstr;
365 errstr << "index out of range" << std::endl;
366 throw Exception( "vBaseVector::At", errstr.str(), 62);
382 std::stringstream errstr;
383 errstr << "cannot cast element " << std::endl;
384 throw Exception( "vBaseVector::PushBack(elem)", errstr.str(), 63);
396 std::stringstream errstr;
397 errstr << "cannot cast element " << std::endl;
398 throw Exception( "vBaseVector::PushBack(elem)", errstr.str(), 63);
437 std::stringstream errstr;
438 errstr << "cannot cast element " << std::endl;
439 throw Exception( "vBaseVector::Find(elem)", errstr.str(), 63);
442 for(;pos< Size();++pos) {
443 if(rElem. Equal( At(pos))) return pos;
468 std::stringstream errstr;
469 errstr << "index out of range" << std::endl;
470 throw Exception( "vBaseVector::FilenameAt", errstr.str(), 62);
480 std::stringstream errstr;
481 errstr << "index out of range" << std::endl;
482 throw Exception( "vBaseVector::FilenameAt", errstr.str(), 62);
485 mVector[pos].mFileName = rFileName;
491 for(;pit!= mVector.end();++pit) {
492 if(pit->mMine) continue;
493 pit->pElement=pit->pElement->Copy();
510 if( mVector[pos].mFileName== "") ifiles= false;
512 std::string dirname= "";
517 FD_DC( "vBaseVector(" << this << ")::DoWrite(..): #" << Size());
524 mVector[pos].pElement->Write(rTw,etstr,pContext);
541 if( mVector[pos].mFileName== "") ifiles= false;
543 std::string dirname= "";
548 FD_DC( "vBaseVector(" << this << ")::DoWrite(..): #" << Size());
555 mVector[pos].pElement->XWrite(rTw,etstr,pContext);
570 FD_DC( "vBaseVector(" << this << ")::DoWrite(..): #" << Size());
573 mVector[pos].pElement->DWrite(rTw, "",pContext);
581 FD_DC( "vBaseVector(" << this << ")::DoSWrite(..)");
585 mVector[pos].pElement->SWrite(rTw);
594 std::string label=rLabel;
604 if(label== "") label=ftype;
608 while(!rTr. Eos(label)){
621 std::string path = dirname.append(filename);
631 elemp-> Read(rTr,etstr,pContext);
639 std::stringstream errstr;
640 errstr << "token mismatch" << std::endl;
641 throw Exception( "vBaseVector::At", errstr.str(), 50);
Classes NameSet, TaNameSet.
#define FAUDES_TYPE_IMPLEMENTATION(ftype, ctype, cbase)
virtual const std::string & ElementType(void) const
virtual const std::string & ElementTag(void) const
const std::string & Name(void) const
virtual const std::string & TypeName(void) const
bool Eos(const std::string &rLabel)
void ReadEnd(const std::string &rLabel)
void ReadBegin(const std::string &rLabel)
std::string FileName(void) const
Mode SourceMode(void) const
std::string FileName(void) const
void WriteComment(const std::string &rComment)
void Write(Token &rToken)
void WriteString(const std::string &rString)
bool FileMode(void) const
void WriteEnd(const std::string &rLabel)
const std::string & StringValue(void) const
@ Begin <label> (begin of section)
@ String any string, space separated or quoted, must start with a letter
TokenType Type(void) const
virtual Token XBeginTag(const std::string &rLabel="", const std::string &rFallbackLabel="") const
void Read(const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
virtual Type * New(void) const
virtual Type * Copy(void) const
virtual bool Equal(const Type &rOther) const
virtual const Type * Cast(const Type *pOther) const
virtual Position Find(const Type &rElem)
virtual void DoSWrite(TokenWriter &rTw) const
void FilenameAt(const Position &pos, const std::string &rFileName)
virtual ~vBaseVector(void)
virtual Type * NewElement(void)
virtual const Type & At(const Position &pos) const
virtual const Type & Element(void) const
virtual void EraseDoublets(void)
virtual void Insert(const Position &pos, const Type &rElem)
bool IsDefault(void) const
void AssignByReference(vBaseVector &rSourceVector)
std::string mElementTagDef
virtual const Type * Elementp(void) const
virtual bool ElementTry(const Type &rElement) const
virtual void Erase(const Position &pos)
virtual void DoWrite(TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
virtual void Append(const Type &rElem)
virtual void DoDWrite(TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
virtual void DoXWrite(TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
virtual void PushBack(const Type &rElem)
virtual void Replace(const Position &pos, const Type &rElem)
virtual void DoRead(TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
void DoAssign(const vBaseVector &rSourceVector)
std::vector< ElementRecord >::iterator iterator
std::vector< ElementRecord > mVector
bool DoEqual(const vBaseVector &rOther) const
std::string ExtractDirectory(const std::string &rFullPath)
std::string PrependPath(const std::string &rLeft, const std::string &rRight)
std::string ExtractFilename(const std::string &rFullPath)
std::string ToStringInteger(Int number)
libFAUDES 2.33k
--- 2025.09.16
--- c++ api documentaion by doxygen
|