12 #ifndef __OP_OperatorTable_h__
13 #define __OP_OperatorTable_h__
31 class OP_ScriptIndexFile;
60 int *aliasedScriptedOp = 0,
61 bool exact_type =
false);
65 std::ostream *err =
nullptr);
69 {
return myPrimarySubnet; }
73 void addScriptIndexFile(
const char *indexpath,
74 const char *indexfile,
76 const char *extrainfo,
81 bool loadScriptOperator(
const char *opname,
UT_IStream &is,
84 bool canReuseOperator(
95 bool loadDSO(
const char *dso_file);
98 bool runDSO(
const char* lib_path);
101 {
return myOpCount; }
104 bool english=
true)
const;
107 bool filterhidden =
false)
const;
114 {
return myUniqueOpTypeID; }
123 {
return myScriptDirectory; }
126 unsigned getStatus()
const;
127 void setDefaultType(
const char *type);
128 const char *getDefaultType()
const;
131 bool setOpRename(
const char *optype,
const char *newname,
132 std::ostream *err =
nullptr);
134 void outputOpRenames(std::ostream &os)
const;
137 bool setOpAlias(
const char *optype,
139 std::ostream *err =
nullptr);
143 bool setOpFirstName(
const char *type,
144 const char *firstname,
145 std::ostream *err =
nullptr);
147 void outputOpAliases(std::ostream &os)
const;
149 void outputOpFirstNames(std::ostream &os)
const;
151 void getOpAliases(
const char *opname,
154 const char *getOpFromAlias(
const char *alias)
const;
157 bool setOpOverride(
const char *optype,
158 const char *
override,
159 bool keep_parms,
bool keep_contents,
160 std::ostream *err =
nullptr);
162 bool clearOpOverride(
const char *optype,
163 std::ostream *err =
nullptr);
165 void outputOpOverrides(std::ostream &os)
const;
167 void getOpOverrides(
const char *opname,
171 bool addOpExcluded(
const char *opname,
172 std::ostream *err =
nullptr);
174 bool isOpExcluded(
const char *opname)
const;
176 void outputOpExcluded(std::ostream &os)
const;
178 bool addOpHidden(
const char *opname,
179 std::ostream *err =
nullptr);
181 void delOpHidden(
const char *opname);
183 bool isOpHidden(
const char *opname)
const;
188 bool isOpExperimental(
const UT_StringRef &opname)
const;
190 bool addOpExperimental(
const char *opname,
191 std::ostream *err =
nullptr);
194 bool setOpDeprecated(
const char *opname,
196 const char *replacement = 0,
197 std::ostream *err =
nullptr);
199 bool isOpDeprecated(
const char *opname)
const;
202 bool getDeprecationInfo(
const char *opname,
206 void outputOpDeprecated(std::ostream &os)
const;
211 std::ostream *err =
nullptr);
215 bool hasSpecificOpDefaultColor(
218 void clearOpDefaultColors();
220 void outputOpDefaultColors(std::ostream &os)
const;
225 std::ostream *err =
nullptr);
229 bool hasSpecificOpDefaultShape(
232 void clearOpDefaultShapes();
234 void outputOpDefaultShapes(std::ostream &os)
const;
243 void getDefaultNodeName(
const char *type,
UT_String &name);
247 const char *getScriptedSubnetIndex()
const;
252 void notifyUpdateTableSinksOfUpdate();
255 {
return theLoadDSOFlag; }
257 { theLoadDSOFlag = i; }
258 static unsigned getPermissionMask(
const OP_Operator *op);
259 static void clearPermissionMask(
const OP_Operator *op);
263 static void initializeOpThemes();
268 static void buildOpTypeNamespaceHierarchy();
272 static const char *getOpTypeNamespaceHierarchyPref();
280 void getCandidateOperatorNamesInPrecedenceOrder(
296 const char *getPreferredOperatorName(
const char *opname,
303 const char *node_name)
const;
306 static bool alwaysReuseScriptOperatorCallback(
309 static bool neverReuseScriptOperatorCallback(
318 void notifyUpdateTableSinksOfDelete();
322 std::ostream *err =
nullptr);
323 int loadScriptIndexFile(OP_ScriptIndexFile &sif,
328 {
return myOpNamespaceHierarchy; }
337 const char *opname,
bool exact_opname);
348 int myUniqueOpTypeID;
349 static int theLoadDSOFlag;
363 bool isEmpty()
const;
377 bool myIsExperimental:1;
378 bool myIsOverridden:1;
388 static UT_String theOpTypeNamespaceHierarchyPref;
389 static bool theOpThemesInitialized;
399 { removeAllTableSinks(); }
403 { removeUpdateTableSink(table); }
409 table->addUpdateTableSink(
this);
410 myOpTables.append(table, 1);
415 table->removeUpdateTableSink(
this);
416 myOpTables.findAndRemove(table);
420 for(
int i = myOpTables.entries(); i --> 0; )
421 removeUpdateTableSink(myOpTables(i));
bool(* OP_ScriptCanReuseFunc)(const OP_ScriptOperator *script_operator, const OP_OTLDefinition &new_definition)
virtual ~OP_UpdateTableSink()
void removeAllTableSinks()
OP_Operator * getPrimarySubnetOperator()
static void setLoadDSOFlag(int i)
GLint GLint GLsizei GLint GLenum GLenum type
static int getLoadDSOFlag()
int getUniqueOpTypeID() const
GLuint const GLchar * name
GLenum GLenum GLsizei void * table
UT_SymbolMap< OP_OperatorTable * > OP_OperatorTableMap
UT_ValArray< OP_OperatorTable * > OP_OperatorTableList
GT_API const UT_StringHolder version
virtual void tableDeleted(OP_OperatorTable *table)
OP_ScriptOperator *(* OP_ScriptCreatorFunc)(const OP_OTLDefinition &definition)
const UT_String & getName() const
void removeUpdateTableSink(OP_OperatorTable *table)
const UT_String & getScriptPath() const
void addUpdateTableSink(OP_OperatorTable *table)