SdfPredicateParamNamesAndDefaults Class Reference

Represents named function parameters, with optional default values. More...

Classes

class  Param
 single named parameter with an optional default value. More...
 

Public Member Functions

 SdfPredicateParamNamesAndDefaults ()
 Default constructor produces empty set of names & defaults. More...
 
 SdfPredicateParamNamesAndDefaults (std::initializer_list< Param > const &params)
 Construct or implicitly convert from initializer_list<Param>. More...
 
SDF_API bool CheckValidity () const
 Check that all parameters have non-empty names and that all paramters following the first with a default value also have default values. More...
 
std::vector< Param > const & GetParams () const &
 Return a reference to the parameters in a vector. More...
 
std::vector< ParamGetParams () const &&
 Move-return the parameters in a vector. More...
 
size_t GetNumDefaults () const
 Return the number of params with default values. More...
 

Detailed Description

Represents named function parameters, with optional default values.

These are generally constructed via an initializer_list and specified in SdfPredicateLibrary::Define().

Valid parameter names and defaults have non-empty names, and all parameters following the first one with a default value must also have default values.

Definition at line 36 of file predicateLibrary.h.

Constructor & Destructor Documentation

◆ SdfPredicateParamNamesAndDefaults() [1/2]

Default constructor produces empty set of names & defaults.

Definition at line 54 of file predicateLibrary.h.

◆ SdfPredicateParamNamesAndDefaults() [2/2]

SdfPredicateParamNamesAndDefaults ( std::initializer_list< Param > const &  params)
inline

Construct or implicitly convert from initializer_list<Param>.

Definition at line 57 of file predicateLibrary.h.

Member Function Documentation

◆ CheckValidity()

SDF_API bool CheckValidity ( ) const

Check that all parameters have non-empty names and that all paramters following the first with a default value also have default values.

Issue TF_CODING_ERROR()s and return false if these conditions are violated, otherwise return true.

◆ GetNumDefaults()

size_t GetNumDefaults ( ) const
inline

Return the number of params with default values.

Definition at line 80 of file predicateLibrary.h.

◆ GetParams() [1/2]

std::vector<Param> const& GetParams ( ) const &
inline

Return a reference to the parameters in a vector.

Definition at line 70 of file predicateLibrary.h.

◆ GetParams() [2/2]

std::vector<Param> GetParams ( ) const &&
inline

Move-return the parameters in a vector.

Definition at line 75 of file predicateLibrary.h.


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