Example #1
0
def Namespace( name ):
   if not name:
      return _global_cpp
   try:
      return _backend.LookupCppEntity( name )
   except AttributeError:
      pass
 # to help auto-loading, simply declare the namespace
   _backend.gInterpreter.Declare( 'namespace %s {}' % name )
   return _backend.LookupCppEntity( name )
Example #2
0
 def __getattr__( cls, name ):
    attr = _backend.LookupCppEntity( name )
    if type(attr) is _backend.PropertyProxy:
       setattr( cls.__class__, name, attr )
       return attr.__get__(cls)
    setattr( cls, name, attr )
    return attr
Example #3
0
 def __getattr__(cls, name):
     try:
         attr = _backend.LookupCppEntity(name)
     except TypeError as e:
         raise AttributeError(str(e))
     if type(attr) is _backend.PropertyProxy:
         setattr(cls.__class__, name, attr)
         return attr.__get__(cls)
     setattr(cls, name, attr)
     return attr
Example #4
0
def Namespace(name):
    if name == '': return _global_cpp
    else: return _backend.LookupCppEntity(name)