start support for annotation for log field types.

commit before rolling part of it back...
This commit is contained in:
Bernhard Amann 2011-12-05 15:02:03 -08:00
parent 949ec6897a
commit 78b24da7e4
7 changed files with 28 additions and 6 deletions

View file

@ -83,7 +83,8 @@ bool LogField::Read(SerializationFormat* fmt)
int t;
int it;
bool success = (fmt->Read(&name, "name") && fmt->Read(&t, "type") && fmt->Read(&it, "subtype") );
bool success = (fmt->Read(&name, "name") && fmt->Read(&secondary_name, "secondary_name") &&
fmt->Read(&t, "type") && fmt->Read(&it, "subtype") );
type = (TypeTag) t;
subtype = (TypeTag) it;
@ -92,7 +93,8 @@ bool LogField::Read(SerializationFormat* fmt)
bool LogField::Write(SerializationFormat* fmt) const
{
return (fmt->Write(name, "name") && fmt->Write((int)type, "type") && fmt->Write((int)subtype, "subtype"));
return (fmt->Write(name, "name") && fmt->Write(secondary_name, "secondary_name") && fmt->Write((int)type, "type") &&
fmt->Write((int)subtype, "subtype"));
}
LogVal::~LogVal()
@ -151,7 +153,7 @@ bool LogVal::IsCompatibleType(BroType* t, bool atomic_only)
if ( ! t->IsSet() )
return false;
return IsCompatibleType(t->AsSetType()->Indices()->PureType(), true);
return IsCompatibleType(t->AsSetType()->Indices()->PureType());
}
case TYPE_VECTOR: