Provides information about a parameter. More...
#include <NvParameterized.h>
Public Member Functions | |
virtual | ~Definition () |
Destructor. | |
virtual void | destroy ()=0 |
Destroys the Definition object and all nested dynamic objects contained within. | |
virtual int32_t | numHints (void) const =0 |
Returns the number of hints in the parameter Definition. | |
virtual const Hint * | hint (int32_t index) const =0 |
Returns the Hint located at the index. | |
virtual const Hint * | hint (const char *name) const =0 |
Returns the Hint that matches the input name. | |
virtual void | setHints (const Hint **hints, int32_t n)=0 |
Store parameter hints. | |
virtual void | addHint (Hint *hint)=0 |
Add parameter hint. | |
virtual const Definition * | parent (void) const =0 |
Returns this Definition's parent Definition. | |
virtual const Definition * | root (void) const =0 |
Returns this Definition's top most ancestor. | |
virtual const char * | name (void) const =0 |
Returns the name of the parameter. | |
virtual const char * | longName (void) const =0 |
Returns the long name of the parameter If the parameter is a member of a struct or an array the long name will contain these parent names. | |
virtual const char * | structName (void) const =0 |
Returns the name of parameter's struct type. | |
virtual DataType | type (void) const =0 |
Returns the parameter type. | |
virtual const char * | typeString () const =0 |
Return the parameter type in string form. | |
virtual int32_t | numRefVariants (void) const =0 |
Returns the number of variants this parameter could be A reference is sometimes a union of different types, each different type is referred to as a "variant". Variants can be used in either included or named references. | |
virtual int32_t | refVariantValIndex (const char *ref_val) const =0 |
Given the ref variant name, get its val index. | |
virtual const char * | refVariantVal (int32_t index) const =0 |
Get the string value of the reference variant. | |
virtual int32_t | numEnumVals (void) const =0 |
Returns the number of enums for the parameter. | |
virtual int32_t | enumValIndex (const char *enum_val) const =0 |
Given the enum string, get the enum val index. | |
virtual const char * | enumVal (int32_t index) const =0 |
Returns the Enum string located at the index. | |
virtual void | setEnumVals (const char **enum_vals, int32_t n)=0 |
Store possible enum values for TYPE_ENUM parameter. | |
virtual void | addEnumVal (const char *enum_val)=0 |
Add new enum value to a list of possible enum values for TYPE_ENUM parameter. | |
virtual uint32_t | alignment (void) const =0 |
Returns custom alignment if parameter uses it; otherwise returns 0. | |
virtual uint32_t | padding (void) const =0 |
Returns custom padding if parameter uses it; otherwise returns 0. | |
virtual int32_t | arrayDimension (void) const =0 |
Returns the number of dimensions of a static array. | |
virtual int32_t | arraySize (int32_t dimension=0) const =0 |
Returns the array size of a static array. | |
virtual bool | arraySizeIsFixed (void) const =0 |
Used to determine if an array is static or dynamic. | |
virtual bool | setArraySize (int32_t size)=0 |
Set size of static array. | |
virtual bool | isLeaf (void) const =0 |
Used to determine if parameter is aggregate (TYPE_STRUCT or TYPE_ARRAY) or not. | |
virtual bool | isIncludedRef (void) const =0 |
Used to determine if reference is included or not. | |
virtual int32_t | numChildren (void) const =0 |
Returns the number of children (for a struct or static array) | |
virtual const Definition * | child (int32_t index) const =0 |
Access definition of i-th child parameter. | |
virtual const Definition * | child (const char *name, int32_t &index) const =0 |
Access definition of child parameter with given name. | |
virtual void | setChildren (Definition **children, int32_t n)=0 |
Store definitions of child parameters. | |
virtual void | addChild (Definition *child)=0 |
Add definition of one morechild parameter. | |
virtual void | setDynamicHandleIndicesMap (const uint8_t *indices, uint32_t numIndices)=0 |
Set indices of child handles which must be released when downsizing array. | |
virtual const uint8_t * | getDynamicHandleIndicesMap (uint32_t &outNumIndices) const =0 |
Get indices of child handles which must be released when downsizing array. | |
virtual bool | isSimpleType (bool simpleStructs=true, bool simpleStrings=true) const =0 |
Used to determine whether type is not an aggregate (array, ref or struct) |
Detailed Description
Provides information about a parameter.
Member Function Documentation
virtual void NvParameterized::Definition::addChild | ( | Definition * | child | ) | [pure virtual] |
Add definition of one morechild parameter.
- Warning:
- Only for internal use
virtual void NvParameterized::Definition::addEnumVal | ( | const char * | enum_val | ) | [pure virtual] |
Add new enum value to a list of possible enum values for TYPE_ENUM parameter.
- Warning:
- Only for internal use
virtual void NvParameterized::Definition::addHint | ( | Hint * | hint | ) | [pure virtual] |
Add parameter hint.
- Warning:
- Only for internal use
virtual int32_t NvParameterized::Definition::arraySize | ( | int32_t | dimension = 0 | ) | const [pure virtual] |
Returns the array size of a static array.
- Returns:
- 0 for dynamic arrays
virtual const Definition* NvParameterized::Definition::child | ( | const char * | name, |
int32_t & | index | ||
) | const [pure virtual] |
Access definition of child parameter with given name.
- Warning:
- Only used with TYPE_STRUCT
virtual const char* NvParameterized::Definition::enumVal | ( | int32_t | index | ) | const [pure virtual] |
Returns the Enum string located at the index.
- Returns:
- NULL if index >= Hint::numEnumVals()
virtual int32_t NvParameterized::Definition::enumValIndex | ( | const char * | enum_val | ) | const [pure virtual] |
Given the enum string, get the enum val index.
- Returns:
- -1 if input enum_val is not found
virtual const Hint* NvParameterized::Definition::hint | ( | const char * | name | ) | const [pure virtual] |
Returns the Hint that matches the input name.
- Returns:
- NULL if name does not match any of the Definition's hints
virtual const Hint* NvParameterized::Definition::hint | ( | int32_t | index | ) | const [pure virtual] |
Returns the Hint located at the index.
- Returns:
- NULL if index >= Hint::numHints()
virtual bool NvParameterized::Definition::isSimpleType | ( | bool | simpleStructs = true , |
bool | simpleStrings = true |
||
) | const [pure virtual] |
Used to determine whether type is not an aggregate (array, ref or struct)
- Parameters:
-
[in] simpleStructs structure of simple types is also considered simple [in] simpleStrings strings are considered simple
virtual const Definition* NvParameterized::Definition::parent | ( | void | ) | const [pure virtual] |
Returns this Definition's parent Definition.
- Returns:
- NULL if at the top level
virtual int32_t NvParameterized::Definition::refVariantValIndex | ( | const char * | ref_val | ) | const [pure virtual] |
Given the ref variant name, get its val index.
- Returns:
- -1 if input ref_val is not found
virtual bool NvParameterized::Definition::setArraySize | ( | int32_t | size | ) | [pure virtual] |
Set size of static array.
- Warning:
- Only for internal use
virtual void NvParameterized::Definition::setChildren | ( | Definition ** | children, |
int32_t | n | ||
) | [pure virtual] |
Store definitions of child parameters.
- Warning:
- Only for internal use
virtual void NvParameterized::Definition::setEnumVals | ( | const char ** | enum_vals, |
int32_t | n | ||
) | [pure virtual] |
Store possible enum values for TYPE_ENUM parameter.
- Warning:
- Only for internal use
virtual void NvParameterized::Definition::setHints | ( | const Hint ** | hints, |
int32_t | n | ||
) | [pure virtual] |
Store parameter hints.
- Warning:
- Only for internal use
virtual const char* NvParameterized::Definition::structName | ( | void | ) | const [pure virtual] |
Returns the name of parameter's struct type.
- Returns:
- NULL if not struct
The documentation for this class was generated from the following file:
Generated on Fri Dec 15 2017 13:58:41
Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.