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

#include <PRM_Name.h>

+ Inheritance diagram for PRM_Name:

Public Types

enum  PRM_NameCopy { COPY }
 

Public Member Functions

 PRM_Name ()
 Default PRM_Name constructor is a sentinel value. More...
 
 PRM_Name (const char *thetoken, const char *thelabel=nullptr, int theflags=0)
 
 PRM_Name (PRM_NameCopy, const UT_StringHolder &thetoken, const UT_StringHolder &thelabel, int theflags=0)
 Constructor for doing deep copies of the strings. More...
 
bool isSentinel () const
 Check if this is a sentinel. More...
 
void setAsSentinel ()
 Set to a sentinel value. More...
 
void setAsSeparator ()
 Set to a separator value. More...
 
const char * getToken () const
 
const char * getLabel () const
 
int getExpressionFlag () const
 
unsigned getHash () const
 
const UT_StringRefgetTokenRef () const
 Use this for hash tables, might be the sentinel value. More...
 
const UT_StringRefgetLabelRef () const
 Get label UT_StringRef &, might be the sentinel value. More...
 
void harden ()
 Do a deep copy of its internal references. More...
 
void setToken (const char *s)
 Sets the token, doing a deep copy. More...
 
void setLabel (const char *s)
 Sets the label, doing a deep copy. More...
 
void setTokenAndLabel (const char *token, const char *label)
 Sets the token and label, doing deep copies. More...
 
void setTokenAndLabelRef (const UT_StringRef &token, const UT_StringRef &label)
 
void instance (const int *instance, int num)
 
void instance (const UT_IntArray &instance_num)
 
bool isValidChoice () const
 Returns if this a valid menu choice. More...
 
int64 getMemoryUsage (bool inclusive) const
 

Static Public Member Functions

static void instanceToken (UT_String &token, const int *instance, int num)
 
static void instanceToken (UT_String &token, const UT_IntArray &instance_num)
 
static void instanceToken (UT_WorkBuffer &result, const UT_StringRef &token, const int *instance, int num)
 
static void instanceToken (UT_WorkBuffer &result, const UT_StringRef &token, const UT_IntArray &instance_num)
 

Static Public Attributes

static const char *const mySeparator
 

Detailed Description

Member Enumeration Documentation

Enumerator
COPY 

Definition at line 54 of file PRM_Name.h.

Constructor & Destructor Documentation

PRM_Name::PRM_Name ( )
inline

Default PRM_Name constructor is a sentinel value.

Definition at line 29 of file PRM_Name.h.

PRM_Name::PRM_Name ( const char *  thetoken,
const char *  thelabel = nullptr,
int  theflags = 0 
)
inlineexplicit

If thelabel is set to 0, then the thetoken is used as the label. Currently the flags parameter is only used for the parm expression flag. Set theflags to 1 to make the parm default to expression mode.

Note
This constructor will only REFERENCE the given strings

Definition at line 41 of file PRM_Name.h.

PRM_Name::PRM_Name ( PRM_NameCopy  ,
const UT_StringHolder thetoken,
const UT_StringHolder thelabel,
int  theflags = 0 
)
inlineexplicit

Constructor for doing deep copies of the strings.

Definition at line 57 of file PRM_Name.h.

Member Function Documentation

int PRM_Name::getExpressionFlag ( void  ) const
inline

Definition at line 91 of file PRM_Name.h.

unsigned PRM_Name::getHash ( ) const
inline

Definition at line 92 of file PRM_Name.h.

const char* PRM_Name::getLabel ( ) const
inline

Definition at line 87 of file PRM_Name.h.

const UT_StringRef& PRM_Name::getLabelRef ( ) const
inline

Get label UT_StringRef &, might be the sentinel value.

Definition at line 98 of file PRM_Name.h.

int64 PRM_Name::getMemoryUsage ( bool  inclusive) const
inline

Definition at line 155 of file PRM_Name.h.

const char* PRM_Name::getToken ( ) const
inline
Examples:
CHOP/CHOP_Stair.C, DOP/DOP_GroupAndApply.C, and LOP/LOP_Sphere.C.

Definition at line 83 of file PRM_Name.h.

const UT_StringRef& PRM_Name::getTokenRef ( ) const
inline

Use this for hash tables, might be the sentinel value.

Definition at line 95 of file PRM_Name.h.

void PRM_Name::harden ( )
inline

Do a deep copy of its internal references.

Examples:
OBJ/OBJ_WorldAlign.C.

Definition at line 101 of file PRM_Name.h.

void PRM_Name::instance ( const int instance,
int  num 
)
void PRM_Name::instance ( const UT_IntArray instance_num)
static void PRM_Name::instanceToken ( UT_String token,
const int instance,
int  num 
)
static
static void PRM_Name::instanceToken ( UT_String token,
const UT_IntArray instance_num 
)
static
static void PRM_Name::instanceToken ( UT_WorkBuffer result,
const UT_StringRef token,
const int instance,
int  num 
)
static
static void PRM_Name::instanceToken ( UT_WorkBuffer result,
const UT_StringRef token,
const UT_IntArray instance_num 
)
static
bool PRM_Name::isSentinel ( ) const
inline

Check if this is a sentinel.

Definition at line 68 of file PRM_Name.h.

bool PRM_Name::isValidChoice ( ) const
inline

Returns if this a valid menu choice.

Definition at line 148 of file PRM_Name.h.

void PRM_Name::setAsSentinel ( )
inline

Set to a sentinel value.

Definition at line 74 of file PRM_Name.h.

void PRM_Name::setAsSeparator ( )

Set to a separator value.

void PRM_Name::setLabel ( const char *  s)
inline

Sets the label, doing a deep copy.

Examples:
SOP/SOP_CopRaster.C.

Definition at line 115 of file PRM_Name.h.

void PRM_Name::setToken ( const char *  s)
inline

Sets the token, doing a deep copy.

Examples:
SOP/SOP_CopRaster.C.

Definition at line 109 of file PRM_Name.h.

void PRM_Name::setTokenAndLabel ( const char *  token,
const char *  label 
)
inline

Sets the token and label, doing deep copies.

Definition at line 121 of file PRM_Name.h.

void PRM_Name::setTokenAndLabelRef ( const UT_StringRef token,
const UT_StringRef label 
)
inline

Sets the token and label, doing shallow copies.

Note
There's no way to use this method to set sentinels, use setTokenAndLabel(nullptr, nullptr) instead.

Definition at line 129 of file PRM_Name.h.

Member Data Documentation

const char* const PRM_Name::mySeparator
static

Definition at line 163 of file PRM_Name.h.


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