This commit is contained in:
JoelKatz
2012-04-06 22:35:42 -07:00
parent d384860dd7
commit 471c3caf8f

32
src/SerializedLedger.h Normal file
View File

@@ -0,0 +1,32 @@
#ifndef __SERIALIZEDLEDGER__
#define __SERIALIZEDLEDGER__
#include "SerializedObject.h"
#include "LedgerFormats.h"
class SerializedLedger : public STObject
{
public:
typedef boost::shared_ptr<SerializedLedger> pointer;
protected:
LedgerEntryType mType;
STUInt16 mVersion;
STObject mObject;
LedgerEntryFormat* mFormat;
public:
SerializedLedger(SerializerIterator& sit);
SerializedLedger(LedgerEntryType type);
int getLength() const { return mVersion.getLength() + mObject.getLength(); }
SerializedTypeID getType() const { return STI_LEDGERENTRY; }
SerializedLedger* duplicate() const { return new SerializedLedger(*this); }
std::string getFullText() const;
std::string getText() const;
void add(Serializer& s) const { mVersion.add(s); mObject.add(s); }
};
#endif