Represents the interface to the NvParameterized object. More...
#include <NvParameterized.h>
Public Member Functions | |
| virtual | ~Interface () |
| Destructor. | |
| virtual void | destroy ()=0 |
| Destroys the NvParameterized object and all nested dynamic objects contained within. | |
| virtual void | initDefaults (void)=0 |
| Initializes all parameters to their default value. | |
| virtual void | initRandom (void)=0 |
| Initializes all parameters with random values. | |
| virtual const char * | className (void) const =0 |
| Get the class name. | |
| virtual void | setClassName (const char *name)=0 |
| Sets the class name. | |
| virtual const char * | name (void) const =0 |
| Get the name of the NvParameterized object This method is used for named references. The name will typically specify an asset to be loaded. | |
| virtual void | setName (const char *name)=0 |
| Set the name of the NvParameterized object This method is used for named references. The name will typically specify an asset to be loaded. | |
| virtual uint32_t | version (void) const =0 |
| Get the class version. | |
| virtual uint16_t | getMajorVersion (void) const =0 |
| Get the major part of class version. | |
| virtual uint16_t | getMinorVersion (void) const =0 |
| Get the minor part of class version. | |
| virtual const uint32_t * | checksum (uint32_t &bits) const =0 |
| Get the class checksum. | |
| virtual int32_t | numParameters (void)=0 |
| Get the number of parameters contained in the NvParameterized object. | |
| virtual const Definition * | parameterDefinition (int32_t index)=0 |
| Get the definition of i-th parameter. | |
| virtual const Definition * | rootParameterDefinition (void)=0 |
| Get definition of root structure. | |
| virtual const Definition * | rootParameterDefinition (void) const =0 |
| Get definition of root structure. | |
| virtual ErrorType | getParameterHandle (const char *longName, Handle &handle) const =0 |
| Set the Handle to point to the parameter specified by longName Given a long name like "mystruct.somearray[10].foo", it will return a handle to that specific parameter. The handle can then be used to set/get values, as long as it's a handle to a leaf node. | |
| virtual ErrorType | getParameterHandle (const char *longName, Handle &handle)=0 |
| Set the Handle to point to the parameter specified by longName Given a long name like "mystruct.somearray[10].foo", it will return a handle to that specific parameter. The handle can then be used to set/get values, as long as it's a handle to a leaf node. | |
| virtual void | setSerializationCallback (SerializationCallback *cb, void *userData=NULL)=0 |
| An application may set a callback function that is called immediately before serialization. | |
| virtual ErrorType | callPreSerializeCallback () const =0 |
| Called prior by Serializer to serialization. | |
| virtual bool | equals (const ::NvParameterized::Interface &obj, Handle *handlesOfInequality=NULL, uint32_t numHandlesOfInequality=0, bool doCompareNotSerialized=true) const =0 |
| Compares two NvParameterized objects. | |
| virtual bool | areParamsOK (Handle *invalidHandles=NULL, uint32_t numInvalidHandles=0)=0 |
| Checks if object satisfies schema constraints. | |
| virtual ErrorType | copy (const ::NvParameterized::Interface &src)=0 |
| Copies an NvParameterized object. | |
| virtual ErrorType | clone (Interface *&nullDestObject) const =0 |
| Clones an NvParameterized object. | |
| virtual bool | checkAlignments () const =0 |
| Check that alignments of internal elements match the schema. | |
Protected Member Functions | |
| virtual ErrorType | initParamRef (const Handle &handle, const char *chosenRefStr=0, bool doDestroyOld=false)=0 |
| Initialize a Reference parameter. | |
| virtual ErrorType | getParamBool (const Handle &handle, bool &val) const =0 |
| Get param. | |
| virtual ErrorType | setParamBool (const Handle &handle, bool val)=0 |
| Set param. | |
| virtual ErrorType | getParamBoolArray (const Handle &handle, bool *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamBoolArray (const Handle &handle, const bool *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | getParamString (const Handle &handle, const char *&val) const =0 |
| Get param. | |
| virtual ErrorType | setParamString (const Handle &handle, const char *val)=0 |
| Set param. | |
| virtual ErrorType | getParamStringArray (const Handle &handle, char **array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamStringArray (const Handle &handle, const char **array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | getParamEnum (const Handle &handle, const char *&val) const =0 |
| Get param. | |
| virtual ErrorType | setParamEnum (const Handle &handle, const char *val)=0 |
| Set param. | |
| virtual ErrorType | getParamEnumArray (const Handle &handle, char **array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamEnumArray (const Handle &handle, const char **array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | getParamRef (const Handle &handle,::NvParameterized::Interface *&val) const =0 |
| Get param. | |
| virtual ErrorType | getParamRefArray (const Handle &handle,::NvParameterized::Interface **array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamRef (const Handle &handle,::NvParameterized::Interface *val, bool doDestroyOld=false)=0 |
| virtual ErrorType | setParamRefArray (const Handle &handle,::NvParameterized::Interface **array, int32_t n, int32_t offset=0, bool doDestroyOld=false)=0 |
| virtual ErrorType | getParamI8 (const Handle &handle, int8_t &val) const =0 |
| Get param. | |
| virtual ErrorType | setParamI8 (const Handle &handle, int8_t val)=0 |
| Set param. | |
| virtual ErrorType | getParamI8Array (const Handle &handle, int8_t *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamI8Array (const Handle &handle, const int8_t *val, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | getParamI16 (const Handle &handle, int16_t &val) const =0 |
| Get param. | |
| virtual ErrorType | setParamI16 (const Handle &handle, int16_t val)=0 |
| Set param. | |
| virtual ErrorType | getParamI16Array (const Handle &handle, int16_t *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamI16Array (const Handle &handle, const int16_t *val, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | getParamI32 (const Handle &handle, int32_t &val) const =0 |
| Get param. | |
| virtual ErrorType | setParamI32 (const Handle &handle, int32_t val)=0 |
| Set param. | |
| virtual ErrorType | getParamI32Array (const Handle &handle, int32_t *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamI32Array (const Handle &handle, const int32_t *val, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | getParamI64 (const Handle &handle, int64_t &val) const =0 |
| Get param. | |
| virtual ErrorType | setParamI64 (const Handle &handle, int64_t val)=0 |
| Set param. | |
| virtual ErrorType | getParamI64Array (const Handle &handle, int64_t *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamI64Array (const Handle &handle, const int64_t *val, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | getParamU8 (const Handle &handle, uint8_t &val) const =0 |
| Get param. | |
| virtual ErrorType | setParamU8 (const Handle &handle, uint8_t val)=0 |
| Set param. | |
| virtual ErrorType | getParamU8Array (const Handle &handle, uint8_t *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamU8Array (const Handle &handle, const uint8_t *val, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | getParamU16 (const Handle &handle, uint16_t &val) const =0 |
| Get param. | |
| virtual ErrorType | setParamU16 (const Handle &handle, uint16_t val)=0 |
| Set param. | |
| virtual ErrorType | getParamU16Array (const Handle &handle, uint16_t *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamU16Array (const Handle &handle, const uint16_t *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | getParamU32 (const Handle &handle, uint32_t &val) const =0 |
| Get param. | |
| virtual ErrorType | setParamU32 (const Handle &handle, uint32_t val)=0 |
| Set param. | |
| virtual ErrorType | getParamU32Array (const Handle &handle, uint32_t *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamU32Array (const Handle &handle, const uint32_t *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | getParamU64 (const Handle &handle, uint64_t &val) const =0 |
| Get param. | |
| virtual ErrorType | setParamU64 (const Handle &handle, uint64_t val)=0 |
| Set param. | |
| virtual ErrorType | getParamU64Array (const Handle &handle, uint64_t *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamU64Array (const Handle &handle, const uint64_t *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | getParamF32 (const Handle &handle, float &val) const =0 |
| Get param. | |
| virtual ErrorType | setParamF32 (const Handle &handle, float val)=0 |
| Set param. | |
| virtual ErrorType | getParamF32Array (const Handle &handle, float *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamF32Array (const Handle &handle, const float *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | getParamF64 (const Handle &handle, double &val) const =0 |
| Get param. | |
| virtual ErrorType | setParamF64 (const Handle &handle, double val)=0 |
| Set param. | |
| virtual ErrorType | getParamF64Array (const Handle &handle, double *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamF64Array (const Handle &handle, const double *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | setParamVec2 (const Handle &handle, const physx::PxVec2 &val)=0 |
| Set param. | |
| virtual ErrorType | getParamVec2 (const Handle &handle, physx::PxVec2 &val) const =0 |
| Get param. | |
| virtual ErrorType | getParamVec2Array (const Handle &handle, physx::PxVec2 *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamVec2Array (const Handle &handle, const physx::PxVec2 *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | setParamVec3 (const Handle &handle, const physx::PxVec3 &val)=0 |
| Set param. | |
| virtual ErrorType | getParamVec3 (const Handle &handle, physx::PxVec3 &val) const =0 |
| Get param. | |
| virtual ErrorType | getParamVec3Array (const Handle &handle, physx::PxVec3 *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamVec3Array (const Handle &handle, const physx::PxVec3 *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | setParamVec4 (const Handle &handle, const physx::PxVec4 &val)=0 |
| Set param. | |
| virtual ErrorType | getParamVec4 (const Handle &handle, physx::PxVec4 &val) const =0 |
| Get param. | |
| virtual ErrorType | getParamVec4Array (const Handle &handle, physx::PxVec4 *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamVec4Array (const Handle &handle, const physx::PxVec4 *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | setParamQuat (const Handle &handle, const physx::PxQuat &val)=0 |
| Set param. | |
| virtual ErrorType | getParamQuat (const Handle &handle, physx::PxQuat &val) const =0 |
| Get param. | |
| virtual ErrorType | getParamQuatArray (const Handle &handle, physx::PxQuat *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamQuatArray (const Handle &handle, const physx::PxQuat *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | setParamMat33 (const Handle &handle, const physx::PxMat33 &val)=0 |
| Set param. | |
| virtual ErrorType | getParamMat33 (const Handle &handle, physx::PxMat33 &val) const =0 |
| Get param. | |
| virtual ErrorType | getParamMat33Array (const Handle &handle, physx::PxMat33 *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamMat33Array (const Handle &handle, const physx::PxMat33 *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | setParamMat44 (const Handle &handle, const physx::PxMat44 &val)=0 |
| Set param. | |
| virtual ErrorType | getParamMat44 (const Handle &handle, physx::PxMat44 &val) const =0 |
| Get param. | |
| virtual ErrorType | getParamMat44Array (const Handle &handle, physx::PxMat44 *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamMat44Array (const Handle &handle, const physx::PxMat44 *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | setParamMat34Legacy (const Handle &handle, const float(&val)[12])=0 |
| Set param. | |
| virtual ErrorType | getParamMat34Legacy (const Handle &handle, float(&val)[12]) const =0 |
| Get param. | |
| virtual ErrorType | getParamMat34LegacyArray (const Handle &handle, float *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamMat34LegacyArray (const Handle &handle, const float *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | setParamBounds3 (const Handle &handle, const physx::PxBounds3 &val)=0 |
| Set param. | |
| virtual ErrorType | getParamBounds3 (const Handle &handle, physx::PxBounds3 &val) const =0 |
| Get param. | |
| virtual ErrorType | getParamBounds3Array (const Handle &handle, physx::PxBounds3 *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamTransform (const Handle &handle, const physx::PxTransform &val)=0 |
| Set param. | |
| virtual ErrorType | getParamTransform (const Handle &handle, physx::PxTransform &val) const =0 |
| Get param. | |
| virtual ErrorType | getParamTransformArray (const Handle &handle, physx::PxTransform *array, int32_t n, int32_t offset=0) const =0 |
| Get param. | |
| virtual ErrorType | setParamTransformArray (const Handle &handle, const physx::PxTransform *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | setParamBounds3Array (const Handle &handle, const physx::PxBounds3 *array, int32_t n, int32_t offset=0)=0 |
| Set param. | |
| virtual ErrorType | valueToStr (const Handle &handle, char *buf, uint32_t bufSize, const char *&ret)=0 |
| Store value of parameter into a string. | |
| virtual ErrorType | strToValue (Handle &handle, const char *str, const char **endptr)=0 |
| Read value of parameter from string. | |
| virtual ErrorType | resizeArray (const Handle &array_handle, int32_t new_size)=0 |
| Resize array parameter. | |
| virtual ErrorType | getArraySize (const Handle &array_handle, int32_t &size, int32_t dimension=0) const =0 |
| Get size of array parameter. | |
| virtual ErrorType | swapArrayElements (const Handle &array_handle, uint32_t firstElement, uint32_t secondElement)=0 |
| Swap two elements of an array. | |
Friends | |
| class | Handle |
Detailed Description
Represents the interface to the NvParameterized object.
Member Function Documentation
| virtual bool NvParameterized::Interface::areParamsOK | ( | Handle * | invalidHandles = NULL, |
| uint32_t | numInvalidHandles = 0 |
||
| ) | [pure virtual] |
Checks if object satisfies schema constraints.
- Parameters:
-
[out] invalidHandles If the return value is False, these handles will contain the path to invalid data [in] numInvalidHandles The number of handles that can be written to.
- Returns:
- true if all values satisfy constraints
| virtual bool NvParameterized::Interface::checkAlignments | ( | ) | const [pure virtual] |
Check that alignments of internal elements match the schema.
- Warning:
- Only for internal use
| virtual const uint32_t* NvParameterized::Interface::checksum | ( | uint32_t & | bits | ) | const [pure virtual] |
Get the class checksum.
- Parameters:
-
bits contains the number of bits contained in the checksum
- Returns:
- A pointer to a constant array of uint32_t values representing the checksum
| virtual ErrorType NvParameterized::Interface::clone | ( | Interface *& | nullDestObject | ) | const [pure virtual] |
Clones an NvParameterized object.
- Parameters:
-
[out] nullDestObject cloned object; note this is a *reference* to a pointer; the destination cloned object will be created and stored in this pointer; should be NULL on entry!
| virtual ErrorType NvParameterized::Interface::copy | ( | const ::NvParameterized::Interface & | src | ) | [pure virtual] |
Copies an NvParameterized object.
- Parameters:
-
[in] src the src NvParameterized object will be copied to this object. It must be of the same type (class name).
| virtual bool NvParameterized::Interface::equals | ( | const ::NvParameterized::Interface & | obj, |
| Handle * | handlesOfInequality = NULL, |
||
| uint32_t | numHandlesOfInequality = 0, |
||
| bool | doCompareNotSerialized = true |
||
| ) | const [pure virtual] |
Compares two NvParameterized objects.
- Parameters:
-
[in] obj The other NvParameterized::Interface object (this == obj) [out] handlesOfInequality If the return value is False, these handles will contain the path to where definition or data is not identical [in] numHandlesOfInequality The number of handles that can be written to. [in] doCompareNotSerialized If false differences of parameters with DONOTSERIALIZE-hint are ignored.
- Returns:
- true if parameter definition tree is equal as well as parameter values
| virtual ErrorType NvParameterized::Interface::getArraySize | ( | const Handle & | array_handle, |
| int32_t & | size, | ||
| int32_t | dimension = 0 |
||
| ) | const [protected, pure virtual] |
Get size of array parameter.
- See also:
- Handle::getArraySize
| virtual ErrorType NvParameterized::Interface::getParameterHandle | ( | const char * | longName, |
| Handle & | handle | ||
| ) | const [pure virtual] |
Set the Handle to point to the parameter specified by longName Given a long name like "mystruct.somearray[10].foo", it will return a handle to that specific parameter. The handle can then be used to set/get values, as long as it's a handle to a leaf node.
- Note:
- this method will not work if an included reference's child is included in the longName
| virtual ErrorType NvParameterized::Interface::getParameterHandle | ( | const char * | longName, |
| Handle & | handle | ||
| ) | [pure virtual] |
Set the Handle to point to the parameter specified by longName Given a long name like "mystruct.somearray[10].foo", it will return a handle to that specific parameter. The handle can then be used to set/get values, as long as it's a handle to a leaf node.
- Note:
- this method will not work if an included reference's child is included in the longName
| virtual ErrorType NvParameterized::Interface::initParamRef | ( | const Handle & | handle, |
| const char * | chosenRefStr = 0, |
||
| bool | doDestroyOld = false |
||
| ) | [protected, pure virtual] |
Initialize a Reference parameter.
- Note:
- By default previous value of parameter isn't destroyed (bool doDestroyOld = false)
| virtual ErrorType NvParameterized::Interface::resizeArray | ( | const Handle & | array_handle, |
| int32_t | new_size | ||
| ) | [protected, pure virtual] |
Resize array parameter.
- See also:
- Handle::resizeArray
| virtual void NvParameterized::Interface::setClassName | ( | const char * | name | ) | [pure virtual] |
Sets the class name.
This method is used for named references. The input name should be one of the possible variants.
| virtual ErrorType NvParameterized::Interface::setParamRef | ( | const Handle & | handle, |
| ::NvParameterized::Interface * | val, | ||
| bool | doDestroyOld = false |
||
| ) | [protected, pure virtual] |
- Note:
- By default previous value of parameter is not destroyed (bool doDestroyOld = false)
| virtual ErrorType NvParameterized::Interface::setParamRefArray | ( | const Handle & | handle, |
| ::NvParameterized::Interface ** | array, | ||
| int32_t | n, | ||
| int32_t | offset = 0, |
||
| bool | doDestroyOld = false |
||
| ) | [protected, pure virtual] |
- Note:
- By default previous values of parameter are not destroyed (bool doDestroyOld = false)
| virtual ErrorType NvParameterized::Interface::strToValue | ( | Handle & | handle, |
| const char * | str, | ||
| const char ** | endptr | ||
| ) | [protected, pure virtual] |
Read value of parameter from string.
- See also:
- Handle::strToValue
| virtual ErrorType NvParameterized::Interface::swapArrayElements | ( | const Handle & | array_handle, |
| uint32_t | firstElement, | ||
| uint32_t | secondElement | ||
| ) | [protected, pure virtual] |
Swap two elements of an array.
- See also:
- Handle::swapArrayElements
| virtual ErrorType NvParameterized::Interface::valueToStr | ( | const Handle & | handle, |
| char * | buf, | ||
| uint32_t | bufSize, | ||
| const char *& | ret | ||
| ) | [protected, pure virtual] |
Store value of parameter into a string.
- See also:
- Handle::valueToStr
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.