11 #ifndef __APEX_REGISTRY_H__
12 #define __APEX_REGISTRY_H__
48 class APEX_OverloadSet;
104 static constexpr
UT_StringLit theCallbackRegistryGraphFolder =
"apexgraph";
106 static constexpr
UT_StringLit theComponentRegistryGraphFolder =
"apexcomponent";
107 static constexpr
UT_StringLit theConstraintRegistryName =
"constraint";
108 static constexpr
UT_StringLit theConstraintRegistryGraphFolder =
"apexconstraint";
110 static constexpr
UT_StringLit theControlRegistryGraphFolder =
"apexcontrol";
142 bool add_to_registry_map =
true);
149 void addCallbacks(std::vector<const APEX_FunctionBase *> &&funcs);
153 exint numCallbacks(
bool include_ancestors =
false)
const;
158 bool include_ancestors =
false)
const;
166 bool include_ancestors =
false)
const;
171 bool include_ancestors =
false)
const;
176 bool include_ancestors =
false)
const;
183 void loadCallbackLibrary(
const char *dllpath);
186 bool loadSubGraphLibrary(
const char *filepath);
189 bool loadSubGraphLibrary(
const GU_DetailHandle &gdh,
const char *filepath =
"",
193 void loadCompatibilityFile(
const char *filepath);
198 void clearSubGraphs(
bool except_geo_loaded =
false);
202 void reloadSubGraphLibraries();
205 exint numSubGraphs(
bool include_ancestors =
false)
const;
210 bool include_ancestors =
false)
const;
217 bool include_ancestors =
false)
const;
222 bool include_ancestors =
false)
const;
227 bool include_ancestors =
false)
const;
237 bool include_ancestors =
false)
const;
248 bool include_ancestors =
false)
const;
255 bool include_ancestors =
false)
const;
259 void getNamesInPrecedenceOrder(
261 const char *fullname,
262 bool include_ancestors =
false)
const;
269 bool include_ancestors =
false)
const;
274 bool include_ancestors =
false)
const;
279 bool include_ancestors =
false)
const;
282 const Dict &getParmDefaults(
284 bool include_ancestors =
false)
const;
289 bool include_ancestors =
false)
const;
301 getCompatibilityResolver(
304 bool include_ancestors =
false)
const;
326 void loadCallbackLibrariesFromPath(
const UT_StringRef &dirname);
327 void loadCompatibilityFilesFromPath(
const UT_StringRef &dirname);
335 const SubGraphData *getSubGraphData(
337 bool include_ancestors =
false)
const;
382 return *the_registries;
400 APEX_Registry::registryList(
bool include_ancestors)
const
402 return include_ancestors ? myAncestorRegistryList : myRegistryList;
412 count += reg->mySubGraphs.size();
424 count += reg->myCallbacks.size();
432 return myCompatibilityMap;
443 APEX_Registry::bumpDataId()
453 : myType(type), myNames(names)
472 return myEventNotifier;
477 #endif // __APEX_REGISTRY_H__
static UT_ArrayStringMap< UT_SharedPtr< APEX_Registry > > & allRegistries()
Returns the global registry map. Registries are looked up by their name.
void(*)(APEX_Registry &) addApexFunctionPtr
GA_DataId getDataId() const
const APEX_CompatibilityMap & getCompatibilityMap() const
UT_NotifierImpl< const APEX_RegistryEvent & > & getEventNotifier()
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
std::enable_shared_from_this< T > UTenable_shared_from_this
GLint GLint GLsizei GLint GLenum GLenum type
APEX_RegistryEvent(Type type, const UT_StringArray &names=UT_StringArray())
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
std::string OIIO_UTIL_API replace(string_view str, string_view pattern, string_view replacement, bool global=false)
static UT_SharedPtr< APEX_Registry > findOrCreateComponentRegistry(bool load_subgraphs=true)
Returns the APEX registries.
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
static UT_SharedPtr< APEX_Registry > findOrCreateConstraintRegistry(bool load_subgraphs=true)
Returns the APEX registries.
GLuint const GLchar * name
std::function< T > UT_Function
static UT_SharedPtr< APEX_Registry > findOrCreateControlRegistry(bool load_subgraphs=true)
Returns the APEX registries.
GT_API const UT_StringHolder version
UT_SharedPtr< APEX_Registry > APEX_RegistryPtr
UT_SharedPtr< APEX_OverloadSet > APEX_OverloadSetPtr
exint numCallbacks(bool include_ancestors=false) const
Returns the number of callback nodes in the registry.
static UT_SharedPtr< APEX_Registry > findOrCreateRegistry(APEX_RegistryType reg_type)
Returns the APEX registry using its registry type.
UT_Array< APEX_RegistryPtr > APEX_RegistryPtrList
static UT_SharedPtr< APEX_Registry > findOrCreateCallbackRegistry(bool load_subgraphs=true)
Returns the APEX registries.
const UT_StringArray & getNames() const
exint numSubGraphs(bool include_ancestors=false) const
Returns the number of subgraph nodes tracked by the registry.
Type
Enumeration of event types.