# Copyright 2008 Develer S.r.l. (http://www.develer.com/)
# All rights reserved.
#
-# $Id:$
+# $Id$
#
# Author: Lorenzo Berni <duplo@develer.com>
#
+import copy
+
class BProject(object):
+ """
+ Simple class for store and retrieve project informations.
+ """
def __init__(self):
- pass
-
- def openProject(self, path):
- # Fill the BProject fields, opening an existing project
- pass
+ self.infos = {}
- def setProjectPath(self, path):
- self.projectPath = path
+ def setInfo(self, key, value):
+ """
+ Store the given value with the name key.
+ """
+ self.infos[key] = value
- def setSourcePath(self, path):
- self.sourcePath = path
+ def info(self, key):
+ """
+ Retrieve the value associated with the name key.
+ """
+ if key in self.infos:
+ return copy.deepcopy(self.infos[key])
+ return None
-
\ No newline at end of file
+ def __repr__(self):
+ return repr(self.infos)
\ No newline at end of file