About
Interface implementations stored at a registry are used by accessing the component class with the given maxon::Id from the registry. Then it is possible to create a reference class instance to use the implementation.
Registry Access
Registries are based on the maxon::Registry class. A given element stored in a registry is identified with a maxon::Id.
  
 
  
  const maxon::Id redID { 
"net.maxonexample.class.colors.red" };
 
 
  if (componentClass == nullptr)
 
  
  const ColorRef color = componentClass->Create() 
iferr_return;
 
 
  
 
 
Definition: objectbase.h:696
 
Definition: apibaseid.h:243
 
Definition: string.h:1237
 
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:170
 
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
 
#define iferr_return
Definition: resultbase.h:1524
 
A color consisting of three components R, G and B.
Definition: col.h:16
 
 One can also simply loop through all elements with maxon::Registry::GetEntries():
  
 
  for (const auto& it : ColorClasses::GetEntries())
  {
    
 
    
    const ColorRef color = componentClass.Create() 
iferr_return;
 
 
    
 
 
  }
  
Further Reading