The Gaudi Framework  master (fb3055f7)
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 101 of file cpluginsvc.py.

Member Function Documentation

◆ __repr__()

cpluginsvc.Factory.__repr__ ( self)

Definition at line 146 of file cpluginsvc.py.

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

◆ classname()

cpluginsvc.Factory.classname ( self)

Definition at line 130 of file cpluginsvc.py.

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

◆ library()

cpluginsvc.Factory.library ( self)

Definition at line 122 of file cpluginsvc.py.

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

◆ load()

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

Definition at line 142 of file cpluginsvc.py.

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

◆ name()

cpluginsvc.Factory.name ( self)

Definition at line 118 of file cpluginsvc.py.

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

◆ properties()

cpluginsvc.Factory.properties ( self)

Definition at line 134 of file cpluginsvc.py.

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

◆ type()

cpluginsvc.Factory.type ( self)

Definition at line 126 of file cpluginsvc.py.

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

Member Data Documentation

◆ _fields_

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

Definition at line 112 of file cpluginsvc.py.

◆ classname

cpluginsvc.Factory.classname

Definition at line 151 of file cpluginsvc.py.

◆ library

cpluginsvc.Factory.library

Definition at line 144 of file cpluginsvc.py.

◆ name

cpluginsvc.Factory.name

Definition at line 148 of file cpluginsvc.py.

◆ properties

cpluginsvc.Factory.properties

Definition at line 152 of file cpluginsvc.py.

◆ type

cpluginsvc.Factory.type

Definition at line 150 of file cpluginsvc.py.


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