HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Sdf_Children< ChildPolicy > Class Template Reference

#include <children.h>

Public Types

typedef ChildPolicy::KeyPolicy KeyPolicy
 
typedef ChildPolicy::KeyType KeyType
 
typedef ChildPolicy::ValueType ValueType
 
typedef ChildPolicy::FieldType FieldType
 
typedef Sdf_Children< ChildPolicy > This
 

Public Member Functions

SDF_API Sdf_Children ()
 
SDF_API Sdf_Children (const Sdf_Children< ChildPolicy > &other)
 
SDF_API Sdf_Children (const SdfLayerHandle &layer, const SdfPath &parentPath, const TfToken &childrenKey, const KeyPolicy &keyPolicy=KeyPolicy())
 
SDF_API bool IsValid () const
 Return whether this object is valid. More...
 
SDF_API size_t GetSize () const
 Return the number of children that this object contains. More...
 
SDF_API ValueType GetChild (size_t index) const
 Return the child at the specified index. More...
 
SDF_API size_t Find (const KeyType &key) const
 Find the index of the specified key, or return the size if it's not found. More...
 
SDF_API KeyType FindKey (const ValueType &value) const
 
SDF_API bool IsEqualTo (const This &other) const
 Return true if this object and other are equivalent. More...
 
SDF_API bool Copy (const std::vector< ValueType > &values, const std::string &type)
 Replace this object's children with the ones in values. More...
 
SDF_API bool Insert (const ValueType &value, size_t index, const std::string &type)
 Insert a new child at the specified index. More...
 
SDF_API bool Erase (const KeyType &key, const std::string &type)
 Erase the child with the specified key. More...
 

Detailed Description

template<class ChildPolicy>
class Sdf_Children< ChildPolicy >

Sdf_Children generically represents the children of an object. For instance, it might be used for the name children of a prim or the relationship targets of a relationship.

The provided ChildPolicy class determines how this object behaves. It primarily specifies how to map between keys (such as the name of an object) and values (such as SpecHandles for those objects).

Definition at line 51 of file children.h.

Member Typedef Documentation

template<class ChildPolicy>
typedef ChildPolicy::FieldType Sdf_Children< ChildPolicy >::FieldType

Definition at line 57 of file children.h.

template<class ChildPolicy>
typedef ChildPolicy::KeyPolicy Sdf_Children< ChildPolicy >::KeyPolicy

Definition at line 54 of file children.h.

template<class ChildPolicy>
typedef ChildPolicy::KeyType Sdf_Children< ChildPolicy >::KeyType

Definition at line 55 of file children.h.

template<class ChildPolicy>
typedef Sdf_Children<ChildPolicy> Sdf_Children< ChildPolicy >::This

Definition at line 58 of file children.h.

template<class ChildPolicy>
typedef ChildPolicy::ValueType Sdf_Children< ChildPolicy >::ValueType

Definition at line 56 of file children.h.

Constructor & Destructor Documentation

template<class ChildPolicy>
SDF_API Sdf_Children< ChildPolicy >::Sdf_Children ( )
template<class ChildPolicy>
SDF_API Sdf_Children< ChildPolicy >::Sdf_Children ( const Sdf_Children< ChildPolicy > &  other)
template<class ChildPolicy>
SDF_API Sdf_Children< ChildPolicy >::Sdf_Children ( const SdfLayerHandle &  layer,
const SdfPath parentPath,
const TfToken childrenKey,
const KeyPolicy keyPolicy = KeyPolicy() 
)

Member Function Documentation

template<class ChildPolicy>
SDF_API bool Sdf_Children< ChildPolicy >::Copy ( const std::vector< ValueType > &  values,
const std::string type 
)

Replace this object's children with the ones in values.

template<class ChildPolicy>
SDF_API bool Sdf_Children< ChildPolicy >::Erase ( const KeyType key,
const std::string type 
)

Erase the child with the specified key.

template<class ChildPolicy>
SDF_API size_t Sdf_Children< ChildPolicy >::Find ( const KeyType key) const

Find the index of the specified key, or return the size if it's not found.

template<class ChildPolicy>
SDF_API KeyType Sdf_Children< ChildPolicy >::FindKey ( const ValueType value) const

Find the key that corresponds to value, or return a default constructed key if it's not found.

template<class ChildPolicy>
SDF_API ValueType Sdf_Children< ChildPolicy >::GetChild ( size_t  index) const

Return the child at the specified index.

template<class ChildPolicy>
SDF_API size_t Sdf_Children< ChildPolicy >::GetSize ( ) const

Return the number of children that this object contains.

template<class ChildPolicy>
SDF_API bool Sdf_Children< ChildPolicy >::Insert ( const ValueType value,
size_t  index,
const std::string type 
)

Insert a new child at the specified index.

template<class ChildPolicy>
SDF_API bool Sdf_Children< ChildPolicy >::IsEqualTo ( const This other) const

Return true if this object and other are equivalent.

template<class ChildPolicy>
SDF_API bool Sdf_Children< ChildPolicy >::IsValid ( ) const

Return whether this object is valid.


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