GeData Class Reference

#include <c4d_gedata.h>

Private Attributes

Int32 Type
 
Int32 dummy
 
union {
   Int32   DInteger
 
   Float   DReal
 
   void *   DVoid
 
   Vector *   DVector
 
   Matrix *   DMatrix
 
   Int64   DLLong
 
   String *   DString
 
   Filename *   DFilename
 
   GeMarker *   DMarker
 
   BaseTime *   DBaseTime
 
   BaseContainer *   DContainer
 
   ByteArray *   DArray
 
   BaseLink *   DAliasLink
 
   DCustom *   DCustomData
 
   MissingPluginData *   DMissingPlugin
 
}; 
 

Constructors/Destructors

 GeData ()
 
 GeData (const GeData &n)
 
 GeData (Int32 n)
 
 GeData (Float32 n)
 
 GeData (double n)
 
 GeData (void *n, VOIDVALUETYPE v)
 
 GeData (Int64 n, LLONGVALUETYPE v)
 
 GeData (const Vector &n)
 
 GeData (const Matrix &n)
 
 GeData (const Char *n)
 
 GeData (const String &n)
 
 GeData (const Filename &n)
 
 GeData (const GeMarker &n)
 
 GeData (const BaseTime &n)
 
 GeData (const BaseContainer &n)
 
 GeData (const ByteArray &n)
 
 GeData (const BaseLink &n)
 
 GeData (Int32 type, const CustomDataType &customdata)
 
 GeData (Int32 type, DEFAULTVALUETYPE v)
 
 ~GeData ()
 

Operators

const GeDataoperator= (const GeData &d)
 
Bool operator== (const GeData &d) const
 
Bool operator!= (const GeData &d) const
 

Init/Free

Bool InitType (Int32 type)
 
void Free ()
 

Get data

Int32 GetType () const
 
Bool GetBool () const
 
Int32 GetInt32 () const
 
Int64 GetInt64 () const
 
Float GetFloat () const
 
void * GetVoid () const
 
const VectorGetVector () const
 
const MatrixGetMatrix () const
 
const StringGetString () const
 
const FilenameGetFilename () const
 
CustomDataTypeGetCustomDataType (Int32 datatype) const
 
BaseContainerGetContainer () const
 
const ByteArrayGetByteArray () const
 
BaseLinkGetBaseLink () const
 
BaseList2DGetLink () const
 
const BaseTimeGetTime () const
 
void CopyData (GeData *dest, AliasTrans *aliastrans) const
 

Set data

void SetFloat (Float v)
 
void SetInt32 (Int32 v)
 
void SetInt64 (const Int64 &v)
 
void SetVoid (void *v)
 
void SetVector (const Vector &v)
 
void SetMatrix (const Matrix &v)
 
void SetString (const String &v)
 
void SetFilename (const Filename &v)
 
void SetMarker (const GeMarker &v)
 
void SetBaseTime (const BaseTime &v)
 
void SetContainer (const BaseContainer &v)
 
void SetByteArray (const ByteArray &v)
 
void SetBaseLink (const BaseLink &v)
 
void SetCustomDataType (Int32 datatype, const CustomDataType &v)
 

Read/Write

Bool Read (HyperFile *hf)
 
Bool Write (HyperFile *hf) const
 

Detailed Description

Represents any data inside a BaseContainer.

Constructor & Destructor Documentation

◆ GeData() [1/19]

GeData ( )

Default constructor.

◆ GeData() [2/19]

GeData ( const GeData n)

Copy constructor.

Parameters
[in]nThe data to copy.

◆ GeData() [3/19]

GeData ( Int32  n)

Creates an Int32 data.

Parameters
[in]nInitial Int32 value.

◆ GeData() [4/19]

GeData ( Float32  n)

Creates a Float32 data.

Parameters
[in]nInitial Float32 value.

◆ GeData() [5/19]

GeData ( double  n)

Creates a double data.

Parameters
[in]nInitial double value.

◆ GeData() [6/19]

GeData ( void *  n,
VOIDVALUETYPE  v 
)

Creates a void pointer data.

Parameters
[in]nInitial void pointer value.
[in]vDummy parameter. Should always be VOIDVALUE.

◆ GeData() [7/19]

GeData ( Int64  n,
LLONGVALUETYPE  v 
)

Creates an Int64 data.

Parameters
[in]nInitial Int64 value.
[in]vDummy parameter. Should always be LLONGVALUE.

◆ GeData() [8/19]

