OpenVDB 11.0.0
Loading...
Searching...
No Matches
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.
 
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.
 
int64_t accessIndex (const std::string &name, const ast::tokens::CoreType type) const
 Returns whether or not an access is registered.
 
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.
 
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

◆ AccessDataVec

using AccessDataVec = std::vector<AccessData>

◆ ConstPtr

using ConstPtr = std::shared_ptr<const AttributeRegistry>

◆ Ptr

using Ptr = std::shared_ptr<AttributeRegistry>

Member Function Documentation

◆ accessIndex()

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

◆ accessPattern()

std::pair< bool, bool > accessPattern ( const std::string & name,
const ast::tokens::CoreType type ) const
inline

◆ create()

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

◆ data()

const AccessDataVec & data ( ) const
inline

Returns a const reference to the vector of registered accesss.

◆ get()

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

◆ isReadable()

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

◆ isRegistered()

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

◆ isWritable()

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

◆ print()

void print ( std::ostream & os) const
inline