00001 00002 /************************************************************************/ 00003 /* This file is part of openMask(c) INRIA, CNRS, Universite de Rennes 1 */ 00004 /* 1993-2002, thereinafter the Software */ 00005 /* */ 00006 /* The Software has been developped within the Siames Project. */ 00007 /* INRIA, the University of Rennes 1 and CNRS jointly hold intellectual */ 00008 /* property rights */ 00009 /* */ 00010 /* The Software has been registered with the Agence pour la Protection */ 00011 /* des Programmes (APP) under registration number */ 00012 /* IDDN.FR.001.510008.00.S.P.2001.000.41200 */ 00013 /* */ 00014 /* This file may be distributed under the terms of the Q Public License */ 00015 /* version 1.0 as defined by Trolltech AS of Norway and appearing in */ 00016 /* the file LICENSE.QPL included in the packaging of this file. */ 00017 /* */ 00018 /* Licensees holding valid specific licenses issued by INRIA, CNRS or */ 00019 /* Universite Rennes 1 for the software may use this file in */ 00020 /* acordance with that specific license */ 00021 /************************************************************************/ 00022 00023 #include "OMKContainerExtension.h" 00024 #include "OMKValuedEventListenerCallBack.h" 00025 #include "OMKExtensibleSimulatedObject.h" 00026 #include "OMKExtension.h" 00027 00028 using namespace OMK ; 00029 00030 REGISTER_EXTENSION_FACTORY( ContainerExtension, "Container" ) ; 00031 //----------------------------------------------------------------- 00032 ContainerExtension::ContainerExtension( ExtensibleSimulatedObject* owner, const Name& id, bool registerExtension ) 00033 : ExtensionT< ExtensibleSimulatedObject >( owner, id, registerExtension ) 00034 { 00035 const ConfigurationParameterDescriptor* node = owner->getObjectDescriptor().getExtensionsParameters() ; 00036 const ConfigurationParameterDescriptor* extensionNode = 0 ; 00037 ParametersAccessor::get( node, getId().getString(), extensionNode ) ; 00038 const ConfigurationParameterDescriptor* extensionsNode = 0 ; 00039 ParametersAccessor::get( extensionNode, "Extensions", extensionsNode ) ; 00040 00041 createExtensionsFromParameters( _owner, extensionsNode ) ; 00042 } 00043 //----------------------------------------------------------------- 00044 ContainerExtension::~ContainerExtension() 00045 { 00046 deleteExtensions() ; 00047 } 00048 //----------------------------------------------------------------- 00049 bool ContainerExtension::loadObjectParameters( const ConfigurationParameterDescriptor * node ) 00050 { 00051 //---Load extension 00052 return loadFromObjectParameters( node ) ; 00053 } 00054 //----------------------------------------------------------------- 00055 bool ContainerExtension::loadExtensionParameters( const ConfigurationParameterDescriptor * node ) 00056 { 00057 const ConfigurationParameterDescriptor* extensionsNode = 0 ; 00058 ParametersAccessor::get( node, "Extensions", extensionsNode ) ; 00059 //---Load Extension order if there is one 00060 loadOrder( extensionsNode, "LoadParametersOrder", _orderedExtensionsForLoadParameters ) ; 00061 //---Load extension 00062 bool ok = loadFromExtensionsParameters( extensionsNode ) ; 00063 loadOrder( extensionsNode, "PreComputeOrder" , _orderedExtensionsForPreCompute ) ; 00064 loadOrder( extensionsNode, "PostComputeOrder", _orderedExtensionsForPostCompute ) ; 00065 return ok ; 00066 } 00067 //-----------------------------------------------------------------
Documentation generated on Mon Jun 9 11:45:56 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |