Package mrv :: Module dgfe :: Class _OIShell
[hide private]
[frames] | no frames]

Class _OIShell

source code

object --+        
         |        
     tuple --+    
             |    
dge._PlugShell --+
                 |
                _OIShell

All connections from and to the FacadeNode must actually start and end there. Iteration over internal plugShells is not allowed. Thus we override only the methods that matter and assure that the call is handed to the acutal internal plugshell. We know everything we require as we have been fed with an oiplug

Nested Classes [hide private]
  __metaclass__
Metaclass building the method wrappers for the _FacadeShell class - not all methods should be overridden, just the ones important to use
Instance Methods [hide private]
 
__init__(self, *args)
Sanity checking
source code
 
_toIShell(self)
Returns: convert ourselves to the real shell actually behind this facade plug
source code

Inherited from tuple: __add__, __contains__, __eq__, __ge__, __getattribute__, __getitem__, __getnewargs__, __getslice__, __gt__, __hash__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __rmul__, __sizeof__, count, index

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

    Object Overrides
 
__repr__(self)
Cut away our name in the possible oiplug ( printing an unnecessary long name then )
source code

Inherited from dge._PlugShell: __getattr__, __str__

    Values
 
get(self, *args, **kwargs)
Returns: value of the plug
source code
 
set(self, *args, **kwargs)
Set the given value to be used in our plug :param ignore_connection: if True, the plug can be destination of a connection and will still get its value set - usually it would be overwritten by the value form the connection.
source code

Inherited from dge._PlugShell: compatabilityRate

    Connections

Inherited from dge._PlugShell: connect, connections, disconnect, input, isConnected, iterShells, outputs

    Caching
 
cache(self, *args, **kwargs)
Returns: the cached value or raise
source code
 
clearCache(self, *args, **kwargs)
Empty the cache of our plug :param clear_affected: if True, the caches of our affected plugs ( connections or affects relations ) will also be cleared This operation is recursive, and needs to be as different shells on different nodes might do things differently.
source code
 
hasCache(self, *args, **kwargs)
Returns: True if currently store a cached value
source code
 
setCache(self, *args, **kwargs)
Set the given value to be stored in our cache :raise: TypeError if the value is not compatible to our defined type
source code

Inherited from dge._PlugShell (private): _cachename

    Name Overrides

Inherited from dge._PlugShell: __rshift__

Static Methods [hide private]
    Object Overrides

Inherited from dge._PlugShell: __new__

Class Variables [hide private]
  __unfacade__ = ['set', 'get', 'clearCache', 'hasCache', 'setCa...
  __facade__ = ['connect', 'disconnect', 'input', 'outputs', 'co...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 
Sanity checking
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 
Cut away our name in the possible oiplug ( printing an unnecessary long name then )
Overrides: object.__repr__

_toIShell(self)

source code 
Returns:
convert ourselves to the real shell actually behind this facade plug

cache(self, *args, **kwargs)

source code 
Returns:
the cached value or raise
Raises:
  • ValueError
Overrides: dge._PlugShell.cache
(inherited documentation)

clearCache(self, *args, **kwargs)

source code 
Empty the cache of our plug :param clear_affected: if True, the caches of our affected plugs ( connections or affects relations ) will also be cleared This operation is recursive, and needs to be as different shells on different nodes might do things differently. :param cleared_shells_set: if set, it can be used to track which plugs have already been dirtied to prevent recursive loops Propagation will happen even if we do not have a cache to clear ourselves
Overrides: dge._PlugShell.clearCache
(inherited documentation)

get(self, *args, **kwargs)

source code 
Parameters:
  • mode - optional arbitary value specifying the mode of the get attempt
Returns:
value of the plug
Overrides: dge._PlugShell.get
(inherited documentation)

hasCache(self, *args, **kwargs)

source code 
Returns:
True if currently store a cached value
Overrides: dge._PlugShell.hasCache
(inherited documentation)

set(self, *args, **kwargs)

source code 
Set the given value to be used in our plug :param ignore_connection: if True, the plug can be destination of a connection and will still get its value set - usually it would be overwritten by the value form the connection. The set value will be cleared if something upstream in it's connection chain changes. :raise AssertionError: the respective attribute must be cached, otherwise the value will be lost
Overrides: dge._PlugShell.set
(inherited documentation)

setCache(self, *args, **kwargs)

source code 
Set the given value to be stored in our cache :raise: TypeError if the value is not compatible to our defined type
Overrides: dge._PlugShell.setCache
(inherited documentation)

Class Variable Details [hide private]

__unfacade__

Value:
['set', 'get', 'clearCache', 'hasCache', 'setCache', 'cache']

__facade__

Value:
['connect',
 'disconnect',
 'input',
 'outputs',
 'connections',
 'iterShells']