Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/context.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/context.cpp	(revision 157)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/context.cpp	(revision 168)
@@ -5,158 +5,178 @@
 #include "group_template_impl.hpp"
 
-namespace xmlioserver
-{
-   namespace tree
+namespace xmlioserver {
+namespace tree {
+   
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   CContext::CContext(void)
+      : CObjectTemplate<CContext>(), CContextAttributes()
+   { /* Ne rien faire de plus */ }
+
+   CContext::CContext(const StdString & id)
+      : CObjectTemplate<CContext>(id), CContextAttributes()
+   { /* Ne rien faire de plus */ }
+
+   CContext::~CContext(void)
+   { /* Ne rien faire de plus */ }
+
+   //----------------------------------------------------------------
+
+   StdString CContext::GetName(void)   { return (StdString("context")); }
+   StdString CContext::GetDefName(void){ return (CContext::GetName()); }
+   ENodeType CContext::GetType(void)   { return (eContext); }
+
+   //----------------------------------------------------------------
+
+   boost::shared_ptr<CContextGroup> CContext::GetContextGroup(void)
+   {  
+      static boost::shared_ptr<CContextGroup> group_context
+                          (new CContextGroup(xml::CXMLNode::GetRootName()));
+      return (group_context); 
+   }
+
+   //----------------------------------------------------------------
+
+   void CContext::parse(xml::CXMLNode & node)
    {
-      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CContext::SuperClass::parse(node);
 
-      CContext::CContext(void)
-         : CObjectTemplate<CContext>(), CContextAttributes()
-      { /* Ne rien faire de plus */ }
+      // PARSING POUR GESTION DES ENFANTS
+      xml::THashAttributes attributes;
 
-      CContext::CContext(const StdString & id)
-         : CObjectTemplate<CContext>(id), CContextAttributes()
-      { /* Ne rien faire de plus */ }
+      if (node.getElementName().compare(CContext::GetName()))
+         DEBUG("Le noeud est mal nommÃ© mais sera traitÃ© comme un contexte !");
 
-      CContext::~CContext(void)
-      { /* Ne rien faire de plus */ }
+      if (!(node.goToChildElement()))
+      {
+         DEBUG("Le context ne contient pas d'enfant !");
+      }
+      else
+      {
+         do { // Parcours des contextes pour traitement.
 
-      StdString CContext::GetName(void)   { return (StdString("context")); }
-      StdString CContext::GetDefName(void){ return (CContext::GetName()); }
+            StdString name = node.getElementName();
+            attributes.clear();
+            attributes = node.getAttributes();
 
-      boost::shared_ptr<CContextGroup> CContext::GetContextGroup(void)
-      {  static boost::shared_ptr<CContextGroup> group_context
-                             (new CContextGroup(xml::CXMLNode::GetRootName()));
-         return (group_context); }
+            if (attributes.end() != attributes.find("id"))
+            { DEBUG(<< "Le noeud de dÃ©finition possÃšde un identifiant,"
+                    << " ce dernier ne sera pas pris en compte lors du traitement !"); }
 
-      void CContext::parse(xml::CXMLNode & node)
+   #define DECLARE_NODE(Name_, name_)    \
+      if (name.compare(C##Name_##Definition::GetDefName()) == 0) \
+      { CObjectFactory::CreateObject<C##Name_##Definition>(C##Name_##Definition::GetDefName()) -> parse(node); \
+   continue; }
+   #define DECLARE_NODE_PAR(Name_, name_)
+   #include "node_type.conf"
+
+            DEBUG(<< "L'Ã©lÃ©ment nommÃ© \'"     << name
+                  << "\' dans le contexte \'" << CObjectFactory::GetCurrentContextId()
+                  << "\' ne reprÃ©sente pas une dÃ©finition !");
+
+         } while (node.goToNextElement());
+
+         node.goToParentElement(); // Retour au parent
+      }
+   }
+
+   //----------------------------------------------------------------
+
+   void CContext::ShowTree(StdOStream & out)
+   {
+      StdString currentContextId =
+         CObjectFactory::GetCurrentContextId();
+      std::vector<boost::shared_ptr<CContext> > def_vector =
+         CContext::GetContextGroup()->getChildList();
+      std::vector<boost::shared_ptr<CContext> >::iterator
+         it = def_vector.begin(), end = def_vector.end();
+
+      out << "<? xml version=\"1.0\" ?>" << std::endl;
+      out << "< "  << xml::CXMLNode::GetRootName() << " >" << std::endl;
+      
+      for (; it != end; it++)
       {
-         CContext::SuperClass::parse(node);
+         boost::shared_ptr<CContext> context = *it;
+         CObjectFactory::SetCurrentContextId(context->getId());
+         CGroupFactory::SetCurrentContextId(context->getId());
+         out << *context << std::endl;
+      }
+      
+      out << "</ " << xml::CXMLNode::GetRootName() << " >" << std::endl;
 
-         // PARSING POUR GESTION DES ENFANTS
-         xml::THashAttributes attributes;
+      CObjectFactory::SetCurrentContextId(currentContextId);
+       CGroupFactory::SetCurrentContextId(currentContextId);
+   }
 
-         if (node.getElementName().compare(CContext::GetName()))
-            DEBUG("Le noeud est mal nommÃ© mais sera traitÃ© comme un contexte !");
+   //----------------------------------------------------------------
 
-         if (!(node.goToChildElement()))
-         {
-            DEBUG("Le context ne contient pas d'enfant !");
-         }
-         else
-         {
-            do { // Parcours des contextes pour traitement.
+   StdString CContext::toString(void) const
+   {
+      StdOStringStream oss;
+      oss << "< " << CContext::GetName()
+          << " id=\"" << this->getId() << "\" "
+          << SuperClassAttribute::toString() << ">" << std::endl;
+      if (!this->hasChild())
+      {
+         //oss << "<!-- No definition -->" << std::endl; // fait planter l'incrÃ©mentation
+      }
+      else
+      {
 
-               StdString name = node.getElementName();
-               attributes.clear();
-               attributes = node.getAttributes();
+   #define DECLARE_NODE(Name_, name_)    \
+      if (CObjectFactory::HasObject<C##Name_##Definition>(C##Name_##Definition::GetDefName())) \
+   oss << *CObjectFactory::GetObject<C##Name_##Definition>(C##Name_##Definition::GetDefName()) << std::endl;
+   #define DECLARE_NODE_PAR(Name_, name_)
+   #include "node_type.conf"
 
-               if (attributes.end() != attributes.find("id"))
-               { DEBUG(<< "Le noeud de dÃ©finition possÃšde un identifiant,"
-                       << " ce dernier ne sera pas pris en compte lors du traitement !"); }
-
-#define DECLARE_NODE(Name_, name_)    \
-   if (name.compare(C##Name_##Definition::GetDefName()) == 0) \
-   { CObjectFactory::CreateObject<C##Name_##Definition>(C##Name_##Definition::GetDefName()) -> parse(node); \
-      continue; }
-#define DECLARE_NODE_PAR(Name_, name_)
-#include "node_type.conf"
-
-               DEBUG(<< "L'Ã©lÃ©ment nommÃ© \'"     << name
-                     << "\' dans le contexte \'" << CObjectFactory::GetCurrentContextId()
-                     << "\' ne reprÃ©sente pas une dÃ©finition !");
-
-            } while (node.goToNextElement());
-
-            node.goToParentElement(); // Retour au parent
-         }
       }
 
-      void CContext::ShowTree(StdOStream & out)
+      oss << "</ " << CContext::GetName() << " >";
+
+      return (oss.str());
+   }
+
+   //----------------------------------------------------------------
+
+   void CContext::solveDescInheritance(const CAttributeMap * const UNUSED(parent))
+   {
+   #define DECLARE_NODE(Name_, name_)    \
+      if (CObjectFactory::HasObject<C##Name_##Definition>(C##Name_##Definition::GetDefName())) \
+   CObjectFactory::GetObject<C##Name_##Definition>(C##Name_##Definition::GetDefName())->solveDescInheritance();
+   #define DECLARE_NODE_PAR(Name_, name_)
+   #include "node_type.conf"
+   }
+
+   //----------------------------------------------------------------
+
+   bool CContext::hasChild(void) const
+   {
+      return (false ||
+   #define DECLARE_NODE(Name_, name_)    \
+      CObjectFactory::HasObject<C##Name_##Definition>  (C##Name_##Definition::GetDefName())   ||
+   #define DECLARE_NODE_PAR(Name_, name_)
+   #include "node_type.conf"
+      false);
+   }
+
+   //----------------------------------------------------------------
+
+   void CContext::solveFieldRefInheritance(void)
+   {
+      if (!this->hasId()) return;
+      std::vector<boost::shared_ptr<CField> > allField
+               = CObjectTemplate<CField>::GetAllVectobject(this->getId());
+      std::vector<boost::shared_ptr<CField> >::iterator 
+         it = allField.begin(), end = allField.end();
+            
+      for (; it != end; it++)
       {
-         StdString currentContextId =
-            CObjectFactory::GetCurrentContextId();
-         std::vector<boost::shared_ptr<CContext> > def_vector =
-            CContext::GetContextGroup()->getChildList();
-         std::vector<boost::shared_ptr<CContext> >::iterator
-            it = def_vector.begin(), end = def_vector.end();
+         boost::shared_ptr<CField> field = *it;
+         field->solveRefInheritance();
+      }
+   }
 
-         out << "<? xml version=\"1.0\" ?>" << std::endl;
-         out << "< "  << xml::CXMLNode::GetRootName() << " >" << std::endl;
-         
-         for (; it != end; it++)
-         {
-            boost::shared_ptr<CContext> context = *it;
-            CObjectFactory::SetCurrentContextId(context->getId());
-            CGroupFactory::SetCurrentContextId(context->getId());
-            out << *context << std::endl;
-         }
-         
-         out << "</ " << xml::CXMLNode::GetRootName() << " >" << std::endl;
+   ///---------------------------------------------------------------
 
-         CObjectFactory::SetCurrentContextId(currentContextId);
-          CGroupFactory::SetCurrentContextId(currentContextId);
-      }
-
-      StdString CContext::toString(void) const
-      {
-         StdOStringStream oss;
-         oss << "< " << CContext::GetName()
-             << " id=\"" << this->getId() << "\" "
-             << SuperClassAttribute::toString() << ">" << std::endl;
-         if (!this->hasChild())
-         {
-            //oss << "<!-- No definition -->" << std::endl; // fait planter l'incrÃ©mentation
-         }
-         else
-         {
-
-#define DECLARE_NODE(Name_, name_)    \
-   if (CObjectFactory::HasObject<C##Name_##Definition>(C##Name_##Definition::GetDefName())) \
-      oss << *CObjectFactory::GetObject<C##Name_##Definition>(C##Name_##Definition::GetDefName()) << std::endl;
-#define DECLARE_NODE_PAR(Name_, name_)
-#include "node_type.conf"
-
-         }
-
-         oss << "</ " << CContext::GetName() << " >";
-
-         return (oss.str());
-      }
-
-      void CContext::solveDescInheritance(const CAttributeMap * const UNUSED(parent))
-      {
-#define DECLARE_NODE(Name_, name_)    \
-   if (CObjectFactory::HasObject<C##Name_##Definition>(C##Name_##Definition::GetDefName())) \
-      CObjectFactory::GetObject<C##Name_##Definition>(C##Name_##Definition::GetDefName())->solveDescInheritance();
-#define DECLARE_NODE_PAR(Name_, name_)
-#include "node_type.conf"
-      }
-
-      bool CContext::hasChild(void) const
-      {
-         return (false ||
-#define DECLARE_NODE(Name_, name_)    \
-   CObjectFactory::HasObject<C##Name_##Definition>  (C##Name_##Definition::GetDefName())   ||
-#define DECLARE_NODE_PAR(Name_, name_)
-#include "node_type.conf"
-         false);
-      }
-
-      void CContext::solveFieldRefInheritance(void)
-      {
-         if (!this->hasId()) return;
-         std::vector<boost::shared_ptr<CField> > allField
-                  = CObjectTemplate<CField>::GetAllVectobject(this->getId());
-         std::vector<boost::shared_ptr<CField> >::iterator 
-            it = allField.begin(), end = allField.end();
-               
-         for (; it != end; it++)
-         {
-            boost::shared_ptr<CField> field = *it;
-            field->solveRefInheritance();
-         }
-      }
-
-   } // namespace tree
+} // namespace tree
 } // namespace xmlioserver
