The Gaudi Framework  master (ff829712)
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
 
 name
 
 type
 
 classname
 
 properties
 

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 100 of file cpluginsvc.py.

Member Function Documentation

◆ __repr__()

cpluginsvc.Factory.__repr__ ( self)

Definition at line 145 of file cpluginsvc.py.

145 def __repr__(self):
146 return "<Factory id=%s library=%s type=%s class=%s props=%d>" % (
147 self.name,
148 self.library,
149 self.type,
150 self.classname,
151 len(self.properties),
152 )
153

◆ classname()

cpluginsvc.Factory.classname ( self)

Definition at line 129 of file cpluginsvc.py.

129 def classname(self):
130 return _lib.cgaudi_factory_get_classname(self).decode("ascii")
131

◆ library()

cpluginsvc.Factory.library ( self)

Definition at line 121 of file cpluginsvc.py.

121 def library(self):
122 return _lib.cgaudi_factory_get_library(self).decode("ascii")
123

◆ load()

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

Definition at line 141 of file cpluginsvc.py.

141 def load(self):
142 """load the C++ library hosting this factory"""
143 return ctypes.CDLL(self.library, ctypes.RTLD_GLOBAL)
144

◆ name()

cpluginsvc.Factory.name ( self)

Definition at line 117 of file cpluginsvc.py.

117 def name(self):
118 return self._id.decode("ascii")
119

◆ properties()

cpluginsvc.Factory.properties ( self)

Definition at line 133 of file cpluginsvc.py.

133 def properties(self):
134 props = {}
135 nprops = _lib.cgaudi_factory_get_property_size(self)
136 for i in range(nprops):
137 prop = _lib.cgaudi_factory_get_property_at(self, i)
138 props[prop.key] = prop.value
139 return props
140

◆ type()

cpluginsvc.Factory.type ( self)

Definition at line 125 of file cpluginsvc.py.

125 def type(self):
126 return _lib.cgaudi_factory_get_type(self).decode("ascii")
127

Member Data Documentation

◆ _fields_

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

Definition at line 111 of file cpluginsvc.py.

◆ classname

cpluginsvc.Factory.classname

Definition at line 150 of file cpluginsvc.py.

◆ library

cpluginsvc.Factory.library

Definition at line 143 of file cpluginsvc.py.

◆ name

cpluginsvc.Factory.name

Definition at line 147 of file cpluginsvc.py.

◆ properties

cpluginsvc.Factory.properties

Definition at line 151 of file cpluginsvc.py.

◆ type

cpluginsvc.Factory.type

Definition at line 149 of file cpluginsvc.py.


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