Class FieldCreate

Nested Relationships

Nested Types

Class Documentation

class FieldCreate

This is a singleton class for creating introspection interfaces.

Public Functions

FieldBuilderPtr createFieldBuilder() const

Create a new instance of in-line Field builder.

Returns

a new instance of a FieldBuilder.

FieldBuilderPtr createFieldBuilder(StructureConstPtr S) const

Create a new instance of in-line Field builder pre-initialized with and existing Structure

Returns

a new instance of a FieldBuilder.

ScalarConstPtr createScalar(ScalarType scalarType) const

Create a ScalarField.

Parameters

scalarType – The scalar type.

Throws

IllegalArgumentException – if an illegal type is specified.

Returns

a Scalar interface for the newly created object.

StructureConstPtr createStructure() const

Create a Structure field.

Returns

a Structure interface for the newly created object.

StructureConstPtr createStructure(StringArray const &fieldNames, FieldConstPtrArray const &fields) const

Create a Structure field.

Parameters
  • fieldNames – the names of the fields for the structure.

  • fields – The array of Field objects for the structure.

Returns

a Structure interface for the newly created object.

StructureConstPtr createStructure(std::string const &id, StringArray const &fieldNames, FieldConstPtrArray const &fields) const

Create a Structure field with identification string.

Parameters
  • id – The identification string for the structure.

  • fieldNames – the names of the fields for the structure.

  • fields – The array of Field objects for the structure.

Returns

a Structure interface for the newly created object.

UnionArrayConstPtr createUnionArray(UnionConstPtr const &punion) const

Create an Array field that is has element type Union

Parameters

punion – The Union for each array element.

Returns

An Array Interface for the newly created object.

UnionArrayConstPtr createVariantUnionArray() const

Create a variant UnionArray (aka any type) field.

Returns

a UnionArray interface for the newly created object.

UnionConstPtr createVariantUnion() const

Create a variant Union (aka any type) field.

Returns

a Union interface for the newly created object.

UnionConstPtr createUnion(StringArray const &fieldNames, FieldConstPtrArray const &fields) const

Create a Union field.

Parameters
  • fieldNames – the names of the fields for the union.

  • fields – The Field for each fields for the union.

Returns

a Union interface for the newly created object.

UnionConstPtr createUnion(std::string const &id, StringArray const &fieldNames, FieldConstPtrArray const &fields) const

Create a Union field with identification string.

Parameters
  • id – The identification string for the union.

  • fieldNames – the names of the fields for the union.

  • fields – The array of Field objects for the union.

Returns

a Union interface for the newly created object.

StructureConstPtr appendField(StructureConstPtr const &structure, std::string const &fieldName, FieldConstPtr const &field) const

Append a field to a structure.

Parameters
  • structure – The structure to which the field is appended.

  • fieldName – The name of the field.

  • field – The field.

Returns

a Structure interface for the newly created object.

StructureConstPtr appendFields(StructureConstPtr const &structure, StringArray const &fieldNames, FieldConstPtrArray const &fields) const

Append fields to a structure.

Parameters
  • structure – The structure to which the fields appended.

  • fieldNames – The names of the fields.

  • fields – The fields.

Returns

a Structure interface for the newly created object.

FieldConstPtr deserialize(ByteBuffer *buffer, DeserializableControl *control) const

Deserialize Field instance from given byte buffer.

Parameters
  • buffer – Buffer containing serialized Field instance.

  • control – Deserialization control instance.

Returns

a deserialized Field instance.

Public Static Functions

static const FieldCreatePtr &getFieldCreate()

Friends

friend struct detail::field_factory
struct Helper

Public Static Functions

template<typename FLD>
static inline void cache(const FieldCreate *create, std::tr1::shared_ptr<FLD> &ent)