GeData ( const Vector n)

Creates a Vector data.

Parameters
[in]nInitial Vector value.

◆ GeData() [9/19]

GeData ( const Matrix n)

Creates a Matrix data.

Parameters
[in]nInitial Matrix value.

◆ GeData() [10/19]

GeData ( const Char n)

Creates a Char* data.

Parameters
[in]nInitial Char* value.

◆ GeData() [11/19]

GeData ( const String n)

Creates a String data.

Parameters
[in]nInitial String value.

◆ GeData() [12/19]

GeData ( const Filename n)

Creates a Filename data.

Parameters
[in]nInitial Filename value.

◆ GeData() [13/19]

GeData ( const GeMarker n)

Creates a GeMarker data.

Parameters
[in]nInitial GeMarker value.

◆ GeData() [14/19]

GeData ( const BaseTime n)

Creates a BaseTime data.

Parameters
[in]nInitial BaseTime value.

◆ GeData() [15/19]

GeData ( const BaseContainer n)

Creates a BaseContainer data.

Parameters
[in]nInitial BaseContainer value.

◆ GeData() [16/19]

GeData ( const ByteArray n)

Private.

◆ GeData() [17/19]

GeData ( const BaseLink n)

Creates a BaseLink data.

Parameters
[in]nInitial BaseLink value.

◆ GeData() [18/19]

GeData ( Int32  type,
const CustomDataType customdata 
)

Creates a data with a custom data type.

Parameters
[in]typeA custom data type ID.
[in]customdataInitial custom data value.

◆ GeData() [19/19]

GeData ( Int32  type,
DEFAULTVALUETYPE  v 
)

Creates a custom data type with the default value for the type.
The second parameter is simply a typing trick so that the compiler chooses this constructor:

Parameters
[in]typeA custom data type ID.
[in]vDummy parameter. Should always be DEFAULTVALUE.

◆ ~GeData()

~GeData ( )

Default destructor.

Member Function Documentation

◆ operator=()

const GeData& operator= ( const GeData d)

Assignment operator.

Parameters
[in]dThe right-hand operand data.
Returns
The data is assigned to the left-hand operand.

◆ operator==()

Bool operator== ( const GeData d) const

Equality operator.

Parameters
[in]dThe data to compare with.
Returns
true if the data equasl the right-hand operand data, otherwise false.

◆ operator!=()

Bool operator!= ( const GeData d) const

Not equality operator.

Parameters
[in]dThe data to compare with.
Returns
true if the data is different than the right-hand operand data, otherwise false.

◆ InitType()

Bool InitType ( Int32  type)

Initializes the data type.

Parameters
[in]typeThe type of the data: DA.
Returns
true if the data was successfully initialized, otherwise false.

◆ Free()

void Free ( )

Frees the internal data. Sets the type of the data to DA_NIL afterward.

◆ GetType()

Int32 GetType ( ) const

Gets the type of the data.

Returns
The type of the data: DA.

◆ GetBool()

Bool GetBool ( ) const

Gets the value of Bool data objects. Forbidden for other data.

Returns
The value.

◆ GetInt32()

Int32 GetInt32 ( ) const

Gets the value of Int32 data objects. Forbidden for other data.

Returns
The value.

◆ GetInt64()

Int64 GetInt64 ( ) const

Gets the value of Int64 data objects. Forbidden for other data.

Returns
The value.

◆ GetFloat()

Float GetFloat ( ) const

Gets the value of Float data. Forbidden for other data.

Returns
The value.

◆ GetVoid()

void* GetVoid ( ) const

Gets the value of void* data. Forbidden for other data.

Returns
The value.

◆ GetVector()

const Vector& GetVector ( ) const

Gets the value of Vector data. Forbidden for other data.

Returns
The value.

◆ GetMatrix()

const Matrix& GetMatrix ( ) const

Gets the value of Matrix data. Forbidden for other data.

Returns
The value.

◆ GetString()

const String& GetString ( ) const

Gets the value of String data. Forbidden for other data.

Returns
The value.

◆ GetFilename()

const Filename& GetFilename ( ) const

Gets the value of Filename data. Forbidden for other data.

Returns
The value.

◆ GetCustomDataType()

CustomDataType* GetCustomDataType ( Int32  datatype) const

Gets the value of custom data. Forbidden for other data.

Parameters
[in]datatypeThe type ID of the data to retrieve.
Returns
The value, or nullptr if the wrong datatype was specified. The data owns the pointed value.

◆ GetContainer()

