ManagedSerializableFieldDataI16 Class Reference

Description

Contains signed 16-bit integer field data.

Contains value of a single field in a managed object. This class can contain any data type and should be overridden for specific types.

Stored values can be serialized and stored for later use, and deserialized back to managed objects when needed. You must call serialize() before performing RTTI serialization. After field data has been serialized you should not call any methods on it before calling deserialize().

Inherits ManagedSerializableFieldData.

Methods

void * getValue (const SPtr< ManagedSerializableTypeInfo > &typeInfo) override
 Returns the internal value. More...
 
MonoObject * getValueBoxed (const SPtr< ManagedSerializableTypeInfo > &typeInfo) override
 Boxes the internal value and returns it. More...
 
bool equals (const SPtr< ManagedSerializableFieldData > &other) override
 Checks if the internal value stored in this object matches the value stored in another. More...
 
size_t getHash () override
 Returns a hash value for the internally stored value. More...
 
RTTITypeBasegetRTTI () const override
 Returns an interface you can use to access class' Run Time Type Information. More...
 
- Methods inherited from ManagedSerializableFieldData
virtual void serialize ()
 Serializes the internal value so that it may be stored and deserialized later. More...
 
virtual void deserialize ()
 Deserializes the internal value so that the managed instance can be retrieved. More...
 
- Methods inherited from IReflectable
bool isDerivedFrom (RTTITypeBase *base)
 Returns true if current RTTI class is derived from base (Or if it is the same type as base). More...
 
UINT32 getTypeId () const
 Returns an unique type identifier of the class. More...
 
const StringgetTypeName () const
 Returns the type name of the class. More...
 

Static methods

static RTTITypeBasegetRTTIStatic ()
 
- Static methods inherited from ManagedSerializableFieldData
static SPtr< ManagedSerializableFieldDatacreate (const SPtr< ManagedSerializableTypeInfo > &typeInfo, MonoObject *value)
 Creates a new data wrapper for some field data. More...
 
static SPtr< ManagedSerializableFieldDatacreateDefault (const SPtr< ManagedSerializableTypeInfo > &typeInfo)
 Creates a new data wrapper containing default instance of the provided type. More...
 
static RTTITypeBasegetRTTIStatic ()
 
- Static methods inherited from IReflectable
static Vector< RTTITypeBase * > & getDerivedClasses ()
 Returns all classes deriving directly from IReflectable. More...
 
static SPtr< IReflectablecreateInstanceFromTypeId (UINT32 rttiTypeId)
 Creates an empty instance of a class from a type identifier. More...
 
static void _registerDerivedClass (RTTITypeBase *derivedClass)
 Called by each type deriving from IReflectable, on program load. More...
 
static RTTITypeBase_getRTTIfromTypeId (UINT32 rttiTypeId)
 Returns class' RTTI type from type id. More...
 
static bool _isTypeIdDuplicate (UINT32 typeId)
 Checks if the provided type id is unique. More...
 
static void _checkForCircularReferences ()
 Iterates over all RTTI types and reports any circular references (for example one type having a field referencing another type, and that type having a field referencing the first type). More...
 
static RTTITypeBasegetRTTIStatic ()
 Returns an interface you can use to access class' Run Time Type Information. More...
 

Fields

INT16 value = 0
 

Method documentation

bool equals ( const SPtr< ManagedSerializableFieldData > &  other)
overridevirtual

Checks if the internal value stored in this object matches the value stored in another.

Does shallow comparison for complex objects.

Implements ManagedSerializableFieldData.

size_t getHash ( )
overridevirtual

Returns a hash value for the internally stored value.

Implements ManagedSerializableFieldData.

RTTITypeBase* getRTTI ( ) const
overridevirtual

Returns an interface you can use to access class' Run Time Type Information.

Note
You must derive your own version of RTTITypeBase, in which you may encapsulate all reflection specific operations.

Reimplemented from ManagedSerializableFieldData.

void* getValue ( const SPtr< ManagedSerializableTypeInfo > &  typeInfo)
overridevirtual

Returns the internal value.

Parameters
[in]typeInfoType of the data we're looking to retrieve. This isn't required for actually retrieving the data but is used as an extra check to ensure the field contains the data type we're looking for.
Returns
Pointer to the internal serialized data. Caller must ensure the pointer is cast to the proper type.

Implements ManagedSerializableFieldData.

MonoObject* getValueBoxed ( const SPtr< ManagedSerializableTypeInfo > &  typeInfo)
overridevirtual

Boxes the internal value and returns it.

Parameters
[in]typeInfoType of the data we're looking to retrieve. This isn't required for actually retrieving the data but is used as an extra check to ensure the field contains the data type we're looking for.
Returns
Boxed representation of the internal value.

Implements ManagedSerializableFieldData.