OpenVDB  9.0.1
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
AttributeRegistry Class Reference

This class stores a list of access names, types and their dependency connections. More...

#include <openvdb_ax/compiler/AttributeRegistry.h>

Classes

struct  AccessData
 Registered access details, including its name, type and whether a write handle is required. More...
 

Public Types

using Ptr = std::shared_ptr< AttributeRegistry >
 
using ConstPtr = std::shared_ptr< const AttributeRegistry >
 
using AccessDataVec = std::vector< AccessData >
 

Public Member Functions

bool isReadable (const std::string &name, const ast::tokens::CoreType type) const
 
bool isWritable (const std::string &name, const ast::tokens::CoreType type) const
 Returns whether or not an access is required to be written to. If no access with this name has been registered, returns false. More...
 
std::pair< bool, bool > accessPattern (const std::string &name, const ast::tokens::CoreType type) const
 
bool isRegistered (const std::string &name, const ast::tokens::CoreType type) const
 Returns whether or not an access is registered. More...
 
int64_t accessIndex (const std::string &name, const ast::tokens::CoreType type) const
 Returns whether or not an access is registered. More...
 
const AccessDataget (const std::string &name, const ast::tokens::CoreType type) const
 
const AccessDataVecdata () const
 Returns a const reference to the vector of registered accesss. More...
 
void print (std::ostream &os) const
 

Static Public Member Functions

static AttributeRegistry::Ptr create (const ast::Tree &tree)
 

Detailed Description

This class stores a list of access names, types and their dependency connections.

Member Typedef Documentation

using AccessDataVec = std::vector<AccessData>
using ConstPtr = std::shared_ptr<const AttributeRegistry>
using Ptr = std::shared_ptr<AttributeRegistry>

Member Function Documentation

int64_t accessIndex ( const std::string &  name,
const ast::tokens::CoreType  type 
) const
inline

Returns whether or not an access is registered.

Parameters
nameThe name of the access
typeThe type of the access
std::pair<bool,bool> accessPattern ( const std::string &  name,
const ast::tokens::CoreType  type 
) const
inline
AttributeRegistry::Ptr create ( const ast::Tree tree)
inlinestatic
const AccessDataVec& data ( ) const
inline

Returns a const reference to the vector of registered accesss.

const AccessData* get ( const std::string &  name,
const ast::tokens::CoreType  type 
) const
inline
bool isReadable ( const std::string &  name,
const ast::tokens::CoreType  type 
) const
inline
bool isRegistered ( const std::string &  name,
const ast::tokens::CoreType  type 
) const
inline

Returns whether or not an access is registered.

Parameters
nameThe name of the access
typeThe type of the access
bool isWritable ( const std::string &  name,
const ast::tokens::CoreType  type 
) const
inline

Returns whether or not an access is required to be written to. If no access with this name has been registered, returns false.

Parameters
nameThe name of the access
typeThe type of the access
void print ( std::ostream &  os) const
inline