26 #ifndef __UT_TagManager__
27 #define __UT_TagManager__
52 #if defined(UT_TAG_USE_SMALL_OBJECTS)
54 UT_SMALLOBJECT_CLEANPAGES_ON,
56 UT_SMALLOBJECT_THREADSAFE_ON>
83 {
return sizeof(*this) + myBits.getMemoryUsage(); }
87 {
return mySingle < 0 && myBits.size() == 0; }
88 bool hasTag(
int id)
const
90 return id == mySingle ||
91 (
id < myBits.size() && myBits.getBit(
id));
93 void validateList(
int namecount);
94 void setSingleBit(
int bit);
108 #if defined(UT_TAG_USE_SMALL_OBJECTS)
110 UT_SMALLOBJECT_CLEANPAGES_ON,
112 UT_SMALLOBJECT_THREADSAFE_ON>
150 bool isTautology()
const;
163 {
return sizeof(*this) + myCode.getMemoryUsage(); }
167 void extractOrComponents(SubExpressionList &elist)
const;
171 void combineOrComponents(
const SubExpressionList &elist);
173 static bool simplifyExpressions(SubExpressionList &elist,
182 void validateExpr(
int namecount);
183 void addOpCode(
int opcode,
int operand = 0);
190 addOpCode(stack(n-2), stack(n-1));
226 : myKey(k.myKey.c_str())
235 const char *
c_str()
const {
return myKey.c_str(); }
239 return myKey == k.myKey;
295 createTagExpression(expr, errs));
309 UT_TagEditOperation op,
317 const tag_ListType &nameList()
const {
return myNameList; }
320 UT_TagList *createTagListForName(
int name_index);
327 int findOrCreateTag(
const char *tag);
329 tag_MapType myNameTable;
330 tag_ListType myNameList;
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
An expression to match tags (i.e. "* & ^fill")
bool operator!=(const UT_TagList &list) const
WeakKey(const UT_StringHolder &key)
UT_IntrusivePtr< UT_TagExpression > UT_TagExpressionPtr
const char * c_str() const
bool operator!=(const UT_TagExpression &expr) const
const UT_TagManager & getManager() const
UT_ConcurrentVector< const char * > tag_ListType
bool operator==(const UT_TagExpression &expr) const
A reference counter base class for use with UT_IntrusivePtr.
UT_TagListPtr createList(const char *list, UT_String &errs)
bool operator==(const UT_TagList &list) const
CompareResults OIIO_API compare(const ImageBuf &A, const ImageBuf &B, float failthresh, float warnthresh, ROI roi={}, int nthreads=0)
UT_TagManager & getManager()
SYS_FORCE_INLINE const UT_StringHolder & UTmakeUnsafeRef(const UT_StringRef &ref)
Convert a UT_StringRef into a UT_StringHolder that is a shallow reference.
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
A comma separated list of tags (i.e. "fill,spot,red")
Wrapper around hboost::intrusive_ptr.
UT_ConcurrentHashMap< WeakKey, int, UT_HashFunctor< WeakKey > > tag_MapType
GLuint const GLchar * name
WeakKey(const WeakKey &k)
UT_IntrusivePtr< UT_TagList > UT_TagListPtr
exint entries() const
Alias of size(). size() is preferred.
#define UT_ConcurrentHashMap
UT_TagListPtr createListForName(int name_index)
WeakKey & operator=(const WeakKey &key)
const UT_TagManager & getManager() const
int64 getMemUsage() const
int64 getMemUsage() const
UT_TagManager & getManager()
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
bool operator==(const WeakKey &k) const
UT_TagExpressionPtr createExpression(const char *expr, UT_String &errs)