HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StringResolver Class Reference

#include <Element.h>

Public Member Functions

virtual ~StringResolver ()
 
File Prefix
void setFilePrefix (const string &filePrefix)
 Set the file prefix for this context. More...
 
const stringgetFilePrefix () const
 Return the file prefix for this context. More...
 
Geom Prefix
void setGeomPrefix (const string &geomPrefix)
 Set the geom prefix for this context. More...
 
const stringgetGeomPrefix () const
 Return the geom prefix for this context. More...
 
Filename Substitutions
void setUdimString (const string &udim)
 
void setUvTileString (const string &uvTile)
 
void setFilenameSubstitution (const string &key, const string &value)
 Set an arbitrary substring substitution for filename data values. More...
 
void addTokenSubstitutions (ConstElementPtr element)
 Add filename token substitutions for a given element. More...
 
const StringMapgetFilenameSubstitutions () const
 Return the map of filename substring substitutions. More...
 
Geometry Name Substitutions
void setGeomNameSubstitution (const string &key, const string &value)
 Set an arbitrary substring substitution for geometry name data values. More...
 
const StringMapgetGeomNameSubstitutions () const
 Return the map of geometry name substring substitutions. More...
 

Static Public Member Functions

static StringResolverPtr create ()
 Create a new string resolver. More...
 

Protected Member Functions

 StringResolver ()
 

Protected Attributes

string _filePrefix
 
string _geomPrefix
 
StringMap _filenameMap
 
StringMap _geomNameMap
 

Resolution

static bool isResolvedType (const string &type)
 Return true if the given type may be resolved by this class. More...
 
virtual string resolve (const string &str, const string &type) const
 

Detailed Description

A helper object for applying string modifiers to data values in the context of a specific element and geometry.

A StringResolver may be constructed through the Element::createStringResolver method, which initializes it in the context of a specific element, geometry, and material.

Calling the StringResolver::resolve method applies all modifiers to a particular string value.

Methods such as StringResolver::setFilePrefix may be used to edit the stored string modifiers before calling StringResolver::resolve.

Definition at line 1211 of file Element.h.

Constructor & Destructor Documentation

virtual StringResolver::~StringResolver ( )
inlinevirtual

Definition at line 1220 of file Element.h.

StringResolver::StringResolver ( )
inlineprotected

Definition at line 1313 of file Element.h.

Member Function Documentation

void StringResolver::addTokenSubstitutions ( ConstElementPtr  element)

Add filename token substitutions for a given element.

static StringResolverPtr StringResolver::create ( )
inlinestatic

Create a new string resolver.

Definition at line 1215 of file Element.h.

const StringMap& StringResolver::getFilenameSubstitutions ( ) const
inline

Return the map of filename substring substitutions.

Definition at line 1275 of file Element.h.

const string& StringResolver::getFilePrefix ( ) const
inline

Return the file prefix for this context.

Definition at line 1232 of file Element.h.

const StringMap& StringResolver::getGeomNameSubstitutions ( ) const
inline

Return the map of geometry name substring substitutions.

Definition at line 1291 of file Element.h.

const string& StringResolver::getGeomPrefix ( ) const
inline

Return the geom prefix for this context.

Definition at line 1248 of file Element.h.

static bool StringResolver::isResolvedType ( const string type)
inlinestatic

Return true if the given type may be resolved by this class.

Definition at line 1305 of file Element.h.

virtual string StringResolver::resolve ( const string str,
const string type 
) const
virtual

Given an input string and type, apply all appropriate modifiers and return the resulting string.

void StringResolver::setFilenameSubstitution ( const string key,
const string value 
)
inline

Set an arbitrary substring substitution for filename data values.

Definition at line 1266 of file Element.h.

void StringResolver::setFilePrefix ( const string filePrefix)
inline

Set the file prefix for this context.

Definition at line 1226 of file Element.h.

void StringResolver::setGeomNameSubstitution ( const string key,
const string value 
)
inline

Set an arbitrary substring substitution for geometry name data values.

Definition at line 1285 of file Element.h.

void StringResolver::setGeomPrefix ( const string geomPrefix)
inline

Set the geom prefix for this context.

Definition at line 1242 of file Element.h.

void StringResolver::setUdimString ( const string udim)

Set the UDIM substring substitution for filename data values. This string will be used to replace the standard <UDIM> token.

void StringResolver::setUvTileString ( const string uvTile)

Set the UV-tile substring substitution for filename data values. This string will be used to replace the standard <UVTILE> token.

Member Data Documentation

StringMap StringResolver::_filenameMap
protected

Definition at line 1318 of file Element.h.

string StringResolver::_filePrefix
protected

Definition at line 1316 of file Element.h.

StringMap StringResolver::_geomNameMap
protected

Definition at line 1319 of file Element.h.

string StringResolver::_geomPrefix
protected

Definition at line 1317 of file Element.h.


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