Remove all IField/ITField functions. They are now obsolete.

Use the correponding STObject functions.
This commit is contained in:
JoelKatz
2012-10-01 15:21:22 -07:00
parent 841a404114
commit 79c35f2689
21 changed files with 289 additions and 364 deletions

View File

@@ -545,6 +545,28 @@ NewcoinAddress STObject::getValueFieldAccount(SField::ref field) const
return cf->getValueNCA();
}
uint160 STObject::getValueFieldAccount160(SField::ref field) const
{
uint160 a;
const SerializedType* rf = peekAtPField(field);
if (!rf)
{
#ifdef DEBUG
std::cerr << "Account field not found" << std::endl;
std::cerr << getFullText() << std::endl;
#endif
throw std::runtime_error("Field not found");
}
SerializedTypeID id = rf->getSType();
if (id != STI_NOTPRESENT)
{
const STAccount* cf = dynamic_cast<const STAccount *>(rf);
if (!cf) throw std::runtime_error("Wrong field type");
cf->getValueH160(a);
}
return a;
}
std::vector<unsigned char> STObject::getValueFieldVL(SField::ref field) const
{
const SerializedType* rf = peekAtPField(field);