Loading...
Searching...
No Matches
VdfConnectorSpecs< T > Class Template Reference

The classes contained in this file are the containers for input and output specs. More...

#include <connectorSpecs.h>

Public Types

using const_iterator = typename _VectorType::const_iterator
 Iterator type.
 

Public Member Functions

 VdfConnectorSpecs ()
 Constructor.
 
 VdfConnectorSpecs (const VdfConnectorSpecs< T > &rhs)
 Copy constructor.
 
 VdfConnectorSpecs (VdfConnectorSpecs< T > &&rhs)
 Move constructor.
 
VdfConnectorSpecs< T > & operator= (const VdfConnectorSpecs< T > &rhs)
 Copy assignment operator.
 
VdfConnectorSpecs< T > & operator= (VdfConnectorSpecs< T > &&rhs)
 Move assignment operator.
 
void Append (const VdfConnectorSpecs< T > &specs)
 Appends a set of specs to this one.
 
void Reserve (size_t numSpecs)
 Allocates space for numSpecs connector specs, to avoid re-allocation when adding specs, when the number of specs is known ahead of time.
 
size_t GetSize () const
 Returns number of connectors in this spec.
 
const_iterator begin () const
 Returns a const_iterator to the beginning of the connectors.
 
const_iterator end () const
 Returns a const_iterator to the end of the connectors.
 

Protected Member Functions

 ~VdfConnectorSpecs ()
 Destructor.
 
void _ClearSpecs ()
 Clears list of specs.
 
const T * _GetConnectorSpec (int idx) const
 Returns connector spec at index idx.
 
void _AddConnector (T *cs)
 Adds a connector to our list.
 

Detailed Description

template<typename T>
class VdfConnectorSpecs< T >

The classes contained in this file are the containers for input and output specs.

The typical usage pattern is this:

{
....
VdfInputSpecs inputs;
inputs
.ReadConnector<double>(TfToken("length"))
.ReadWriteConnector<GfVec3d>>(TfToken("moves"),
TfToken("out"))
;
}
Basic type for a vector of 3 double components.
Definition: vec3d.h:46
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
VdfInputSpecs is a container for VdfInputSpec objects.
VdfInputSpecs & ReadConnector(const TfToken &inName, const TfToken &outName=VdfTokens->empty, bool prerequisite=false)
Create a "Read" connector with the name inName and optionally associated with the output named outNam...

VdfConnectorSpecs is a container for VdfConnectorSpec objects. This is a base class for the concrete containers of input connector specs and output connector specs.

Definition at line 50 of file connectorSpecs.h.

Member Typedef Documentation

◆ const_iterator

using const_iterator = typename _VectorType::const_iterator

Iterator type.

Definition at line 58 of file connectorSpecs.h.

Constructor & Destructor Documentation

◆ VdfConnectorSpecs() [1/3]

VdfConnectorSpecs ( )
inline

Constructor.

Definition at line 61 of file connectorSpecs.h.

◆ VdfConnectorSpecs() [2/3]

VdfConnectorSpecs ( const VdfConnectorSpecs< T > &  rhs)
inline

Copy constructor.

Definition at line 64 of file connectorSpecs.h.

◆ VdfConnectorSpecs() [3/3]

VdfConnectorSpecs ( VdfConnectorSpecs< T > &&  rhs)
inline

Move constructor.

Definition at line 70 of file connectorSpecs.h.

◆ ~VdfConnectorSpecs()

~VdfConnectorSpecs ( )
inlineprotected

Destructor.

Note, the destructor is not virtual on purpose (we don't want the vtable), but we make it protected to prevent destruction through a base class pointer.

Definition at line 120 of file connectorSpecs.h.

Member Function Documentation

◆ _AddConnector()

void _AddConnector ( T *  cs)
inlineprotected

Adds a connector to our list.

Definition at line 140 of file connectorSpecs.h.

◆ _ClearSpecs()

void _ClearSpecs ( )
inlineprotected

Clears list of specs.

Definition at line 125 of file connectorSpecs.h.

◆ _GetConnectorSpec()

const T * _GetConnectorSpec ( int  idx) const
inlineprotected

Returns connector spec at index idx.

Definition at line 134 of file connectorSpecs.h.

◆ Append()

void Append ( const VdfConnectorSpecs< T > &  specs)
inline

Appends a set of specs to this one.

Definition at line 91 of file connectorSpecs.h.

◆ begin()

const_iterator begin ( ) const
inline

Returns a const_iterator to the beginning of the connectors.

Definition at line 108 of file connectorSpecs.h.

◆ end()

const_iterator end ( ) const
inline

Returns a const_iterator to the end of the connectors.

Definition at line 111 of file connectorSpecs.h.

◆ GetSize()

size_t GetSize ( ) const
inline

Returns number of connectors in this spec.

Definition at line 105 of file connectorSpecs.h.

◆ operator=() [1/2]

VdfConnectorSpecs< T > & operator= ( const VdfConnectorSpecs< T > &  rhs)
inline

Copy assignment operator.

Definition at line 75 of file connectorSpecs.h.

◆ operator=() [2/2]

VdfConnectorSpecs< T > & operator= ( VdfConnectorSpecs< T > &&  rhs)
inline

Move assignment operator.

Definition at line 83 of file connectorSpecs.h.

◆ Reserve()

void Reserve ( size_t  numSpecs)
inline

Allocates space for numSpecs connector specs, to avoid re-allocation when adding specs, when the number of specs is known ahead of time.

Definition at line 100 of file connectorSpecs.h.


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