24 #ifndef PXR_BASE_TF_TEMPLATE_STRING_H
25 #define PXR_BASE_TF_TEMPLATE_STRING_H
33 #include <tbb/spin_mutex.h>
65 typedef std::map<std::string, std::string>
Mapping;
106 struct _PlaceHolder {
108 :
name(n), pos(p), len(l) {}
121 bool _FindNextPlaceHolder(
size_t*, std::vector<std::string>*)
const;
125 void _ParseTemplate()
const;
128 void _EmitParseErrors()
const;
133 _Data(_Data
const &) =
delete;
134 _Data &
operator=(_Data
const &) =
delete;
136 _Data() : parsed(false) {}
139 mutable std::vector<_PlaceHolder> placeholders;
141 mutable std::vector<std::string> parseErrors;
142 mutable tbb::spin_mutex mutex;
145 std::shared_ptr<_Data> _data;
150 #endif // PXR_BASE_TF_TEMPLATE_STRING_H
GLsizei const GLchar *const * string
TF_API std::string SafeSubstitute(const Mapping &) const
TF_API TfTemplateString()
Constructs a new template string.
const std::string & GetTemplate() const
Returns the template source string supplied to the constructor.
std::map< std::string, std::string > Mapping
TF_API bool IsValid() const
GLuint const GLchar * name
TF_API std::vector< std::string > GetParseErrors() const
Returns any error messages generated during template parsing.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
LeafData & operator=(const LeafData &)=delete
#define PXR_NAMESPACE_CLOSE_SCOPE
TF_API Mapping GetEmptyMapping() const
TF_API std::string Substitute(const Mapping &) const