Tidy up TxFormat and create TxFormats, TxFlags

This commit is contained in:
Vinnie Falco
2013-06-15 07:18:14 -07:00
parent 17e370918b
commit 8aab3645cb
56 changed files with 1883 additions and 1599 deletions

View File

@@ -1262,12 +1262,12 @@ UPTR_T<STObject> STObject::parseJson (const Json::Value& object, SField::ref inN
{
if (field == sfTransactionType)
{
TransactionFormat* f = TransactionFormat::getTxnFormat (strValue);
TxFormat* f = TxFormats::getInstance ().findByName (strValue);
if (!f)
throw std::runtime_error ("Unknown transaction type");
data.push_back (new STUInt16 (field, static_cast<uint16> (f->t_type)));
data.push_back (new STUInt16 (field, static_cast<uint16> (f->getType ())));
if (*name == sfGeneric)
name = &sfTransaction;