9 #ifndef __PDG_ATTRIBUTE_MERGE_H__
10 #define __PDG_ATTRIBUTE_MERGE_H__
43 eAttribRegular = 0x01,
78 , myPreserveArray(false)
87 , myPreserveArray(preserve_array)
112 {
return myAttributeTypes; }
121 {
return myIsInternalDependent; }
125 {
return myCollisionStrategy; }
134 { myDefaultOp.myMergeOp = merge_op; }
139 { myInputOp.myMergeOp = merge_op; }
144 { myOutputOp.myMergeOp = merge_op; }
148 { myIsMergeAdded = merge_added; }
154 { myCollisionStrategy = strategy; }
158 { myForceIgnore.insert(name); }
163 { myIsInternalDependent = dependent; }
167 bool isMergeFlatten()
const;
171 bool isMergeAdded()
const;
175 void reportErrors(
PDG_Node* node)
const;
178 static bool arePatternsEqual(
const Pattern&
left,
179 const Pattern&
right);
222 void addCollisionError(
235 const Pending& pendingOps()
const
236 {
return myPendingOps; }
239 static bool requiresPending(
244 const MergeData* matchAttrib(
249 MergeErrors myMergeErrors;
252 Pending myPendingOps;
253 const Pattern& myMergePattern;
257 int myAttributeTypes;
258 AttribFlatten myAttribFlatten;
260 MergeData myDefaultOp;
262 MergeData myOutputOp;
268 bool myIsInternalDependent;
void setIsMergeAdded(bool merge_added)
Sets the is merge added flag.
PDG_AttributeMergeOp myMergeOp
MergeData(const UT_StringHolder &pattern, PDG_AttributeMergeOp merge_op, bool preserve_array)
void addForceIgnore(const UT_StringHolder &name)
Adds an attibute name to the list of forced ignore attributes.
ImageBuf OIIO_API flatten(const ImageBuf &src, ROI roi={}, int nthreads=0)
bool isDeep() const
Returns true if merging should always do a deep copy of attribs.
void setAttribCollision(PDG_AttributeCollision strategy)
void setOutputMerge(PDG_AttributeMergeOp merge_op)
Adds a merge type for output files.
AttribTable
Enumeration of attribute tables.
PDG_AttributePattern myPattern
PDG_AttributeCollision attribCollision() const
Returns the attribute collision strategy.
GLuint const GLchar * name
PDG_AttributeMergeOp
Enumeration of different ways that attributes can be combined.
static const Pattern theEmptyPattern
The default, empty merge pattern.
void setIsInternalDependent(bool dependent)
PDG_AttributeType
Enumeration of possible attribute types.
void setAttribFlatten(AttribFlatten flatten)
Sets the attribute flatten mode.
AttribType
Enumeration of types of data types to merge.
Never flatten the attribute maps.
int attribTypes() const
Returns the attribute type filter.
PDG_AttributeMergeError
Enumerations of errors that can occur when merging attributes.
bool isInternalDependent() const
void setInputMerge(PDG_AttributeMergeOp merge_op)
Adds a merge type for input files.
Always flatten the attribute maps.
MergeData(PDG_AttributeMergeOp merge_op)
void setDefaultMerge(PDG_AttributeMergeOp merge_op)
Sets the default merge operation.