GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | List of all members
go4py.internals.facade.Facade Class Reference
+ Inheritance diagram for go4py.internals.facade.Facade:

Public Member Functions

def __init__
 
def __call__
 

Public Attributes

 modulename
 

Detailed Description

Definition at line 5 of file facade.py.

Constructor & Destructor Documentation

def go4py.internals.facade.Facade.__init__ (   self,
  modulename 
)
Replaces a module with an instance of a types.ModuleType-based class
modulename is probably given by __name__ in that module

Example:
    @Facade(__name__)
    class AnInteriorClass(ModuleType):
pass

Definition at line 7 of file facade.py.

Member Function Documentation

def go4py.internals.facade.Facade.__call__ (   self,
  Interior 
)
Replace current module with an instance of Interior in sys.modules
Update the globals of this instance from the globals of the module
Keep a reference to the overwritten "scaffold" module to avoid GC
cf. https://mail.python.org/pipermail/python-ideas/2012-May/014969.html

Definition at line 19 of file facade.py.

References go4py.internals.facade.Facade.modulename.

Member Data Documentation

go4py.internals.facade.Facade.modulename

Definition at line 17 of file facade.py.

Referenced by go4py.internals.facade.Facade.__call__().


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