26 #ifndef __OP_INPUTCHANGEHELPER_H__
27 #define __OP_INPUTCHANGEHELPER_H__
41 myUniquesAndCounts.setCapacity(0);
50 setDuplicateCount(which_input, -1, -1, node.
maxInputs());
52 resetChangedSourceFlags();
64 if (!checkChangedSourceFlags(node, idx, changed))
96 changed |= (src->
getCookCount() != getDuplicateCount(idx));
102 int64 mem = inclusive ?
sizeof(*this) : 0;
103 mem += myUniquesAndCounts.getMemoryUsage(
false);
108 int getDuplicateCount(
int idx)
110 if (idx >= 0 && idx*2+1 < myUniquesAndCounts.entries())
111 return myUniquesAndCounts(idx*2 + 1);
114 int getUniqueId(
int idx)
116 if (idx >= 0 && idx*2 < myUniquesAndCounts.entries())
117 return myUniquesAndCounts(idx*2);
120 void setDuplicateCount(
int idx,
int uniqueid,
int count,
int max_inputs)
122 if (idx >= 0 && idx < max_inputs)
124 int insertionidx = idx * 2;
125 while (insertionidx + 1 >= myUniquesAndCounts.entries())
126 myUniquesAndCounts.append(-1);
127 myUniquesAndCounts(insertionidx) = uniqueid;
128 myUniquesAndCounts(insertionidx+1) =
count;
133 myUniquesAndCounts.entries(0);
142 #endif // __OP_INPUTCHANGEHELPER_H__
virtual unsigned maxInputs() const
Maximum inputs that can be connected to a node.
virtual OP_ERROR error(OP_Context &context)
OP_Node * getInputFollowingOutputs(int input, DEP_MicroNode *depnode=0) const
SIM_API const UT_StringHolder force