HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_BundleReferences Class Reference

#include <OP_BundleReferences.h>

Public Member Functions

 OP_BundleReferences (OP_Node &owner)
 
 ~OP_BundleReferences ()
 
OP_BundlegetParmBundle (const char *parm_name, int vector_index, UT_String &pattern, OP_Network *creator, const char *filter)
 
void markAllUnused ()
 
void cleanUnused ()
 
void cleanAll ()
 Deletes all references. More...
 
const UT_Array< OP_BundleRef * > * getListOfRefs (const char *bundle_name) const
 
int64 getMemoryUsage (bool inclusive) const
 Estimates memory usage of the this object. More...
 
OP_BundlegetParmBundle (const char *parm_name, int vector_index, UT_String &pattern, OP_Network *creator, const char *filter, bool subnet_inclusion)
 

Detailed Description

Implementation of a manager that overlooks all the references to the bundles by a all parameters of an operator.

Definition at line 61 of file OP_BundleReferences.h.

Constructor & Destructor Documentation

OP_BundleReferences::OP_BundleReferences ( OP_Node owner)
OP_BundleReferences::~OP_BundleReferences ( )

Member Function Documentation

void OP_BundleReferences::cleanAll ( )

Deletes all references.

void OP_BundleReferences::cleanUnused ( )

Deletes all references whose used flag is false. Usually preceeded by markAllUnused, and a series of getParmBundle to identify and delete obsolete references.

const UT_Array<OP_BundleRef *>* OP_BundleReferences::getListOfRefs ( const char *  bundle_name) const

Obtains a list of bundle references. Given a bundle name, this method returns all parameters that reference that bundle.

int64 OP_BundleReferences::getMemoryUsage ( bool  inclusive) const

Estimates memory usage of the this object.

OP_Bundle* OP_BundleReferences::getParmBundle ( const char *  parm_name,
int  vector_index,
UT_String pattern,
OP_Network creator,
const char *  filter 
)

Obtains a bundle defined by an operator pattern and filter using the creator and myOwner as relative_to nodes (much like OP_BundleList), and then associates this bundle with a parameter defined by a name and index.

The bundle references by this parameter are updated (ie, bundle previously referenced by this parm is dereferenced, and a reference count of the new bundle (which is returned) is bumped up.

The also and interest is registered with the bundle for myOwner node (much like OP_BundleList::getPattern() does.

The bundle reference used flag is set to true for that parm/index pair.

OP_Bundle* OP_BundleReferences::getParmBundle ( const char *  parm_name,
int  vector_index,
UT_String pattern,
OP_Network creator,
const char *  filter,
bool  subnet_inclusion 
)

Obtains a bundle defined by an operator pattern with or without subnet_inclusion

void OP_BundleReferences::markAllUnused ( )

Marks all the references as unused. Usually followed by cleanUnused() to delete the references that no longer exist.


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