I am creating my own class derving from ostream. I am facing problem in
compiling with GNU G++ compiler under linux
class IWCoreEXPORT IWAFTraceLine : public ostream
{
public:
IWAFTraceLine( const char* pszFileName = 0,int
nLine = 0, const char* pszLayer = 0,int nError = -1 );
~IWAFTraceLine( );
IWAFTraceLine( const IWAFTraceLine& that );
IWAFTraceLine& operator = ( const IWAFTraceLine& that );
ostream buffer;
//!!! These numbers can't be negative, so why not uint or size_t?
int getErrorNumber( ) const;
void setErrorNumber( int nError );
int getLineNumber( ) const;
void setLineNumber( int nLine );
const String& getFileName( ) const;
void setFileName( const String& strFileName );
const String& getLayer( ) const;
void setLayer( const String& strLayer );
String getMessage( ) const;
Boolean existsSubstInfo( const String& key ) const;
const String& findSubstInfo( const String& key ) const;
void insertSubstInfo( const String& key,
const String& value );
private:
typedef map< String, String, less < String > ,allocator<String>
SubstInfoMap ;
private:
String m_strFileName;
int m_nLine;
int m_nError;
String m_strLayer;
SubstInfoMap m_substInfo;
strstreambuf m_msg;
};
//!!! Should this be nested within IWAFException??
typedef vector< IWAFTraceLine ,allocator <IWAFTraceLine> >
IWAFTraceLines;
/************************************************** ******/
IWAFTraceLine::IWAFTraceLine( const char* pszFileName, int nLine,
const char* pszLayer,int nError) : m_strFileName.c_str(),
m_nLine,m_strLayer.c_str(),m_nError
{
if(pszFileName)
m_strFileName = pszFileName;
if(pszLayer)
m_strLayer = pszLayer;
init(&m_msg);
}
Can you please tell me that why the code is not been compiled in the
Linux with GNU G++ compiler.
mail me at di*************@hitechclub.com
regards
dinesh