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);
101 bool english=
true)
const;
104 bool filterhidden =
false)
const;
111 {
return myUniqueOpTypeID; }
120 {
return myScriptDirectory; }
123 unsigned getStatus()
const;
124 void setDefaultType(
const char *type);
125 const char *getDefaultType()
const;
128 bool setOpRename(
const char *optype,
const char *newname,
129 std::ostream *err =
nullptr);
131 void outputOpRenames(std::ostream &os)
const;
134 bool setOpAlias(
const char *optype,
136 std::ostream *err =
nullptr);
140 bool setOpFirstName(
const char *type,
141 const char *firstname,
142 std::ostream *err =
nullptr);
144 void outputOpAliases(std::ostream &os)
const;
146 void outputOpFirstNames(std::ostream &os)
const;
148 void getOpAliases(
const char *opname,
151 const char *getOpFromAlias(
const char *alias)
const;
154 bool setOpOverride(
const char *optype,
155 const char *
override,
156 bool keep_parms,
bool keep_contents,
157 std::ostream *err =
nullptr);
159 bool clearOpOverride(
const char *optype,
160 std::ostream *err =
nullptr);
162 void outputOpOverrides(std::ostream &os)
const;
164 void getOpOverrides(
const char *opname,
168 bool addOpExcluded(
const char *opname,
169 std::ostream *err =
nullptr);
171 bool isOpExcluded(
const char *opname)
const;
173 void outputOpExcluded(std::ostream &os)
const;
175 bool addOpHidden(
const char *opname,
176 std::ostream *err =
nullptr);
178 void delOpHidden(
const char *opname);
180 bool isOpHidden(
const char *opname)
const;
185 bool isOpExperimental(
const UT_StringRef &opname)
const;
187 bool addOpExperimental(
const char *opname,
188 std::ostream *err =
nullptr);
191 bool setOpDeprecated(
const char *opname,
193 const char *replacement = 0,
194 std::ostream *err =
nullptr);
196 bool isOpDeprecated(
const char *opname)
const;
199 bool getDeprecationInfo(
const char *opname,
203 void outputOpDeprecated(std::ostream &os)
const;
208 std::ostream *err =
nullptr);
212 bool hasSpecificOpDefaultColor(
215 void clearOpDefaultColors();
217 void outputOpDefaultColors(std::ostream &os)
const;
222 std::ostream *err =
nullptr);
226 bool hasSpecificOpDefaultShape(
229 void clearOpDefaultShapes();
231 void outputOpDefaultShapes(std::ostream &os)
const;
240 void getDefaultNodeName(
const char *type,
UT_String &name);
244 const char *getScriptedSubnetIndex()
const;
249 void notifyUpdateTableSinksOfUpdate();
252 {
return theLoadDSOFlag; }
254 { theLoadDSOFlag = i; }
255 static unsigned getPermissionMask(
const OP_Operator *op);
256 static void clearPermissionMask(
const OP_Operator *op);
260 static void initializeOpThemes();
265 static void buildOpTypeNamespaceHierarchy();
269 static const char *getOpTypeNamespaceHierarchyPref();
277 void getCandidateOperatorNamesInPrecedenceOrder(
293 const char *getPreferredOperatorName(
const char *opname,
303 static bool alwaysReuseScriptOperatorCallback(
306 static bool neverReuseScriptOperatorCallback(
315 void notifyUpdateTableSinksOfDelete();
319 std::ostream *err =
nullptr);
320 int loadScriptIndexFile(OP_ScriptIndexFile &sif,
325 {
return myOpNamespaceHierarchy; }
334 const char *opname,
bool exact_opname);
345 int myUniqueOpTypeID;
346 static int theLoadDSOFlag;
360 bool isEmpty()
const;
374 bool myIsExperimental:1;
375 bool myIsOverridden:1;
385 static UT_String theOpTypeNamespaceHierarchyPref;
386 static bool theOpThemesInitialized;
396 { removeAllTableSinks(); }
400 { removeUpdateTableSink(table); }
406 table->addUpdateTableSink(
this);
407 myOpTables.append(table, 1);
412 table->removeUpdateTableSink(
this);
413 myOpTables.findAndRemove(table);
417 for(
int i = myOpTables.entries(); i --> 0; )
418 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)
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)