The Gaudi Framework  master (bdbe7744)
Loading...
Searching...
No Matches
cpluginsvc.Factory Class Reference
Inheritance diagram for cpluginsvc.Factory:
Collaboration diagram for cpluginsvc.Factory:

Public Member Functions

 name (self)
 library (self)
 type (self)
 classname (self)
 properties (self)
 load (self)
 __repr__ (self)

Public Attributes

 library

Static Protected Attributes

list _fields_

Detailed Description

Factory holds informations about a component's factory:
- its name
- the library hosting that component
- the type of component (algorithm, service, tool, ...)
- the return type of this factory
- the C++ class name of that component
- the properties which may decorate that component.

Definition at line 108 of file cpluginsvc.py.

Member Function Documentation

◆ __repr__()

cpluginsvc.Factory.__repr__ ( self)

Definition at line 153 of file cpluginsvc.py.

153 def __repr__(self):
154 return f"<Factory id={self.name} library={self.library} type={self.type} class={self.classname} props={len(self.properties)}>"
155

◆ classname()

cpluginsvc.Factory.classname ( self)

Definition at line 137 of file cpluginsvc.py.

137 def classname(self):
138 return _lib.cgaudi_factory_get_classname(self).decode("ascii")
139

◆ library()

cpluginsvc.Factory.library ( self)

Definition at line 129 of file cpluginsvc.py.

129 def library(self):
130 return _lib.cgaudi_factory_get_library(self).decode("ascii")
131

◆ load()

cpluginsvc.Factory.load ( self)
load the C++ library hosting this factory

Definition at line 149 of file cpluginsvc.py.

149 def load(self):
150 """load the C++ library hosting this factory"""
151 return ctypes.CDLL(self.library, ctypes.RTLD_GLOBAL)
152

◆ name()

cpluginsvc.Factory.name ( self)

Definition at line 125 of file cpluginsvc.py.

125 def name(self):
126 return self._id.decode("ascii")
127

◆ properties()

cpluginsvc.Factory.properties ( self)

Definition at line 141 of file cpluginsvc.py.

141 def properties(self):
142 props = {}
143 nprops = _lib.cgaudi_factory_get_property_size(self)
144 for i in range(nprops):
145 prop = _lib.cgaudi_factory_get_property_at(self, i)
146 props[prop.key] = prop.value
147 return props
148

◆ type()

cpluginsvc.Factory.type ( self)

Definition at line 133 of file cpluginsvc.py.

133 def type(self):
134 return _lib.cgaudi_factory_get_type(self).decode("ascii")
135

Member Data Documentation

◆ _fields_

list cpluginsvc.Factory._fields_
staticprotected
Initial value:
= [
("_registry", Registry),
("_id", ctypes.c_char_p),
]

Definition at line 119 of file cpluginsvc.py.

◆ library

cpluginsvc.Factory.library

Definition at line 151 of file cpluginsvc.py.


The documentation for this class was generated from the following file: