|
Go to the documentation of this file.
55 FD_WARN( "Type(" << this << ")::New(): not reimplemented for " << typeid(*this).name());
61 FD_WARN( "Type(" << this << ")::Copy(): not reimplemented for " << typeid(*this).name());
62 return new Type(* this);
67 FD_WARN( "Type(" << this << ")::Cast(" << pOther << "): not reimplemented for " << typeid(*this).name());
73 FD_DC( "Type::Clear(): not re-implemented in " << typeid(*this).name());
78 FD_DC( "Type(" << this << ")::Assign(" << &rSource << ")");
90 return typeid(*this)== typeid(rOther);
100 FD_DC( "Type(" << this << ")::AssignementOperator(" << &rSource << ")");
107 FD_DC( "Type(" << this << ")::DoAssign(" << &rSource << ")");
112 FD_WARN( "Type(" << this << ")::DoEqual(" << &rOther << ")");
145 void Type::Write( const std::string& rFileName, const std::string& rLabel,
146 const Type* pContext, std::ios::openmode openmode) const {
151 catch(std::ios::failure&) {
152 std::stringstream errstr;
153 errstr << "Exception opening/writing file \"" << rFileName << "\"";
154 throw Exception( "Type::Write", errstr.str(), 2);
159 void Type::Write( const std::string& rFileName, std::ios::openmode openmode) const {
160 Write(rFileName, "",0,openmode);
194 FD_DC( "Type(" << this << ")::XWrite(): for " << typeid(*this).name());
200 void Type::XWrite( const std::string& rFileName, const std::string& rLabel, const Type* pContext) const {
203 std::stringstream errstr;
204 errstr << "Cannot write unregistered faudes-type object \"" << typeid(*this).name() << "\"";
205 throw Exception( "Type::XWrite", errstr.str(), 2);
209 XWrite(tw, rLabel, pContext);
211 catch(std::ios::failure&) {
212 std::stringstream errstr;
213 errstr << "Exception opening/writing file \"" << rFileName << "\"";
214 throw Exception( "Type::XWrite", errstr.str(), 2);
220 FD_DC( "Type(" << this << ")::XWrrite(): for " << typeid(*this).name());
231 void Type::DWrite( const std::string& rFileName, const std::string& rLabel,
232 const Type* pContext, std::ios::openmode openmode) const {
237 catch(std::ios::failure&) {
238 std::stringstream errstr;
239 errstr << "Exception opening/writing file \"" << rFileName << "\"";
240 throw Exception( "Type::DWrite", errstr.str(), 2);
261 void Type::Read( const std::string& rFilename, const std::string& rLabel, const Type* pContext) {
265 DoRead(tr,rLabel,pContext);
271 DoRead(rTr,rLabel,pContext);
278 DoRead(tr,rLabel,pContext);
283 (void) rTw; (void) rLabel; (void) pContext;
284 FD_DC( "Type::DoWrite(): not re-implemented in " << typeid(*this).name());
289 DoWrite(rTw, rLabel, pContext);
294 FD_DC( "Type::DoDWrite(): not re-implemented in " << typeid(*this).name() << ", using DoDWrite instead");
300 FD_DC( "Type::DoSWrite(): not re-implemented in " << typeid(*this).name());
308 (void) rLabel; (void) pContext; (void) rTr;
309 FD_DC( "Type::DoRead(): not re-implemented in " << typeid(*this).name());
317 std::string label=rLabel;
320 if(label== "") label=ftype;
321 if(label== "") label=rFallbackLabel;
352 Documentation::Documentation( void) : Type() {
353 mAutoRegistered= false;
354 mApplicationRegistered= false;
385 FD_DRTI( "Documentation::Clear()");
426 FD_DRTI( "Documentation::MatchKeyword(" << rPattern << ")");
429 std::transform(keys.begin(), keys.end(), keys.begin(), tolower);
430 std::string match = rPattern;
431 std::transform(match.begin(), match.end(), match.begin(), tolower);
434 std::size_t posk=keys.find(match);
435 if(posk==std::string::npos) return res;
438 std::size_t posb=keys.length();
440 posb=keys.find( mDelim,posa);
441 if(posb==std::string::npos) posb= mKeywords.length();
446 FD_DRTI( "Documentation::MatchKeyword(" << rPattern << "): " << mKeywords.substr(posa,posb-posa));
453 FD_DRTI( "Documentation::KeywordAt(" << pos << ")");
462 if(posb==std::string::npos) return res;
470 if(posb==std::string::npos) return res;
471 res=res.substr(0,posb);
483 if(pos==std::string::npos) break;
492 FD_DRTI( "Documentation::MergeDocumentation(): for " << mName);
500 size_t pos=ftype.find( "::");
501 if(pos!=std::string::npos) ftype=ftype.substr(pos+2);
503 if( ( mName!=ftype && mName!= "") || (ftype== "")) {
504 std::stringstream errstr;
505 errstr << "Documentation mismatch in file \"" << rTr. FileName() << "\" : " << mName << "!=" << ftype;
506 throw Exception( "Documentation::MergeDocumentation", errstr.str(), 48);
518 std::string label = rLabel;
519 if(label== "") label= "Documentation";
529 size_t pos= mName.find( "::");
530 if(pos!=std::string::npos) mName= mName.substr(pos+2);
542 size_t pos= mName.find( "::");
543 if(pos!=std::string::npos) mName= mName.substr(pos+2);
565 FD_DRTI( "Documentation::DoReadCore()");
575 size_t pos= mName.find( "::");
576 if(pos!=std::string::npos) mName= mName.substr(pos+2);
605 while(!rTr. Eos( "Keywords"))
630 while(!rTr. Eos( "Keywords"))
646 std::string label = rLabel;
647 if(label== "") label= "Documentation";
680 for( int i=0; i<ksz; i++)
710 TypeDefinition* TypeDefinition::Constructor( Type* pProto, const std:: string& rTypeName){
711 FD_DRTI( "TypeDefinition::Construct(" << typeid(*pProto).name() << ", " << rTypeName << ")");
712 TypeDefinition* td = new TypeDefinition();
713 td->Prototype(pProto);
714 std::string name=rTypeName;
715 if(name== "") name= typeid(*pProto).name();
723 FD_DRTI( "TypeDefinition::Clear()");
760 std::string label = rLabel;
761 if(label== "") label= "TypeDefinition";
793 std::string label=rLabel;
794 if(label== "") label= "TypeDefinition";
824 #ifdef FAUDES_CHECKED
827 if( typeid(*nobj) != typeid(* mpType)) {
828 FD_WARN( "TypeDefinition::Prototype(): factory method not implemented for c++-type " << typeid(*pType).name());
837 FD_DRTI( "TypeDefinition::NewObject()");
libFAUDES 2.28a
--- 2016.09.13
--- c++ api documentaion by doxygen
|