11 #ifndef __APEX_REGISTRY_H__
12 #define __APEX_REGISTRY_H__
36 #include <initializer_list>
50 class APEX_OverloadSet;
107 static constexpr
UT_StringLit theBrushRegistryGraphFolder =
"apexbrush";
109 static constexpr
UT_StringLit theCallbackRegistryGraphFolder =
"apexgraph";
111 static constexpr
UT_StringLit theComponentRegistryGraphFolder =
"apexcomponent";
112 static constexpr
UT_StringLit theConstraintRegistryName =
"constraint";
113 static constexpr
UT_StringLit theConstraintRegistryGraphFolder =
"apexconstraint";
115 static constexpr
UT_StringLit theControlRegistryGraphFolder =
"apexcontrol";
148 bool add_to_registry_map =
true);
155 void addCallbacks(std::initializer_list<const APEX_FunctionBase *> funcs);
159 exint numCallbacks(
bool include_ancestors =
false)
const;
164 bool include_ancestors =
false)
const;
172 bool include_ancestors =
false)
const;
177 bool include_ancestors =
false)
const;
182 bool include_ancestors =
false)
const;
189 void loadCallbackLibrary(
const char *dllpath);
192 bool loadSubGraphLibrary(
const char *filepath);
195 bool loadSubGraphLibrary(
const GU_DetailHandle &gdh,
const char *filepath =
"",
199 void loadCompatibilityFile(
const char *filepath);
204 void clearSubGraphs(
bool except_geo_loaded =
false);
208 void reloadSubGraphLibraries();
211 exint numSubGraphs(
bool include_ancestors =
false)
const;
216 bool include_ancestors =
false)
const;
223 bool include_ancestors =
false)
const;
228 bool include_ancestors =
false)
const;
233 bool include_ancestors =
false)
const;
243 bool include_ancestors =
false)
const;
254 bool include_ancestors =
false)
const;
261 bool include_ancestors =
false)
const;
265 void getNamesInPrecedenceOrder(
267 const char *fullname,
268 bool include_ancestors =
false)
const;
275 bool include_ancestors =
false)
const;
280 bool include_ancestors =
false)
const;
285 bool include_ancestors =
false)
const;
288 const Dict &getParmDefaults(
290 bool include_ancestors =
false)
const;
295 bool include_ancestors =
false)
const;
307 getCompatibilityResolver(
310 bool include_ancestors =
false)
const;
339 void loadCallbackLibrariesFromPath(
const UT_StringRef &dirname);
340 void loadCompatibilityFilesFromPath(
const UT_StringRef &dirname);
351 const SubGraphData *getSubGraphData(
353 bool include_ancestors =
false)
const;
401 return *the_registries;
419 APEX_Registry::registryList(
bool include_ancestors)
const
421 return include_ancestors ? myAncestorRegistryList : myRegistryList;
431 count += reg->mySubGraphs.size();
443 count += reg->myCallbacks.size();
451 return myCompatibilityMap;
462 APEX_Registry::bumpDataId()
470 myRegistryType = reg_type;
478 : myType(type), myNames(names)
497 return myEventNotifier;
502 #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.