BaseContainer* GetContainer ( ) const

Gets the value of BaseContainer data objects. Forbidden for other data.

Returns
The value.

◆ GetByteArray()

const ByteArray& GetByteArray ( ) const

Private.

◆ GetBaseLink()

BaseLink* GetBaseLink ( ) const

Gets the value of BaseLink data objects. Forbidden for other data.

Returns
The value.

◆ GetLink()

BaseList2D* GetLink ( ) const

Gets the value of BaseList2D data objects. Forbidden for other data.

Returns
The value.

◆ GetTime()

const BaseTime& GetTime ( ) const

Gets the value of BaseTime data objects. Forbidden for other data.

Returns
The value.

◆ CopyData()

void CopyData ( GeData dest,
AliasTrans aliastrans 
) const

Copies the data object to another with an alias translator for the links.

Parameters
[in]destThe destination data. The caller owns the pointed data.
[in]aliastransAn alias translator for the operation. Can be nullptr. The caller owns the pointed alias translator.

◆ SetFloat()

void SetFloat ( Float  v)

Sets the Float value and change the data type accordingly.

Parameters
[in]vThe value to set.

◆ SetInt32()

void SetInt32 ( Int32  v)

Sets the Int32 value and change the data type accordingly.

Parameters
[in]vThe value to set.

◆ SetInt64()

void SetInt64 ( const Int64 v)

Sets the Int64 value and change the data type accordingly.

Parameters
[in]vThe value to set.

◆ SetVoid()

void SetVoid ( void *  v)

Sets the void* value and change the data type accordingly.

Parameters
[in]vThe value to set.

◆ SetVector()

void SetVector ( const Vector v)

Sets the Vector value and change the data type accordingly.

Parameters
[in]vThe value to set.

◆ SetMatrix()

void SetMatrix ( const Matrix v)

Sets the Matrix value and change the data type accordingly.

Parameters
[in]vThe value to set.

◆ SetString()

void SetString ( const String v)

Sets the String value and change the data type accordingly.

Parameters
[in]vThe value to set.

◆ SetFilename()

void SetFilename ( const Filename v)

Sets the Filename value and change the data type accordingly.

Parameters
[in]vThe value to set.

◆ SetMarker()

void SetMarker ( const GeMarker v)

Sets the GeMarker value and change the data type accordingly.

Parameters
[in]vThe value to set.

◆ SetBaseTime()

void SetBaseTime ( const BaseTime v)

Sets the BaseTime value and change the data type accordingly.

Parameters
[in]vThe value to set.

◆ SetContainer()

void SetContainer ( const BaseContainer v)

Sets the BaseContainer value and change the data type accordingly.

Parameters
[in]vThe value to set.

◆ SetByteArray()

void SetByteArray ( const ByteArray v)

Private.

◆ SetBaseLink()

void SetBaseLink ( const BaseLink v)

Sets the BaseLink value and change the data type accordingly.

Parameters
[in]vThe value to set.

◆ SetCustomDataType()

void SetCustomDataType ( Int32  datatype,
const CustomDataType v 
)

Sets the custom data value and change the data type accordingly.

Parameters
[in]datatypeThe type ID of the data to set.
[in]vThe value to set.

◆ Read()

Bool Read ( HyperFile hf)

Reads the data from a hyper file.

Parameters
[in]hfThe hyper file to read from. The caller owns the pointed hyper file.
Returns
true if the data was read, otherwise false.

◆ Write()

Bool Write ( HyperFile hf) const

Writes the data to a hyper file.

Parameters
[in]hfThe hyper file to write to. The caller owns the pointed hyper file.
Returns
true if the data was written, otherwise false.

Member Data Documentation

◆ Type

Int32 Type
private

◆ dummy

Int32 dummy
private

◆ DInteger

Int32 DInteger

◆ DReal

Float DReal

◆ DVoid

void* DVoid

◆ DVector

Vector* DVector

◆ DMatrix

Matrix* DMatrix

◆ DLLong

Int64 DLLong

◆ DString

String* DString

◆ DFilename

Filename* DFilename

◆ DMarker

GeMarker* DMarker

◆ DBaseTime

BaseTime* DBaseTime

◆ DContainer

BaseContainer* DContainer

◆ DArray

ByteArray* DArray

◆ DAliasLink

BaseLink* DAliasLink

◆ DCustomData

DCustom* DCustomData

◆ DMissingPlugin

MissingPluginData* DMissingPlugin

◆ @6

union { ... }