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...
 
SYS_FORCE_INLINE bool conditionalAddRef () noexcept
 

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 545 of file SOP_BouncyAgent.C.

Constructor & Destructor Documentation

GU_BouncyAgentCustomData::GU_BouncyAgentCustomData ( )
inline

Definition at line 548 of file SOP_BouncyAgent.C.

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

Definition at line 550 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 555 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 560 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 565 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 578 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 572 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 607 of file SOP_BouncyAgent.C.

int GU_BouncyAgentCustomData::value ( ) const
inline

Definition at line 573 of file SOP_BouncyAgent.C.


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