|
Boost : |
Subject: Re: [boost] Boost 1_41 Binary archive exceptions
From: KARAN (msree80_at_[hidden])
Date: 2011-12-30 12:23:28
Hi this is how it looks
nel::OriginTaggedUsername mUsername;
template<class Archive>
void Serialise (Archive & aArchive, const unsigned int aVersion=0)
{
this->mUsername.Serialise(aArchive, aVersion); //when this call tooks
place exception will happen in the below Serialise function of
OriginTaggedData class
aArchive & this->mSrcIP;
aArchive & this->mSrcPort;
}
template< class T>
class OriginTaggedData
{
public:
template<class Archive>
void Serialise (Archive & aArchive, const unsigned int aVersion=0)
{
aArchive & this->mValue;
aArchive & this->mOrigin;
}
void Reset (void)
{
this->mValue = this->mUnknownValue;
this->mOrigin = Secerno::SessionDataOriginNone;
}
const T& Value(void) const { return (this->mValue); }
rno::SessionDataOrigin Origin(void) const { return
(this->mOrigin);}
std::string ToString (void) const
{
std::ostringstream lStrm;
return (lStrm.str());
}
private:
T mUnknownValue;
T mValue;
rno::SessionDataOrigin mOrigin;
protected:
OriginTaggedData (const T& aUnknownValue)
: mUnknownValue(aUnknownValue)
{
this->Reset();
}
};
class OriginTaggedUsername : public OriginTaggedData<std::string>
{
public:
OriginTaggedUsername (void)
: OriginTaggedData<std::string>(rno::GetUnknownUsername())
{
}
~OriginTaggedUsername (void)
{
}
protected:
private:
};
-- View this message in context: http://boost.2283326.n4.nabble.com/Boost-1-41-Binary-archive-exceptions-tp4242318p4246268.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk