HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BRAY_ProceduralFactory Class Referenceabstract

#include <BRAY_ProceduralFactory.h>

+ Inheritance diagram for BRAY_ProceduralFactory:

Public Types

using MapType = UT_StringMap< const BRAY_ProceduralFactory * >
 The list of procedurals is stored in a map of {name, ProceduralFactory}. More...
 
using iterator = MapType::const_iterator
 

Public Member Functions

 BRAY_ProceduralFactory (const UT_StringHolder &name)
 
virtual ~BRAY_ProceduralFactory ()
 
const UT_StringHoldername () const
 Return the name of the factory. More...
 
BRAY_ProceduralcreateProcedural () const
 Create a procedural. More...
 
virtual bool acceptsExtraParameters () const
 
virtual bool matchExtraParameter (const UT_StringHolder &attrib_name) const
 
virtual const BRAY_AttribListparamList () const =0
 

Static Public Member Functions

static const MapTypeprocedurals ()
 
static iterator begin ()
 
static iterator end ()
 
static void print ()
 
static void print (UT_JSONWriter &w)
 

Protected Member Functions

virtual BRAY_Proceduralcreate () const =0
 Create a procedural. More...
 
virtual const UT_StringHolderextraHelp () const
 Provide some extra info for this procedural used when printing help. More...
 

Detailed Description

Provides an interface to bind Hydra USD primitives to Karma primitives.

The constructor/destructor typically look like this:

Subclass::Subclass()
{
bind("tokenname");
}
Subclass::~Subclass()
{
unbind("tokenname");
}
Examples:
karma_procedurals/BRAY_HdBox.C, karma_procedurals/BRAY_HdBox.h, karma_procedurals/BRAY_HdSphere.C, and karma_procedurals/BRAY_HdSphere.h.

Definition at line 37 of file BRAY_ProceduralFactory.h.

Member Typedef Documentation

The list of procedurals is stored in a map of {name, ProceduralFactory}.

Definition at line 77 of file BRAY_ProceduralFactory.h.

Constructor & Destructor Documentation

BRAY_ProceduralFactory::BRAY_ProceduralFactory ( const UT_StringHolder name)

When the factory is instantiated, it will be registered with the name given.

virtual BRAY_ProceduralFactory::~BRAY_ProceduralFactory ( )
virtual

Member Function Documentation

virtual bool BRAY_ProceduralFactory::acceptsExtraParameters ( ) const
inlinevirtual

A flag to determine whether or not this procedural accepts parameters from outside it's parameter list. If this is enabled, not only will the parameters from paramList() be added, but also any parameters that match the matchExtraParam() method

Definition at line 65 of file BRAY_ProceduralFactory.h.

static iterator BRAY_ProceduralFactory::begin ( )
inlinestatic

Access the list of all the registered procedurals

Definition at line 83 of file BRAY_ProceduralFactory.h.

virtual BRAY_Procedural* BRAY_ProceduralFactory::create ( ) const
protectedpure virtual

Create a procedural.

BRAY_Procedural* BRAY_ProceduralFactory::createProcedural ( ) const

Create a procedural.

static iterator BRAY_ProceduralFactory::end ( )
inlinestatic

Access the list of all the registered procedurals

Definition at line 84 of file BRAY_ProceduralFactory.h.

virtual const UT_StringHolder& BRAY_ProceduralFactory::extraHelp ( ) const
inlineprotectedvirtual

Provide some extra info for this procedural used when printing help.

Definition at line 98 of file BRAY_ProceduralFactory.h.

virtual bool BRAY_ProceduralFactory::matchExtraParameter ( const UT_StringHolder attrib_name) const
inlinevirtual

Determine whether this attribute should be added as an extra parameter. This will only be called if acceptsExtraParameters() returns true

Definition at line 70 of file BRAY_ProceduralFactory.h.

const UT_StringHolder& BRAY_ProceduralFactory::name ( ) const
inline

Return the name of the factory.

Definition at line 47 of file BRAY_ProceduralFactory.h.

virtual const BRAY_AttribList* BRAY_ProceduralFactory::paramList ( ) const
pure virtual

Get the static of supported parameters by the procedural Procedurals are also given an opportunity to construct on the fly tables after going through the list of attributes defined on points.

static void BRAY_ProceduralFactory::print ( )
static

Print list of procedural factory types

static void BRAY_ProceduralFactory::print ( UT_JSONWriter w)
static

Print list of procedural factory types

static const MapType& BRAY_ProceduralFactory::procedurals ( )
static

Access the list of all the registered procedurals


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