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

#include <schema.h>

Public Types

typedef std::vector< std::pair
< TfToken, JsValue > > 
InfoVec
 

Public Member Functions

 FieldDefinition (const SdfSchemaBase &schema, const TfToken &name, const VtValue &fallbackValue)
 
SDF_API const TfToken & GetName () const
 
SDF_API const VtValue & GetFallbackValue () const
 
SDF_API const InfoVec & GetInfo () const
 
SDF_API bool IsPlugin () const
 
SDF_API bool IsReadOnly () const
 
SDF_API bool HoldsChildren () const
 
template<class T >
SdfAllowed IsValidValue (const T &value) const
 
template<class T >
SdfAllowed IsValidListValue (const T &value) const
 
template<class T >
SdfAllowed IsValidMapKey (const T &value) const
 
template<class T >
SdfAllowed IsValidMapValue (const T &value) const
 
using Validator = SdfAllowed(*)(const SdfSchemaBase &, const VtValue &)
 
FieldDefinition & FallbackValue (const VtValue &v)
 
FieldDefinition & Plugin ()
 
FieldDefinition & Children ()
 
FieldDefinition & ReadOnly ()
 
FieldDefinition & AddInfo (const TfToken &tok, const JsValue &val)
 
FieldDefinition & ValueValidator (Validator v)
 
FieldDefinition & ListValueValidator (Validator v)
 
FieldDefinition & MapKeyValidator (Validator v)
 
FieldDefinition & MapValueValidator (Validator v)
 

Detailed Description

Class defining various attributes for a field.

Definition at line 56 of file schema.h.

Member Typedef Documentation

typedef std::vector< std::pair<TfToken, JsValue> > SdfSchemaBase::FieldDefinition::InfoVec

Definition at line 63 of file schema.h.

Functions for setting field attributes during registration.

Definition at line 122 of file schema.h.

Constructor & Destructor Documentation

SdfSchemaBase::FieldDefinition::FieldDefinition ( const SdfSchemaBase &  schema,
const TfToken &  name,
const VtValue &  fallbackValue 
)

Member Function Documentation

FieldDefinition& SdfSchemaBase::FieldDefinition::AddInfo ( const TfToken &  tok,
const JsValue &  val 
)

Functions for setting field attributes during registration.

FieldDefinition& SdfSchemaBase::FieldDefinition::Children ( )

Functions for setting field attributes during registration.

FieldDefinition& SdfSchemaBase::FieldDefinition::FallbackValue ( const VtValue &  v)

Functions for setting field attributes during registration.

SDF_API const VtValue& SdfSchemaBase::FieldDefinition::GetFallbackValue ( ) const
SDF_API const InfoVec& SdfSchemaBase::FieldDefinition::GetInfo ( ) const
SDF_API const TfToken& SdfSchemaBase::FieldDefinition::GetName ( ) const
SDF_API bool SdfSchemaBase::FieldDefinition::HoldsChildren ( ) const
SDF_API bool SdfSchemaBase::FieldDefinition::IsPlugin ( ) const
SDF_API bool SdfSchemaBase::FieldDefinition::IsReadOnly ( ) const
template<class T >
SdfAllowed SdfSchemaBase::FieldDefinition::IsValidListValue ( const T &  value) const
inline

Validation functions that return true if a given value passes the registered validator or if no validator has been set.

Definition at line 86 of file schema.h.

template<class T >
SdfAllowed SdfSchemaBase::FieldDefinition::IsValidMapKey ( const T &  value) const
inline

Validation functions that return true if a given value passes the registered validator or if no validator has been set.

Definition at line 94 of file schema.h.

template<class T >
SdfAllowed SdfSchemaBase::FieldDefinition::IsValidMapValue ( const T &  value) const
inline

Validation functions that return true if a given value passes the registered validator or if no validator has been set.

Definition at line 102 of file schema.h.

template<class T >
SdfAllowed SdfSchemaBase::FieldDefinition::IsValidValue ( const T &  value) const
inline

Validation functions that return true if a given value passes the registered validator or if no validator has been set.

Definition at line 78 of file schema.h.

FieldDefinition& SdfSchemaBase::FieldDefinition::ListValueValidator ( Validator  v)

Functions for setting field attributes during registration.

FieldDefinition& SdfSchemaBase::FieldDefinition::MapKeyValidator ( Validator  v)

Functions for setting field attributes during registration.

FieldDefinition& SdfSchemaBase::FieldDefinition::MapValueValidator ( Validator  v)

Functions for setting field attributes during registration.

FieldDefinition& SdfSchemaBase::FieldDefinition::Plugin ( )

Functions for setting field attributes during registration.

FieldDefinition& SdfSchemaBase::FieldDefinition::ReadOnly ( )

Functions for setting field attributes during registration.

FieldDefinition& SdfSchemaBase::FieldDefinition::ValueValidator ( Validator  v)

Functions for setting field attributes during registration.


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