Localization: first step (class Dict and handling of Metamodel)

SVN:trunk[338]
This commit is contained in:
Romain Quetiez
2010-04-19 13:32:30 +00:00
parent b825219948
commit dd02ce60b5
10 changed files with 2380 additions and 7 deletions

View File

@@ -12,16 +12,42 @@
* @version 1.1.1.1 $
*/
// #@# Really dirty !!!
// #@# TO BE CLEANED -> ALIGN WITH OTHER METAMODEL DECLARATIONS
class ObjectStimulus
{
private $m_aParams = array();
private $m_sHostClass = null;
private $m_sCode = null;
public function __construct($aParams)
{
$this->m_aParams = $aParams;
// obsolete: $this->m_aParams = $aParams;
$this->m_aParams['label'] = 'foo';
$this->m_aParams['description'] = 'foo';
$this->ConsistencyCheck();
}
public function SetHostClass($sHostClass)
{
$this->m_sHostClass = $sHostClass;
}
public function GetHostClass()
{
return $this->m_sHostClass;
}
public function SetCode($sCode)
{
$this->m_sCode = $sCode;
$this->m_aParams['label'] = Dict::S('Class:'.$this->m_sHostClass.'/Stimulus:'.$this->m_sCode, $this->m_sCode);
$this->m_aParams['description'] = Dict::S('Class:'.$this->m_sHostClass.'/Stimulus:'.$this->m_sCode.'+', '');
}
public function GetCode()
{
return $this->m_sCode;
}
public function Get($sParamName) {return $this->m_aParams[$sParamName];}
// Note: I could factorize this code with the parameter management made for the AttributeDef class