tempalte helpers; static initialization order

This commit is contained in:
Matej Sekoranja
2013-11-08 13:50:54 +01:00
parent 57b3e9a8b2
commit 1aff2ec112
8 changed files with 85 additions and 47 deletions

View File

@@ -460,18 +460,21 @@ void Structure::deserialize(ByteBuffer */*buffer*/, DeserializableControl */*con
throw std::runtime_error("not valid operation, use FieldCreate::deserialize instead");
}
String Union::DEFAULT_ID = "union";
String Union::ANY_ID = "any";
#define UNION_ANY_ID "any"
String Union::ANY_ID = UNION_ANY_ID;
Union::Union ()
: Field(union_),
fieldNames(),
fields(),
id(ANY_ID)
id(UNION_ANY_ID)
{
}
#undef UNION_ANY_ID
Union::Union (
StringArray const & fieldNames,
FieldConstPtrArray const & infields,
@@ -996,6 +999,7 @@ FieldConstPtr FieldCreate::deserialize(ByteBuffer* buffer, DeserializableControl
}
}
// TODO replace with non-locking singleton pattern
FieldCreatePtr FieldCreate::getFieldCreate()
{
LOCAL_STATIC_LOCK;