Loading...
Searching...
No Matches
SdfPredicateParamNamesAndDefaults Class Reference

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

#include <predicateLibrary.h>

Classes

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

Public Member Functions

 SdfPredicateParamNamesAndDefaults ()
 Default constructor produces empty set of names & defaults.
 
 SdfPredicateParamNamesAndDefaults (std::initializer_list< Param > const &params)
 Construct or implicitly convert from initializer_list<Param>.
 
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.
 
std::vector< Param > const & GetParams () const &
 Return a reference to the parameters in a vector.
 
std::vector< ParamGetParams () const &&
 Move-return the parameters in a vector.
 
size_t GetNumDefaults () const
 Return the number of params with default values.
 

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 53 of file predicateLibrary.h.

Constructor & Destructor Documentation

◆ SdfPredicateParamNamesAndDefaults() [1/2]

Default constructor produces empty set of names & defaults.

Definition at line 71 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 74 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 97 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 87 of file predicateLibrary.h.

◆ GetParams() [2/2]

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

Move-return the parameters in a vector.

Definition at line 92 of file predicateLibrary.h.


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