Array IF added

This commit is contained in:
Matej Sekoranja
2014-05-13 00:18:30 +02:00
parent 6510c10884
commit 0ceb87eee1
3 changed files with 70 additions and 9 deletions

View File

@@ -216,8 +216,15 @@ static UnionConstPtr deserializeUnionField(const FieldCreate* fieldCreate, ByteB
return fieldCreate->createUnion(id, fieldNames, fields);
}
Array::Array(Type type)
: Field(type)
{
}
Array::~Array() {}
ScalarArray::ScalarArray(ScalarType elementType)
: Field(scalarArray),elementType(elementType)
: Array(scalarArray),elementType(elementType)
{
if(elementType<0 || elementType>MAX_SCALAR_TYPE)
throw std::invalid_argument("Can't construct ScalarArray from invalid ScalarType");
@@ -282,7 +289,7 @@ void ScalarArray::deserialize(ByteBuffer* /*buffer*/, DeserializableControl* /*c
}
StructureArray::StructureArray(StructureConstPtr const & structure)
: Field(structureArray),pstructure(structure)
: Array(structureArray),pstructure(structure)
{
}
@@ -312,7 +319,7 @@ void StructureArray::deserialize(ByteBuffer* /*buffer*/, DeserializableControl*
}
UnionArray::UnionArray(UnionConstPtr const & _punion)
: Field(unionArray),punion(_punion)
: Array(unionArray),punion(_punion)
{
}