8 #ifndef __GOP_GroupParse_h__
9 #define __GOP_GroupParse_h__
36 class gop_PendingParse;
44 friend class gopAddData;
53 : myNumericTokensFlag(false),
54 myAttributeTokensFlag(false),
55 myNameTokensFlag(false),
56 myAccumulateAttributes(false)
62 {
return myNumericTokensFlag || myAttributeTokensFlag; }
65 { myNameTokensFlag =
value; }
67 { myNumericTokensFlag =
value; }
69 { myAttributeTokensFlag =
value; }
73 {
if( myAccumulateAttributes) myAttributeTokens.append(s); }
75 {
return myAttributeTokens; }
78 bool myNumericTokensFlag;
79 bool myAttributeTokensFlag;
80 bool myNameTokensFlag;
81 bool myAccumulateAttributes;
96 : myConstDetail(detail)
97 , myNonConstDetail(NULL)
100 : myConstDetail(detail)
101 , myNonConstDetail(detached ? NULL : detail)
109 return *myConstDetail;
126 static void buildPrimGroupToken(
const GEO_Detail *gdp,
131 static void buildPointGroupToken(
const GEO_Detail *gdp,
139 static void buildPrimElementToken(
const GEO_Detail *gdp,
143 static void buildPointElementToken(
const GEO_Detail *gdp,
150 static int parseVectorAttributeComponent(
165 numok,
true, ordered, strict,
offset, info));
177 numok,
true, ordered, strict,
offset, info));
181 const GroupCreator &creator,
185 ParseInfo *info = NULL);
200 numok,
false, ordered, strict,
offset));
212 numok,
false, ordered, strict,
offset));
216 const GroupCreator &creator,
220 ParseInfo *info = 0);
222 void expandGroupMask(
const char *
pattern,
238 static bool isGroupNumeric(
const char*
pattern);
240 static void matchGroups(
246 {
return (::strchr(pattern,
'@') !=
nullptr); }
253 const GroupCreator &creator,
255 bool allow_reference,
259 ParseInfo *info = NULL);
260 GA_Group *constCastParseGroups(
const char *inpattern,
262 const GroupCreator &creator,
264 bool allow_reference,
268 ParseInfo *info = NULL)
271 inpattern, type, creator, allow_numeric,
272 allow_reference, ordered, strict, offset, info);
274 "This group must be a newly-created, ad-hoc group!");
286 char *parseNumericBlock(
char *
pattern,
bool is_prim,
287 const GroupCreator &creator,
291 gop_PendingParse *pending_parse);
297 char *parseAttributeGroup(
GA_Group *group,
300 bool ordered, ParseInfo *info = NULL);
302 GA_Group *createAdhocGroup(
const GroupCreator &creator,
304 void appendAdhocGroup(
GA_Group *group,
bool ismetheowner);
305 void destroyAdhocGroup(
const GA_Group *group);
307 friend class gop_PendingNamePatternParse;
Definition of a geometry attribute.
const UT_StringArray & getAttributeTokens() const
void setParsedNumericToken(bool value=true)
GA_PointGroup * parsePointGroupsCopy(const char *pat, const GroupCreator &creator, bool numok, bool ordered, bool strict, GA_Index offset=GA_Index(0))
GroupCreator(GEO_Detail *detail, bool detached)
void setParsedNameToken(bool value=true)
void setParsedAttributeToken(bool value=true)
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
const GEO_Detail * myConstDetail
#define UT_ASSERT_MSG_P(ZZ,...)
const GA_PrimitiveGroup * parsePrimitiveGroups(const char *pat, const GroupCreator &creator, bool numok, bool ordered, bool strict, GA_Index offset=GA_Index(0), ParseInfo *info=NULL)
A string map of attributes to ease backward compatibility In the GB/GEO/GU library code would often p...
void addAttributeToken(const UT_StringHolder &s)
const GA_PointGroup * parsePointGroups(const char *pat, const GroupCreator &creator, bool numok, bool ordered, bool strict, GA_Index offset=GA_Index(0), ParseInfo *info=NULL)
GOP_GroupParse(GOP_Manager *manager)
GA_PrimitiveGroup * parsePrimitiveGroupsCopy(const char *pat, const GroupCreator &creator, bool numok, bool ordered, bool strict, GA_Index offset=GA_Index(0))
static bool hasAttributePattern(const char *pattern)
GroupCreator(const GEO_Detail *detail)
GEO_Detail * myNonConstDetail
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
bool getParsedAdhocTokens() const
void setAccumulateAttributes()
const GEO_Detail & getDetail() const
GA_GroupType
An ordinal enum for the different types of groups in GA.
bool getParsedNameTokens() const
GLsizei const GLfloat * value
Container class for all geometry.