Split up InfoSub and tidy up various files

This commit is contained in:
Vinnie Falco
2013-06-07 20:59:53 -07:00
parent 5e685aa55b
commit 3273625f61
138 changed files with 3155 additions and 2678 deletions

View File

@@ -1,14 +1,50 @@
/*
#include "HashedObject.h"
#include "leveldb/db.h"
#include "leveldb/write_batch.h"
#include "../database/SqliteDatabase.h"
#include "Application.h"
*/
SETUP_LOG (HashedObject)
DECLARE_INSTANCE(HashedObject);
DECLARE_INSTANCE (HashedObject);
// vim:ts=4
HashedObject::HashedObject (
HashedObjectType type,
LedgerIndex ledgerIndex,
Blob const& binaryDataToCopy,
uint256 const& hash)
: mType (type)
, mHash (hash)
, mLedgerIndex (ledgerIndex)
, mData (binaryDataToCopy)
{
}
HashedObject::HashedObject (
HashedObjectType type,
LedgerIndex ledgerIndex,
void const* bufferToCopy,
int bytesInBuffer,
uint256 const& hash)
: mType (type)
, mHash (hash)
, mLedgerIndex (ledgerIndex)
, mData (static_cast <unsigned char const*> (bufferToCopy),
static_cast <unsigned char const*> (bufferToCopy) + bytesInBuffer)
{
}
HashedObjectType HashedObject::getType () const
{
return mType;
}
uint256 const& HashedObject::getHash() const
{
return mHash;
}
LedgerIndex HashedObject::getIndex () const
{
return mLedgerIndex;
}
Blob const& HashedObject::getData() const
{
return mData;
}