HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_BouncyAgentCustomData Class Reference
+ Inheritance diagram for GU_BouncyAgentCustomData:

Public Member Functions

 GU_BouncyAgentCustomData ()
 
 GU_BouncyAgentCustomData (const UT_StringHolder &name, int value)
 
const UT_StringHolderdataItemType () const override
 
int64 getMemoryUsage (bool inclusive) const override
 The amount of memory used by this item. More...
 
const UT_StringHoldername () const override
 
int value () const
 
bool load (UT_JSONParser &p) override
 
bool save (UT_JSONWriter &w) const override
 
- Public Member Functions inherited from GU_AgentCustomDataItem
virtual ~GU_AgentCustomDataItem ()=default
 
- Public Member Functions inherited from UT_IntrusiveRefCounter< GU_AgentCustomDataItem >
SYS_FORCE_INLINE UT_IntrusiveRefCounter () noexcept
 Default constructor: Sets counter to 0. More...
 
SYS_FORCE_INLINE UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &) noexcept
 Copy constructor: Sets counter to 0. More...
 
UT_IntrusiveRefCounteroperator= (const UT_IntrusiveRefCounter &) noexcept
 Assignment operator: Does not modify counter. More...
 
SYS_FORCE_INLINE uint32 use_count () const noexcept
 Return current counter. More...
 

Static Public Member Functions

static GU_AgentCustomDataItemPtr construct (const GU_AgentDefinition &)
 

Additional Inherited Members

- Protected Member Functions inherited from UT_IntrusiveRefCounter< GU_AgentCustomDataItem >
SYS_FORCE_INLINE ~UT_IntrusiveRefCounter ()
 Destructor: Only derived classes can destruct this. More...
 

Detailed Description

Example implementation of a custom data item that can be added to a GU_AgentDefinition.

Examples:
SOP/SOP_BouncyAgent.C.

Definition at line 534 of file SOP_BouncyAgent.C.

Constructor & Destructor Documentation

GU_BouncyAgentCustomData::GU_BouncyAgentCustomData ( )
inline

Definition at line 537 of file SOP_BouncyAgent.C.

GU_BouncyAgentCustomData::GU_BouncyAgentCustomData ( const UT_StringHolder name,
int  value 
)
inline

Definition at line 539 of file SOP_BouncyAgent.C.

Member Function Documentation

static GU_AgentCustomDataItemPtr GU_BouncyAgentCustomData::construct ( const GU_AgentDefinition )
inlinestatic
Examples:
SOP/SOP_BouncyAgent.C.

Definition at line 544 of file SOP_BouncyAgent.C.

const UT_StringHolder& GU_BouncyAgentCustomData::dataItemType ( ) const
inlineoverridevirtual

Unique identifier for the data item type, used when serializing to a geometry file. This should correspond to the identifier passed to GU_AgentDefinition::registerCustomDataItemType().

Implements GU_AgentCustomDataItem.

Definition at line 549 of file SOP_BouncyAgent.C.

int64 GU_BouncyAgentCustomData::getMemoryUsage ( bool  inclusive) const
inlineoverridevirtual

The amount of memory used by this item.

Implements GU_AgentCustomDataItem.

Definition at line 554 of file SOP_BouncyAgent.C.

bool GU_BouncyAgentCustomData::load ( UT_JSONParser p)
inlineoverridevirtual

Implements serialization to and from JSON. For debugging, save to an ASCII (.geo) geometry file.

Implements GU_AgentCustomDataItem.

Definition at line 567 of file SOP_BouncyAgent.C.

const UT_StringHolder& GU_BouncyAgentCustomData::name ( ) const
inlineoverridevirtual

Name of the data item, used by GU_AgentDefinition when inserting or search for an item. This varies per instance, unlike dataItemType().

Implements GU_AgentCustomDataItem.

Definition at line 561 of file SOP_BouncyAgent.C.

bool GU_BouncyAgentCustomData::save ( UT_JSONWriter w) const
inlineoverridevirtual

Implements serialization to and from JSON. For debugging, save to an ASCII (.geo) geometry file.

Implements GU_AgentCustomDataItem.

Definition at line 596 of file SOP_BouncyAgent.C.

int GU_BouncyAgentCustomData::value ( ) const
inline

Definition at line 562 of file SOP_BouncyAgent.C.


The documentation for this class was generated from the following file: