13 #ifndef __VOP_ExportedParms_h__
14 #define __VOP_ExportedParms_h__
35 } VOP_ExportedParmType;
40 : myType(STARTGROUP), myName(groupname),
44 : myType(ENTRY), myNodeId(vop->getUniqueId()) {
52 {
return myName.c_str(); }
61 return VOP_Node::castToParmGenerator(node);
67 {
return myType == o.myType && myName == o.myName && myNodeId == o.myNodeId; }
70 {
return myType != o.myType || myName != o.myName || myNodeId != o.myNodeId; }
73 VOP_ExportedParmType myType;
88 for (i=0; i<src_list.
entries(); i++)
100 for (i=0; i<src.
entries(); i++)
110 for (i = 0; i <
entries(); ++i)
111 if ((*
this)(i) !=
src(i))
116 {
return !(*
this ==
s); }
121 = UTmakeUnique<VOP_ExportedParm>(parm);
122 myParmNodes[new_parm->getOpId()] = new_parm.
get();
123 myParms.
append(std::move(new_parm));
128 = UTmakeUnique<VOP_ExportedParm>(parm);
129 myParmNodes[new_parm->getOpId()] = new_parm.
get();
130 myParms.
insert(std::move(new_parm), idx);
134 myParms.
move(first, last, newpos);
138 int node_id = myParms(idx)->getOpId();
139 myParmNodes.erase(node_id);
156 for (
int i=0; i<myParms.
entries(); i++)
158 const char *code_parm_name;
159 code_parm_name = myParms(i)->getName();
163 if (::strcmp(code_parm_name, parm_name) == 0)
174 auto it = myParmNodes.find(node_id);
175 if (it == myParmNodes.end())
178 return it->second->getName();
183 return *myParms(idx);
187 return *myParms(idx);
195 return myParmNodes.
contains(node_id);
202 for (
int i=0; i<myParms.
entries(); i++)
204 const char *code_parm_name;
205 code_parm_name = myParms(i)->getName();
209 if (::strcmp(code_parm_name, parm_name) == 0)
const VOP_ExportedParmList & operator=(const VOP_ExportedParmList &src)
void move(exint src_idx, exint dst_idx, exint how_many)
const UT_StringHolder & getParmNameCache() const
exint removeIndex(exint index)
void insert(const VOP_ExportedParm &parm, int idx)
V get(const key_type &key, const V &defval) const
#define OP_INVALID_NODE_ID
VOP_ParmGenerator * getOp() const
void append(const VOP_ExportedParm &parm)
const char * getName() const
VOP_ExportedParm & operator()(int idx)
void setName(const char *name)
const VOP_ExportedParm & operator()(int idx) const
GLuint const GLchar * name
const char * getParmName(int node_id) const
bool hasParmName(const char *parm_name) const
exint entries() const
Alias of size(). size() is preferred.
bool operator==(const VOP_ExportedParmList &src) const
__hostdev__ uint64_t last(uint32_t i) const
void move(int first, int last, int newpos)
VOP_ExportedParm(const char *groupname)
int getParmIndex(const char *parm_name) const
bool operator==(const VOP_ExportedParm &o) const
static OP_Node * lookupNode(int unique_id, bool include_proxy=false)
bool hasNode(int node_id) const
bool operator!=(const VOP_ExportedParm &o) const
void clear()
Resets list to an empty list.
VOP_ExportedParmList(const VOP_ExportedParmList &src_list)
VOP_ExportedParmType getType() const
VOP_ExportedParm(VOP_ParmGenerator *vop)
bool operator!=(const VOP_ExportedParmList &s) const
exint insert(exint index)
bool contains(const key_type &key) const
Returns true if a value with the key is contained in the map.