mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
read vector.
still missing: enums, empty fields for optional parameters.
This commit is contained in:
parent
fb5f26e7fc
commit
821878835a
5 changed files with 83 additions and 36 deletions
|
@ -83,16 +83,16 @@ bool LogField::Read(SerializationFormat* fmt)
|
|||
int t;
|
||||
int it;
|
||||
|
||||
bool success = (fmt->Read(&name, "name") && fmt->Read(&t, "type") && fmt->Read(&it, "set_type") );
|
||||
bool success = (fmt->Read(&name, "name") && fmt->Read(&t, "type") && fmt->Read(&it, "subtype") );
|
||||
type = (TypeTag) t;
|
||||
set_type = (TypeTag) it;
|
||||
subtype = (TypeTag) it;
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool LogField::Write(SerializationFormat* fmt) const
|
||||
{
|
||||
return (fmt->Write(name, "name") && fmt->Write((int)type, "type") && fmt->Write((int)set_type, "set_type"));
|
||||
return (fmt->Write(name, "name") && fmt->Write((int)type, "type") && fmt->Write((int)subtype, "subtype"));
|
||||
}
|
||||
|
||||
LogVal::~LogVal()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue