19 #ifndef EXCEPTIONIMPL_H
20 #define EXCEPTIONIMPL_H
39 #define DEFINE_EXCEPTION_EX( excName, ns, superclass ) \
40 class excName : public smbios::Exception< ns :: superclass > \
43 ~excName() throw() {}; \
44 excName( const std::string initMessage ) : smbios::Exception< ns :: superclass >(initMessage) {} ;\
45 excName( const excName &src ) : smbios::Exception< ns :: superclass >(src) {} ;\
46 excName( ) : smbios::Exception< ns :: superclass >() {} ;\
53 #define THROW(Type, txt) \
54 throw Type ( std::string( __FILE__ ## ":Line " ## LIBSMBIOS_STRINGIZE(__LINE__)) + txt)
72 virtual const char *
what()
const throw() ;
77 virtual
void setParameter( const std::
string &name, const std::
string &value );
90 : S(), messageStr( source.messageStr ), outputStr("")
93 std::map< std::string, u32 >::const_iterator iter = source.
r_ptrNumMap.begin();
94 while ( iter != source.r_ptrNumMap.end() )
100 std::map< std::string, std::string >::const_iterator iterStr = source.r_ptrStrMap.begin();
101 while ( iterStr != source.r_ptrStrMap.end() )
119 std::map< std::string, u32 >::const_iterator iter = source.
r_ptrNumMap.begin();
126 std::map< std::string, std::string >::const_iterator iterStr = source.
r_ptrStrMap.begin();
145 std::string varName =
"";
146 size_t replaceLen = 0;
149 std::ostringstream rep;
156 if( pos == strLen-1 )
174 if( endVar >= strLen )
181 if( endVar == strLen-1 )
186 replaceLen = endVar - pos + 2;
187 varName =
outputStr.substr( pos+2, replaceLen - 4 );
190 if( replaceLen > 32 )
197 outputStr.replace( pos, replaceLen, rep.str() );
237 std::map< std::string, u32 >::const_iterator iterStr =
r_ptrNumMap.find(name);
238 return iterStr->second;
244 std::map< std::string, std::string >::const_iterator iterStr =
r_ptrStrMap.find(name);
245 return iterStr->second;