Index: /XMLIO_V2/dev/trunk/trunk/arch/arch-LINUX_HORUS.fcm
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/arch/arch-LINUX_HORUS.fcm	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/arch/arch-LINUX_HORUS.fcm	(revision 76)
@@ -0,0 +1,12 @@
+%CCOMPILER      gcc
+%FCOMPILER      gfortran
+%LINKER         gfortran
+%BASE_CFLAGS    -DNONE -std=c++0x
+%PROD_CFLAGS    -O3
+%DEV_CFLAGS     -g
+%DEBUG_CFLAGS   -g
+%BASE_FFLAGS    -DNONE
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g
+%DEBUG_FFLAGS   -g
+%BASE_LD        -lstdc++      
Index: /XMLIO_V2/dev/trunk/trunk/arch/arch-LINUX_HORUS.path
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/arch/arch-LINUX_HORUS.path	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/arch/arch-LINUX_HORUS.path	(revision 76)
@@ -0,0 +1,1 @@
+
Index: /XMLIO_V2/dev/trunk/trunk/bld.cfg
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/bld.cfg	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/bld.cfg	(revision 76)
@@ -0,0 +1,41 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc arch.fcm
+inc config.fcm
+
+%CFLAGS           %BASE_CFLAGS %COMPIL_CFLAGS
+%FFLAGS           %BASE_FFLAGS %COMPIL_FFLAGS
+%LD_FLAGS         %BASE_LD
+
+
+dest::root   $PWD
+
+bld::infile_ext::cpp C::SOURCE
+bld::infile_ext::hpp  CPP::INCLUDE
+
+
+search_src           false
+src::xmlio XMLIO
+bld::lib::xmlio xmlio
+bld::target libxmlio.a
+bld::target main.exe
+bld::exe_dep
+
+bld::tool::cc        %CCOMPILER
+bld::tool::fc        %FCOMPILER
+bld::tool::cppflags  -I${PWD}/../external/include
+bld::tool::ld        %LINKER
+bld::tool::ldflags   %LD_FLAGS
+bld::tool::cflags    %CFLAGS -I${PWD}/../external/include
+bld::tool::fflags    %FFLAGS
+
+# Pre-process code before analysing dependencies
+bld::pp              false
+
Index: /XMLIO_V2/dev/trunk/trunk/make_xmlioserver
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/make_xmlioserver	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/make_xmlioserver	(revision 76)
@@ -0,0 +1,71 @@
+#!/bin/bash
+set -x
+export PATH=$PWD/../tools/FCM/bin:$PATH
+
+compil_mode_defined="FALSE"
+compil_mode="prod"
+
+arch_defined="FALSE"
+arch=""
+
+while (($# > 0))
+  do
+  case $1 in
+      "-h") cat <<fin
+Usage :
+makegcm [options] -m arch exec
+[-h]                       : help
+[-prod / -dev / -debug]    : compilation en mode production (default) / developpement / debug .
+ -arch nom_arch            : nom de l\'architecture cible
+fin
+	  exit;;
+
+      "-prod")
+	  compil_mode="prod" ; shift ;;
+
+      "-dev")
+	  compil_mode="dev" ; shift ;;
+
+      "-debug")
+	  compil_mode="debug" ; shift ;;
+
+      "-arch")
+	  arch=$2 ; arch_defined="TRUE"; shift ; shift ;;
+
+      *)
+	  code="$1" ; shift ;;
+  esac
+done
+
+if [[ "$arch_defined" == "TRUE" ]]
+then
+  rm -f arch.path
+  rm -f arch.fcm
+  ln -s arch/arch-${arch}.path ./arch.path
+  ln -s arch/arch-${arch}.fcm  ./arch.fcm
+  source arch.path
+else
+  echo "Veuillez definir une architecture cible"
+  exit 1
+fi
+
+if [[ "$compil_mode" == "prod" ]]
+then
+  COMPIL_CFLAGS="%PROD_CFLAGS"
+  COMPIL_FFLAGS="%PROD_FFLAGS"
+elif [[ "$compil_mode" == "dev" ]]
+then
+  COMPIL_CFLAGS="%DEV_CFLAGS"
+  COMPIL_FFLAGS="%DEV_FFLAGS"
+elif [[ "$compil_mode" == "debug" ]]
+then
+  COMPIL_CFLAGS="%DEBUG_CFLAGS"
+  COMPIL_FFLAGS="%DEBUG_FFLAGS"
+fi
+
+rm -f config.fcm
+
+echo "%COMPIL_CFLAGS $COMPIL_CFLAGS" >> config.fcm
+echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> config.fcm
+
+fcm build
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/attribut.cpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/attribut.cpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/attribut.cpp	(revision 76)
@@ -0,0 +1,1 @@
+
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/attribut.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/attribut.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/attribut.hpp	(revision 76)
@@ -0,0 +1,62 @@
+#ifndef ATTRIBUT_HPP
+#define ATTRIBUT_HPP
+
+#include "base_attribut.hpp"
+#include "xmlio_std.hpp"
+
+template <class Ctype>
+class CAttribut : public CBaseAttribut
+{
+  public :
+  
+  bool hasValue ;
+  Ctype value ;
+
+  virtual const char * getName(void) const = 0 ;
+  CAttribut(void) : hasValue(false) {} ;
+  CAttribut(const Ctype& value_) : value(value_), hasValue(true) {} ;
+  CAttribut(const CAttribut& attr) : hasValue(attr.hasValue) 
+  {
+     if (hasValue) value=attr.value ;
+  } ;
+
+  CAttribut& operator = (const CAttribut & attr)
+  { 
+     hasValue=attr.hasValue ;
+     if (hasValue) value=attr.value ;
+     return *this ; 
+  } ;
+
+  operator Ctype()
+  {
+    if (!hasValue) error("CAttribut& CAttribut<Ctype>::operator Ctype")<<"access to undefined value of attribut <<"
+                                                                       <<this->getName()<<">>"<<endl;
+    return value ;
+  } ;
+
+  virtual ostream& print(ostream & o) const
+  {
+    o<<"Attribut : "<<getName()<<"  ---->" ;
+    if (hasValue) o<<" value = "<<value ;
+    else o<<" undefined value" ;
+    return o ;
+  }
+
+  virtual void setValue(const Ctype & value_)
+  {
+     hasValue=true ;
+     value=value_ ;
+  }
+
+  virtual void getValue(Ctype & value_) const
+  {
+    if (!hasValue)  error("void CAttribut<Ctype>::getValue")<<"access to undefined value of attribut <<"
+                                                               <<this->getName()<<">>"<<endl;
+    value_=value ;
+  }
+
+} ;
+
+
+  
+#endif
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/attribut_registrar.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/attribut_registrar.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/attribut_registrar.hpp	(revision 76)
@@ -0,0 +1,58 @@
+#ifndef ATTRIBUT_REGISTRAR_HPP
+#define ATTRIBUT_REGISTRAR_HPP
+
+#include "base_attribut.hpp"
+#include "xmlio_std.hpp"
+
+class CAttributRegistrar
+{
+  public :
+  
+  
+  void RegisterAttribut(CBaseAttribut & attribut) ;
+  ostream & PrintAttribut(ostream & o) ;
+
+  unordered_map<string,CBaseAttribut *> attrMap ;
+  vector<CBaseAttribut *> attrVector ;
+
+  bool hasAttribut(const string& att_name)
+  {
+    if (attrMap.find(att_name)!=attrMap.end()) return true ;
+    else return false ;
+  }
+  
+  template <class ValueType>
+  void setAttribut(const string& att_name, ValueType value)
+  {
+    unordered_map<string,CBaseAttribut *>::iterator it ;
+    
+    it=attrMap.find(att_name) ;
+    if (it!=attrMap.end()) (*it).second->setValue(value) ;
+    else error("CAttributRegistrar::setAttribut<ValueType>")
+         <<"Could not find <<"<<att_name<<">> attribut in registred list"<<endl ;
+    
+  }
+  
+} ;
+
+inline void CAttributRegistrar::RegisterAttribut(CBaseAttribut& Attribut)
+{
+  attrMap.insert(make_pair(Attribut.getName(),&Attribut)) ;
+  attrVector.push_back(&Attribut) ;
+}
+
+inline ostream & CAttributRegistrar::PrintAttribut(ostream& o)
+{
+  vector<CBaseAttribut *>::iterator it ;
+  o<<"List of attribut"<<IncIndent ;
+  for(it=attrVector.begin(); it!=attrVector.end();it++)
+  {
+    o<<iendl ;
+    (*it)->print(o) ;
+  }
+  o<<DecIndent ;
+  return o ;
+}
+
+
+#endif
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/base_attribut.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/base_attribut.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/base_attribut.hpp	(revision 76)
@@ -0,0 +1,86 @@
+#ifndef BASE_ATTRIBUT_HPP
+#define BASE_ATTRIBUT_HPP
+#include "xmlio_std.hpp"
+
+class CBaseAttribut
+{
+  public:
+  
+  virtual const char * getName(void) const = 0  ;
+     
+  virtual ostream & print(ostream& o) const = 0  ;
+  
+  friend ostream& operator <<(ostream& o,const CBaseAttribut& Attr)
+  {
+    return Attr.print(o) ;
+  }
+
+  
+  virtual void setValue(const int & value)          { error_set() ; }
+  virtual void setValue(const Array<int,1>& value)  { error_set() ; }
+  virtual void setValue(const Array<int,2>& value)  { error_set() ; }
+  virtual void setValue(const Array<int,3>& value)  { error_set() ; }
+  
+  virtual void setValue(const double & value)          { error_set() ; }
+  virtual void setValue(const Array<double,1>& value)  { error_set() ; }
+  virtual void setValue(const Array<double,2>& value)  { error_set() ; }
+  virtual void setValue(const Array<double,3>& value)  { error_set() ; }
+  
+  virtual void setValue(const bool & value)          { error_set() ; }
+  virtual void setValue(const Array<bool,1>& value)  { error_set() ; }
+  virtual void setValue(const Array<bool,2>& value)  { error_set() ; }
+  virtual void setValue(const Array<bool,3>& value)  { error_set() ; }
+  
+  virtual void setValue(const char * value)            { error_set() ; }
+  virtual void setValue(const string & value)          { error_set() ; }
+  virtual void setValue(const Array<string,1>& value)  { error_set() ; }
+  virtual void setValue(const Array<string,2>& value)  { error_set() ; }
+  virtual void setValue(const Array<string,3>& value)  { error_set() ; }
+  
+  virtual void setValue(const char & value)          { error_set() ; }
+  virtual void setValue(const Array<char,1>& value)  { error_set() ; }
+  virtual void setValue(const Array<char,2>& value)  { error_set() ; }
+  virtual void setValue(const Array<char,3>& value)  { error_set() ; }
+
+
+  virtual void getValue(int & value) const        { error_get() ; }
+  virtual void getValue(Array<int,1>& value) const  { error_get() ; }
+  virtual void getValue(Array<int,2>& value) const  { error_get() ; }
+  virtual void getValue(Array<int,3>& value) const  { error_get() ; }
+  
+  virtual void getValue(double & value) const          { error_get() ; }
+  virtual void getValue(Array<double,1>& value) const  { error_get() ; }
+  virtual void getValue(Array<double,2>& value) const  { error_get() ; }
+  virtual void getValue(Array<double,3>& value) const  { error_get() ; }
+  
+  virtual void getValue(bool & value) const          { error_get() ; }
+  virtual void getValue(Array<bool,1>& value) const  { error_get() ; }
+  virtual void getValue(Array<bool,2>& value) const  { error_get() ; }
+  virtual void getValue(Array<bool,3>& value) const  { error_get() ; }
+  
+  virtual void getValue(char * value) const            { error_get() ; }
+  virtual void getValue(string & value) const          { error_get() ; }
+  virtual void getValue(Array<string,1>& value) const  { error_get() ; }
+  virtual void getValue(Array<string,2>& value) const  { error_get() ; }
+  virtual void getValue(Array<string,3>& value) const  { error_get() ; }
+  
+  virtual void getValue(char & value) const          { error_get() ; }
+  virtual void getValue(Array<char,1>& value) const  { error_get() ; }
+  virtual void getValue(Array<char,2>& value) const  { error_get() ; }
+  virtual void getValue(Array<char,3>& value) const  { error_get() ; }
+
+  static void error_set(void)
+  {
+     error("CBaseAttribut::set<type>")<<"Setting value type is incompatible"
+                                      <<" with attribut type"<<endl ;
+  }
+
+  static void error_get(void)
+  {
+     error("CBaseAttribut::set<type>")<<"Getting value type is incompatible"
+                                      <<" with attribut type"<<endl ;
+  }
+} ;
+
+#endif 
+  
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/base_object.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/base_object.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/base_object.hpp	(revision 76)
@@ -0,0 +1,31 @@
+#ifndef BASE_OBJECT_HPP
+#define BASE_OBJECT_HPP
+
+#include "xmlio_std.hpp"
+
+
+class CBase_object : public virtual CAttributRegistrar
+{
+ public :
+  string id ;
+  bool hasId ;
+
+  CBase_object(void) : hasId(false) {}
+  CBase_object(const string& Id) : id(Id), hasId(true) {}
+  
+  void setId(const string& Id)
+  {
+    id=Id ;
+    hasId=true ;
+  }
+
+  ostream & PrintId(ostream& o)
+  {
+    if (hasId) o<<" ---> Id = "<<id ;
+    else o<<" ---> No Id " ;
+    return o ;
+  }
+
+} ;
+
+#endif
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/context.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/context.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/context.hpp	(revision 76)
@@ -0,0 +1,14 @@
+#ifndef CONTEXT_HPP
+#define CONTEXT_HPP
+
+
+
+
+
+
+
+
+
+
+
+#endif
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/declare_attribut.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/declare_attribut.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/declare_attribut.hpp	(revision 76)
@@ -0,0 +1,15 @@
+#ifndef DECLARE_ATTRIBUT_HPP
+#define DECLARE_ATTRIBUT_HPP
+#include "attribut.hpp"
+
+#define DECLARE_ATTR(att_name,att_type)                      \
+  class attr_##att_name : public CAttribut<att_type>                         \
+  {                                                          \
+    public:                                                  \
+    const char * getName(void) const { return #att_name ;} ; \
+    attr_##att_name(void) : CAttribut<att_type>() {} ; \
+    attr_##att_name(const att_type& value_) : CAttribut<att_type>(value_) {} ; \
+    attr_##att_name(const attr_##att_name & att) : CAttribut<att_type>(att) {} ; \
+  } att_name
+
+#endif
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/field.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/field.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/field.hpp	(revision 76)
@@ -0,0 +1,19 @@
+#ifndef FIELD_HPP
+#define FIELD_HPP
+
+#include "base_object.hpp"
+#include "object_template.hpp"
+#include "xmlio_std.hpp"
+
+
+class Field : public CObjectTemplate<Field>, public CFieldAttribut
+{
+  public:
+
+    Field(void) : CObjectTemplate<Field>() {} ;
+    Field(const string & Id) : CObjectTemplate<Field>(Id) {} ;
+    static const char * getName(void) { return "field" ; }
+};
+
+
+#endif
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/field_attribut.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/field_attribut.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/field_attribut.hpp	(revision 76)
@@ -0,0 +1,23 @@
+#ifndef FIELD_ATTRIBUT_HPP
+#define FIELD_ATTRIBUT_HPP
+
+#include "attribut_registrar.hpp"
+#include "attribut.hpp"
+#include "declare_attribut.hpp"
+
+class CFieldAttribut : public virtual CAttributRegistrar
+{
+  public :
+   
+   DECLARE_ATTR(name,string) ; 
+   DECLARE_ATTR(level,int) ;
+   
+  CFieldAttribut(void)
+  {
+    RegisterAttribut(name) ;
+    RegisterAttribut(level) ;
+  }
+  
+} ;
+
+#endif
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/group_template.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/group_template.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/group_template.hpp	(revision 76)
@@ -0,0 +1,184 @@
+#ifndef GROUP_TEMPLATE_HPP
+#define GROUP_TEMPLATE_HPP
+
+#include "object_template.hpp"
+#include "xmlio_std.hpp"
+
+template<typename CObject>
+class group  : public CObjectTemplate<group<CObject> >
+{
+  public :
+
+  CObject * defaultAttribut ;
+  
+  unordered_map<string,CObject *>* childListId ;
+  vector<CObject *>* childList ;
+  unordered_map<string,group<CObject> *>* groupListId ;
+  vector<group<CObject> *>* groupList ;
+  
+  group(void) : CObjectTemplate< group<CObject> >() 
+  {
+    defaultAttribut=new CObject ;
+    childListId=new unordered_map<string,CObject *> ;
+    childList=new vector<CObject *> ;
+    groupListId=new unordered_map<string,group<CObject> *> ;
+    groupList=new vector<group<CObject> *> ;
+  }
+
+  group(const string Id) : CObjectTemplate< group<CObject> >(Id) 
+  {
+    defaultAttribut=new CObject ;
+    childListId=new unordered_map<string,CObject *> ;
+    childList=new vector<CObject *> ;
+    groupListId=new unordered_map<string,group<CObject> *> ;
+    groupList=new vector<group<CObject>*> ;
+  }
+
+  CObject * getDefaultAttribut(void) {return defaultAttribut ;}
+  
+  bool foundChild(const string & Id) const 
+  {
+    if (childListId->find(Id)==childListId->end()) return false ;
+    else return true ;
+  }
+
+  CObject * getChild(const string & Id)
+  {
+    typename unordered_map<string,CObject*>::iterator It ;
+
+    It=childListId->find(Id) ;
+    if (It==childListId->end())
+    {
+      error("group<object>::getChild(const string & Id)")<<"Child <<"<<Id<<">> does not exist"<<endl ;
+      return 0 ;
+    }
+    else return It->second ;
+  }
+
+  CObject * getNewChild(void)
+  {
+    CObject * newChild=new CObject ;
+    childList->push_back(newChild) ;
+    return newChild ;
+  }
+
+
+  CObject* getNewChild(const string & Id)
+  {
+    CObject* newChild=new CObject(Id) ;
+    
+    pair<string,CObject *> value(Id,newChild) ;
+    if (childListId->insert(value).second) 
+    {
+      childList->push_back(newChild) ;
+      return newChild ;
+    }
+    else
+    {
+      error("group<object>::getNewChild(const string & Id)")<<"Child <<"<<Id<<">> is already present"<<endl ;
+      return 0 ;
+    }
+  }
+
+
+  CObject * getOrAppendChild(const string & Id)
+  {
+    if (foundChild(Id)) return getChild(Id) ;
+    else return getNewChild(Id) ;
+  }
+
+  
+  bool foundGroup(const string & Id) const
+  {
+    if (groupListId->find(Id)==groupListId->end()) return false ;
+    else return true ;
+  }
+  
+  group<CObject> * getGroup(const string & Id)
+  {
+    typename unordered_map<string,group<CObject>*>::iterator It ;
+
+    It=groupListId->find(Id) ;
+    if (It==groupListId->end())
+    {
+      error("group<object>::getGroup(const string & Id)")<<"Group <<"<<Id<<">> does not exist"<<endl ;
+      return 0 ;
+    }
+    else return It->second ;
+  }
+
+  group<CObject>* getNewGroup(void)
+  {
+    group<CObject> * newGroup=new group<CObject> ;
+    groupList->push_back(newGroup) ;
+    return newGroup ;
+  }
+
+
+  group<CObject>* getNewGroup(const string & Id)
+  {
+    group<CObject>* newGroup=new group<CObject>(Id) ;
+    
+    pair<string,group<CObject>*> value(Id,newGroup) ;
+    if (groupListId->insert(value).second)
+    {
+      groupList->push_back(newGroup) ;
+      return newGroup ;
+    }
+    else
+    {
+      error("group<object>::getNewGroup(const string & Id)")<<"Group <<"<<Id<<">> is already present"<<endl ;
+      return 0 ;
+    }
+  }
+
+
+  group<CObject> * getOrAppendGroup(const string & Id)
+  {
+    if (foundGroup(Id)) return getGroup(Id) ;
+    else return getNewGroup(Id) ;
+  }
+
+  static const char* getName(void) 
+  {
+    return (string("group_")+string(CObject::getName())).c_str() ;
+  }
+
+
+  ostream& Print(ostream& o)
+  {
+    typename vector<CObject *>::iterator it1 ;
+    typename vector<group<CObject> *>::iterator it2 ;
+    
+    o<<"Object :"<<getName()<<" : " ;
+    this->PrintId(o)<<inc_endl ;
+    this->PrintAttribut(o)<<iendl ;
+    o<<"Default Attribut"<<inc_endl ;
+    defaultAttribut->Print(o)<<dec_endl ;
+    o<<"Group "<<getName()<<IncIndent ;
+    for(it2=groupList->begin();it2!=groupList->end();it2++) 
+    {
+      o<<iendl ;
+      (*it2)->Print(o) ;
+    }
+    o<<DecIndent<<iendl ;
+    o<<"Child "<<CObject::getName()<<IncIndent ;
+    for(it1=childList->begin();it1!=childList->end();it1++) 
+    {
+      o<<iendl;
+      (*it1)->Print(o) ;
+    }
+    o<<DecIndent<<DecIndent ;
+    return o ;
+  }
+  
+  void Print(void)
+  {
+    Print(StdOut) ;
+  }
+
+} ;
+
+
+
+#endif
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/main.f90
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/main.f90	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/main.f90	(revision 76)
@@ -0,0 +1,7 @@
+PROGRAM main
+IMPLICIT NONE
+
+
+  CALL main_c
+  
+END PROGRAM main
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/main_cpp.cpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/main_cpp.cpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/main_cpp.cpp	(revision 76)
@@ -0,0 +1,40 @@
+#include "field_attribut.hpp"
+#include "field.hpp"
+#include "group_template.hpp"
+#include "xmlio_std.hpp"
+
+
+extern "C" void main_c_(void) ;
+
+  
+void main_c_(void)
+{
+  try 
+  {
+    group<Field>* FirstGroup=new group<Field>("1") ;
+    group<Field> * MyGroup=FirstGroup->getNewGroup("group");
+    Field* MyField=MyGroup->getNewChild("toto") ;
+    MyField->setAttribut("name",string("titi")) ;
+    MyField->setAttribut("level",10) ;
+    
+    MyField=MyGroup->getNewChild("tata") ;
+    MyField->setAttribut("name",string("tutu")) ;
+    MyField->setAttribut("level",25) ;
+
+    MyField=MyGroup->getOrAppendChild("tete") ;
+    MyField->setAttribut("level",1) ;
+    
+    MyField=MyGroup->getChild("toto") ;
+    MyField->setAttribut("level",11) ;
+    
+    MyField->level=1 ;
+    
+    FirstGroup->Print() ;
+    StdOut<<iendl;
+    StdOut<<"This is the end"<<iendl ;
+  }
+  catch(ex_error x)
+  {
+    StdOut<<x.what<<endl ;
+  }
+}
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/object_template.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/object_template.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/object_template.hpp	(revision 76)
@@ -0,0 +1,96 @@
+#ifndef OBJECT_TEMPLATE_HPP
+#define OBJECT_TEMPLATE_HPP
+
+
+#include "base_object.hpp"
+#include "xmlio_std.hpp"
+
+template <typename CObject>
+class CObjectTemplate : public CBase_object
+{
+  public:
+  
+  static vector<CObject *> * List ;
+  static unordered_map<string,CObject *>* listId ;
+
+  CObjectTemplate(void) : CBase_object() {} ;
+  CObjectTemplate(const string & Id) : CBase_object(Id) {} ;
+
+  static void SwapContext(unordered_map<string,CObject *>* newListId,vector<CObject *> * newList)
+  {
+    listId=newListId ;
+    List=newList ;
+  }
+  
+  static bool found(const string & Id)
+  {
+    if (listId->find(Id)==listId->end()) return false ;
+    else return true ;
+  }
+  
+  static CObject* get(const string & Id)
+  {
+    typename unordered_map<string,CObject*>::iterator It ;
+
+    It=listId->find(Id) ;
+    if (It==listId->end())
+    {
+      error("CObjectTemplate<object>::get(const string & Id)")<<"Object <<"<<Id<<">> does not exist"<<endl ;
+      return 0 ;
+    }
+    else return It->second ;
+  }
+      
+  static CObject* getNew(void)
+  {
+    CObject * newObject=new CObject ;
+    List->push_back(newObject) ;
+    return newObject ;
+  }
+  
+  static CObject* getNew(const string & Id)
+  {
+    CObject* newField=new CObject(Id) ;
+    
+    pair<string,CObject *> value(Id,newField) ;
+    if (listId->insert(value).second) 
+    {
+      List->push_back(newField) ;
+      return newField ;
+    }
+    else
+    {
+      error("CObjectTemplate::getNew(const string & Id)")<<"Object <<"<<Id<<">> is already present"<<endl ;
+      return 0 ;
+    }
+  }
+  
+  static CObject* getOrAppend(const string & Id)
+  {
+    if (found(Id)) return get(Id) ;
+    else return getNew(Id) ;
+  }
+
+  ostream & Print(ostream& o)
+  {
+    o<<"Object : "<<CObject::getName()<<" : " ; 
+    PrintId(o)<<inc_endl ;
+    PrintAttribut(o) ;
+    o<<DecIndent ;
+    return o ;
+  }
+  
+  void Print(void)
+  {
+    Print(StdOut) ;
+  }
+
+   
+} ;
+
+template <typename CObject>
+vector<CObject *>* CObjectTemplate<CObject>::List=new vector<CObject*>  ;
+
+template <typename CObject>
+unordered_map<string,CObject *>* CObjectTemplate<CObject>::listId=new unordered_map<string,CObject *>  ;
+#endif
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/stdout.cpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/stdout.cpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/stdout.cpp	(revision 76)
@@ -0,0 +1,54 @@
+#include <fstream>
+#include "xmlio_std.hpp"
+
+
+static const char file_stdout[]="xmlio.out" ;
+static const char file_stderr[]="xmlio.err" ;
+static const char file_stdlog[]="xmlio.log" ;
+
+
+// declaration of singleton for standard output 
+
+xmlio_stdout xmlio_stdout::FirstInstance ;
+xmlio_stdout & StdOut=xmlio_stdout::GetInstance() ;
+
+xmlio_stdout::xmlio_stdout(void) : std::ofstream(file_stdout)
+{
+  (*this)<<ResetIndent ;
+}
+  
+xmlio_stdout & xmlio_stdout::GetInstance(void)
+{
+  return FirstInstance ;
+}
+
+// declaration of singleton for standard error 
+
+xmlio_stderr xmlio_stderr::FirstInstance ;
+xmlio_stderr & StdErr=xmlio_stderr::GetInstance() ;
+
+xmlio_stderr::xmlio_stderr(void) : std::ofstream(file_stderr)
+{
+  (*this)<<ResetIndent ;
+}
+  
+xmlio_stderr & xmlio_stderr::GetInstance(void)
+{
+  return FirstInstance ;
+}
+  
+
+// declaration of singleton for standard error 
+
+xmlio_stdlog xmlio_stdlog::FirstInstance ;
+xmlio_stdlog & StdLog=xmlio_stdlog::GetInstance() ;
+
+xmlio_stdlog::xmlio_stdlog(void) : std::ofstream(file_stdlog)
+{
+  (*this)<<ResetIndent ;
+}
+  
+xmlio_stdlog & xmlio_stdlog::GetInstance(void)
+{
+  return FirstInstance ;
+}
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/stdout.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/stdout.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/stdout.hpp	(revision 76)
@@ -0,0 +1,47 @@
+#ifndef STDOUT_HPP
+#define STDOUT_HPP
+
+#include <fstream>
+
+class xmlio_stdout : public std::ofstream
+{
+  public :
+  
+  static xmlio_stdout FirstInstance ;
+  static xmlio_stdout & GetInstance(void) ;
+  
+  private :
+  
+  xmlio_stdout(void) ;
+} ;
+
+extern xmlio_stdout & StdOut ;
+
+class xmlio_stderr : public std::ofstream
+{
+  public :
+  
+  static xmlio_stderr FirstInstance ;
+  static xmlio_stderr & GetInstance(void) ;
+  
+  private :
+  
+  xmlio_stderr(void) ;
+} ;
+extern xmlio_stderr & StdErr ;
+
+class xmlio_stdlog : public std::ofstream
+{
+  public :
+  
+  static xmlio_stdlog FirstInstance ;
+  static xmlio_stdlog & GetInstance(void) ;
+  
+  private :
+  
+  xmlio_stdlog(void) ;
+} ;
+extern xmlio_stdlog & StdLog ;
+
+#endif
+
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/stdout_indent.cpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/stdout_indent.cpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/stdout_indent.cpp	(revision 76)
@@ -0,0 +1,16 @@
+#include "xmlio_std.hpp"
+#include "stdout_indent.hpp"
+#include "stdout.hpp"
+
+int iostreamIndexIndent=ios::xalloc();
+
+
+static struct CInitStdOutIndent
+{
+  CInitStdOutIndent()
+  {
+    cout<<ResetIndent ;
+    cerr<<ResetIndent ;
+    clog<<ResetIndent ;
+  } ;
+} Init ;
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/stdout_indent.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/stdout_indent.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/stdout_indent.hpp	(revision 76)
@@ -0,0 +1,54 @@
+#ifndef STDOUT_INDENT_HPP
+#define STDOUT_INDENT_HPP
+#include "xmlio_std.hpp"
+
+extern int iostreamIndexIndent ;
+
+ostream& iendl(ostream& o) ;
+ostream& inc_endl(ostream& o) ;
+ostream& dec_endl(ostream& o) ;
+
+inline ostream& IncIndent(ostream& o)
+{
+  ++o.iword(iostreamIndexIndent) ;
+  return o ;
+}
+
+inline ostream& DecIndent(ostream& o)
+{
+  if (o.iword(iostreamIndexIndent)>0)
+    --o.iword(iostreamIndexIndent) ;
+  return o ;
+}
+
+inline ostream& ResetIndent(ostream& o)
+{
+  o.iword(iostreamIndexIndent)=0 ;
+  return o ;
+}
+
+inline ostream& iendl(ostream& o)
+{
+  o<<'\n' ;
+  int mem=o.width(o.iword(iostreamIndexIndent)*2) ;
+  o<<"";
+  o.width(mem) ;
+  return o ;
+}
+
+inline ostream& inc_endl(ostream& o)
+{
+  return o<<IncIndent<<iendl ;
+}
+
+inline ostream& dec_endl(ostream& o)
+{
+  return o<<DecIndent<<iendl ;
+}
+
+
+#endif
+
+
+
+
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/test.cpp.old
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/test.cpp.old	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/test.cpp.old	(revision 76)
@@ -0,0 +1,5 @@
+void f(void)
+{
+  class { public : int n ;} toto ;
+  toto.n =1 ;
+}
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/xmlio_exception.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/xmlio_exception.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/xmlio_exception.hpp	(revision 76)
@@ -0,0 +1,92 @@
+#ifndef XMLIO_EXCEPTION_HPP
+#define XMLIO_EXCEPTION_HPP
+
+#include <sstream>
+#include "xmlio_std.hpp"
+using namespace std ;
+
+class ex_error
+{
+  public :
+  string what ;
+  ex_error(const string & what_ ) : what(what_) {} ;
+} ;
+
+//class error;
+//ostringstream & operator << (const error & err,char const * str) ;
+//ostringstream & operator << (const error & err,const string & str) ;
+
+
+class error : public ostringstream
+{
+  public :
+    
+    error(const string & where) : ostringstream()
+    {
+      *this<<"*** Error **** in function : "<<where<<endl<<"------> "<<string("toto") ;
+    } ;
+    
+    error(const char * where) : ostringstream()
+    {
+      *this<<"Error in function : "<<where<<endl<<"------> " ;
+    } ;
+
+    ~error()
+    {
+      StdErr<< this->str() <<endl ;
+      throw(ex_error(this->str())) ;
+    } ;
+
+   ostringstream & operator << (char const * str) const
+   {
+     ostringstream * tmp=const_cast <error *>(this) ;
+     *tmp<<str ;
+     return *tmp ;
+   } ;
+
+   ostringstream & operator << (const string& str) const
+   {
+     ostringstream * tmp=const_cast <error *>(this) ;
+     *tmp<<str ;
+     return *tmp ;
+   } ; 
+
+} ;
+
+class warning : public ostringstream
+{
+  public :
+    
+    warning(const string & where) : ostringstream()
+    {
+      *this<<"*** Warning **** in function : "<<where<<endl<<"------> ";
+    } ;
+    
+    warning(const char * where) : ostringstream()
+    {
+      *this<<"Error in function : "<<where<<endl<<"------> " ;
+    } ;
+
+    ~warning()
+    {
+      StdErr<< this->str() <<endl ;
+    } ;
+
+   ostringstream & operator << (char const * str) const
+   {
+     ostringstream * tmp=const_cast <warning *>(this) ;
+     *tmp<<str ;
+     return *tmp ;
+   } ;
+
+   ostringstream & operator << (const string& str) const
+   {
+     ostringstream * tmp=const_cast <warning *>(this) ;
+     *tmp<<str ;
+     return *tmp ;
+   } ; 
+
+} ;
+
+
+#endif
Index: /XMLIO_V2/dev/trunk/trunk/src/XMLIO/xmlio_std.hpp
===================================================================
--- /XMLIO_V2/dev/trunk/trunk/src/XMLIO/xmlio_std.hpp	(revision 76)
+++ /XMLIO_V2/dev/trunk/trunk/src/XMLIO/xmlio_std.hpp	(revision 76)
@@ -0,0 +1,21 @@
+#ifndef XMLIO_STD_HPP
+#define XMLIO_STD_HPP
+
+
+
+#include <blitz/array.h>
+#include <string>
+#include <iostream>
+#include <vector>
+#include <map>
+#include <unordered_map>
+using namespace blitz ;
+using namespace std ;
+//using namespace std::tr1 ;
+
+#include "stdout.hpp"
+#include "stdout_indent.hpp"
+#include "xmlio_exception.hpp"
+
+
+#endif
