HDK
|
#include <Element.h>
Public Member Functions | |
virtual | ~StringResolver () |
File Prefix | |
void | setFilePrefix (const string &filePrefix) |
Set the file prefix for this context. More... | |
const string & | getFilePrefix () 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 string & | getGeomPrefix () 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 StringMap & | getFilenameSubstitutions () 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 StringMap & | getGeomNameSubstitutions () 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 |
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.
|
inlinevirtual |
void StringResolver::addTokenSubstitutions | ( | ConstElementPtr | element | ) |
Add filename token substitutions for a given element.
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Given an input string and type, apply all appropriate modifiers and return the resulting string.
Set the UDIM substring substitution for filename data values. This string will be used to replace the standard <UDIM> token.
Set the UV-tile substring substitution for filename data values. This string will be used to replace the standard <UVTILE> token.