python::GBSModel::GBSModel Class Reference

List of all members.

Public Member Functions

def __init__
def GetName
def GetDescription
def GetTitle
def AddMapping
def CreateObject

Private Attributes

 __name
 __title
 __description
 __class_map
 __ctor_list_map

Detailed Description

Mapping from a model to a set of classes that impliment it

Note: Would be good if the mapped classes could describe themselves


Definition at line 3 of file GBSModel.py.


Member Function Documentation

def python::GBSModel::GBSModel::__init__ (   self,
  name,
  title,
  description 
)

Definition at line 6 of file GBSModel.py.

00006         : Would be good if the mapped classes could describe themselves
00007 
00008 
00009     """
00010 
00011     def __init__(self,name,title,description):
00012         self.__name          = name
00013         self.__title         = title

def python::GBSModel::GBSModel::AddMapping (   self,
  role,
  class_obj,
  ctor_list 
)

Definition at line 18 of file GBSModel.py.

00019                      : return self.__name
00020     def GetDescription(self): return self.__description
00021     def GetTitle(self): return self.__title
00022     

def python::GBSModel::GBSModel::CreateObject (   self,
  role,
  object_name,
  parent 
)

Definition at line 23 of file GBSModel.py.

00023                                                   :
00024         self.__class_map[role]     = class_obj
00025         self.__ctor_list_map[role] = ctor_list
00026         Log(self,logger.DEBUG,"GBSModel: In model: '" + self.GetName() + "' adding " + str(class_obj) + " in role '" + str(role) + "'")
00027 
00028     def CreateObject(self,role,object_name,parent) :
00029         if not  self.__class_map.has_key(role):
00030             print "Cannot find role " + str(role) + " in model " + str(self.__name)
00031             raise NameError
        return self.__class_map[role](object_name,parent,self.__name,self.__ctor_list_map[role])

def python::GBSModel::GBSModel::GetDescription (   self  ) 

Definition at line 15 of file GBSModel.py.

00015 {}

def python::GBSModel::GBSModel::GetName (   self  ) 

Definition at line 14 of file GBSModel.py.

00015 {}

def python::GBSModel::GBSModel::GetTitle (   self  ) 

Definition at line 16 of file GBSModel.py.

00016                                {}
00017         Log(self,logger.SYNOPSIS,"Creating a GBSModel named '" + str(name) + "'")


Member Data Documentation

python::GBSModel::GBSModel::__class_map [private]

Definition at line 10 of file GBSModel.py.

python::GBSModel::GBSModel::__ctor_list_map [private]

Definition at line 11 of file GBSModel.py.

python::GBSModel::GBSModel::__description [private]

Definition at line 9 of file GBSModel.py.

python::GBSModel::GBSModel::__name [private]

Definition at line 7 of file GBSModel.py.

python::GBSModel::GBSModel::__title [private]

Definition at line 8 of file GBSModel.py.


The documentation for this class was generated from the following file:
Generated on Fri Mar 5 09:25:41 2010 for gbs by  doxygen 1.4.7