Index: /XMLIO_V2/dev/common/Doxyfile
===================================================================
--- /XMLIO_V2/dev/common/Doxyfile	(revision 219)
+++ /XMLIO_V2/dev/common/Doxyfile	(revision 219)
@@ -0,0 +1,1725 @@
+# Doxyfile 1.7.4
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file 
+# that follow. The default is UTF-8 which is also the encoding used for all 
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
+# iconv built into libc) for the transcoding. See 
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = XMLIOSERVER
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 0.4
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description 
+# for a project that appears at the top of each page and should give viewer 
+# a quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          = "Serveur d'EntrÃ©es/Sorties parallÃšles"
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is 
+# included in the documentation. The maximum height of the logo should not 
+# exceed 55 pixels and the maximum width should not exceed 200 pixels. 
+# Doxygen will copy the logo to the output directory.
+
+PROJECT_LOGO           = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = wk/doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, 
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = French
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful if your file system 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like regular Qt-style comments 
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
+# interpret the first line (until the first dot) of a Qt-style 
+# comment as the brief description. If set to NO, the comments 
+# will behave just like regular Qt-style comments (thus requiring 
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Java. For instance, namespaces will be presented as packages, qualified 
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
+# sources. Doxygen will then generate output that is tailored for 
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it 
+# parses. With this tag you can assign which parser to use for a given extension. 
+# Doxygen has a built-in mapping, but you can override or extend it using this 
+# tag. The format is ext=language, where ext is a file extension, and language 
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, 
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make 
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C 
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions 
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
+# to include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also makes the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = YES
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
+# Doxygen will parse them like normal C++ but will assume all classes use public 
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter 
+# and setter methods for a property. Setting this option to YES (the default) 
+# will make doxygen replace the get and set methods by a property in the 
+# documentation. This will only work if the methods are indeed getting or 
+# setting a simple type. If this is not the case, or you want to show the 
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and 
+# unions are shown inside the group in which they are included (e.g. using 
+# @ingroup) instead of on a separate page (for HTML and Man pages) or 
+# section (for LaTeX and RTF).
+
+INLINE_GROUPED_CLASSES = NO
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
+# is documented as struct, union, or enum with the name of the typedef. So 
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
+# with name TypeT. When disabled the typedef will appear as a member of a file, 
+# namespace, or class. And the struct will be named TypeS. This can typically 
+# be useful for C code in case the coding convention dictates that all compound 
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
+# determine which symbols to keep in memory and which to flush to disk. 
+# When the cache is full, less often used symbols will be written to disk. 
+# For small to medium size projects (<1000 input files) the default value is 
+# probably good enough. For larger projects a too small cache size can cause 
+# doxygen to be busy swapping symbols to and from disk most of the time 
+# causing a significant performance penalty. 
+# If the system has enough physical memory increasing the cache will improve the 
+# performance by keeping more symbols in memory. Note that the value works on 
+# a logarithmic scale so increasing the size by one will roughly double the 
+# memory usage. The cache size is given by this formula: 
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = YES
+
+# If this flag is set to YES, the members of anonymous namespaces will be 
+# extracted and appear in the documentation as a namespace called 
+# 'anonymous_namespace{file}', where file will be replaced with the base 
+# name of the file that contains the anonymous namespace. By default 
+# anonymous namespaces are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 
+# will list include files with double quotes in the documentation 
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 
+# will sort the (brief and detailed) documentation of class members so that 
+# constructors and destructors are listed first. If set to NO (the default) 
+# the constructors will appear in the respective orders defined by 
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
+# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to 
+# do proper type resolution of all parameters of a function it will reject a 
+# match between the prototype and the implementation of a member function even 
+# if there is only one candidate or it is obvious which candidate to choose 
+# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen 
+# will still accept a match between prototype and implementation in such cases.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or macro consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and macros in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
+# This will remove the Files entry from the Quick Index and from the 
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from 
+# the version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 
+# by doxygen. The layout file controls the global structure of the generated 
+# output files in an output format independent way. The create the layout file 
+# that represents doxygen's defaults, run doxygen with the -l option. 
+# You can optionally specify a file name after the option, if omitted 
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE            = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# The WARN_NO_PARAMDOC option can be enabled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = src4/xmlio
+
+# This tag can be used to specify the character encoding of the source files 
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
+# also the default input encoding. Doxygen uses libiconv (or the iconv built 
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh 
+# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py 
+# *.f90 *.f *.for *.vhd *.vhdl
+
+FILE_PATTERNS          = *.cpp \
+                         *.hpp \
+                         *.conf
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix file system feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the 
+# output. The symbol name can be a fully qualified name, a word, or if the 
+# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty or if 
+# non of the patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) 
+# and it is also possible to disable source filtering for a specific pattern 
+# using *.ext= (so without naming a filter). This option only has effect when 
+# FILTER_SOURCE_FILES is enabled.
+
+FILTER_SOURCE_PATTERNS = 
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
+# link to the source code.  Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header. Note that when using a custom header you are responsible 
+# for the proper inclusion of any scripts and style sheets that doxygen 
+# needs, which is dependent on the configuration options used. 
+# It is adviced to generate a default header using "doxygen -w html 
+# header.html footer.html stylesheet.css YourConfigFile" and then modify 
+# that header. Note that the header is subject to change so you typically 
+# have to redo this when upgrading to a newer version of doxygen or when
+# changing the value of configuration settings such as GENERATE_TREEVIEW!
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# If the HTML_TIMESTAMP tag is set to YES then the generated HTML
+# documentation will contain the timesstamp.
+
+HTML_TIMESTAMP         = YES
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 
+# other source files which should be copied to the HTML output directory. Note 
+# that these files will be copied to the base HTML output directory. Use the 
+# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that 
+# the files will be copied as-is; there are no commands or markers available.
+
+HTML_EXTRA_FILES       = 
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 
+# Doxygen will adjust the colors in the stylesheet and background images 
+# according to this color. Hue is specified as an angle on a colorwheel, 
+# see http://en.wikipedia.org/wiki/Hue for more information. 
+# For instance the value 0 represents red, 60 is yellow, 120 is green, 
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE    = 224
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 
+# the colors in the HTML output. For a value of 0 the output will use 
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT    = 63
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 
+# the luminance component of the colors in the HTML output. Values below 
+# 100 gradually make the output lighter, whereas values above 100 make 
+# the output darker. The value divided by 100 is the actual gamma applied, 
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA  = 152
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 
+# page will contain the date and time when the page was generated. Setting 
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
+# documentation will contain sections that can be hidden and shown after the 
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = YES
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files 
+# will be generated that can be used as input for Apple's Xcode 3 
+# integrated development environment, introduced with OSX 10.5 (Leopard). 
+# To create a documentation set, doxygen will generate a Makefile in the 
+# HTML output directory. Running make will produce the docset in that 
+# directory and running "make install" will install the docset in 
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
+# it at startup. 
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 
+# for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
+# feed. A documentation feed provides an umbrella under which multiple 
+# documentation sets from a single provider (such as a company or product suite) 
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
+# should uniquely identify the documentation set bundle. This should be a 
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify 
+# the documentation publisher. This should be a reverse domain-name style 
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
+# content.
+
+CHM_INDEX_ENCODING     = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 
+# that can be used as input for Qt's qhelpgenerator to generate a 
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
+# be used to specify the file name of the resulting .qch file. 
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 
+# add. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 
+# custom filter to add. For more information please see 
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> 
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 
+# project's 
+# filter section matches. 
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> 
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
+# be used to specify the location of Qt's qhelpgenerator. 
+# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# .qhp file.
+
+QHG_LOCATION           = 
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files  
+# will be generated, which together with the HTML files, form an Eclipse help 
+# plugin. To install this plugin and make it available under the help contents 
+# menu in Eclipse, the contents of the directory containing the HTML and XML 
+# files needs to be copied into the plugins directory of eclipse. The name of 
+# the directory within the plugins directory should be the same as 
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 
+# the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin 
+# the directory name containing the HTML and XML files should also have 
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 
+# (range [0,1..20]) that doxygen will group on one line in the generated HTML 
+# documentation. Note that a value of 0 will completely suppress the enum 
+# values from appearing in the overview section.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
+# structure should be generated to display hierarchical information. 
+# If the tag value is set to YES, a side panel will be generated 
+# containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = YES
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of Latex formulas included 
+# as images in the HTML documentation. The default is 10. Note that 
+# when you change the font size after a successful doxygen run you need 
+# to manually remove any form_*.png images from the HTML output directory 
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images 
+# generated for formulas are transparent PNGs. Transparent PNGs are 
+# not supported properly for IE 6.0, but are supported on all modern browsers. 
+# Note that when changing this option you need to delete any form_*.png files 
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax 
+# (see http://www.mathjax.org) which uses client side Javascript for the 
+# rendering instead of using prerendered bitmaps. Use this if you do not 
+# have LaTeX installed or if you want to formulas look prettier in the HTML 
+# output. When enabled you also need to install MathJax separately and 
+# configure the path to it using the MATHJAX_RELPATH option.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you need to specify the location relative to the 
+# HTML output directory using the MATHJAX_RELPATH option. The destination 
+# directory should contain the MathJax.js script. For instance, if the mathjax 
+# directory is located at the same level as the HTML output directory, then 
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the 
+# mathjax.org site, so you can quickly see the result without installing 
+# MathJax, but it is strongly recommended to install a local copy of MathJax 
+# before deployment.
+
+MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box 
+# for the HTML output. The underlying search engine uses javascript 
+# and DHTML and should work on any modern browser. Note that when using 
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 
+# (GENERATE_DOCSET) there is already a search function so this one should 
+# typically be disabled. For large projects the javascript based search engine 
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be 
+# implemented using a PHP enabled web server instead of at the web client 
+# using Javascript. Doxygen will generate the search PHP script and index 
+# file to put on the web server. The advantage of the server 
+# based approach is that it scales better to large projects and allows 
+# full text search. The disadvantages are that it is more difficult to setup 
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name. 
+# Note that when enabling USE_PDFLATEX this option is only used for 
+# generating bitmaps for formulas in the HTML output, but not in the 
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for 
+# the generated latex document. The footer should contain everything after 
+# the last chapter. If it is left blank doxygen will generate a 
+# standard footer. Notice: only use this tag if you know what you are doing!
+
+LATEX_FOOTER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include 
+# source code with syntax highlighting in the LaTeX output. 
+# Note that which sources are shown also depends on other settings 
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# pointed to by INCLUDE_PATH will be searched when a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition that 
+# overrules the definition found in the source code.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all references to function-like macros 
+# that are alone on a line, have an all uppercase name, and do not end with a 
+# semicolon, because these will confuse the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links. 
+# Note that each tag file must have a unique name 
+# (where the name does NOT include the path) 
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option also works with HAVE_DOT disabled, but it is recommended to 
+# install and use dot, since it yields more powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see 
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
+# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = YES
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 
+# allowed to run in parallel. When set to 0 (the default) doxygen will 
+# base this on the number of processors available in the system. You can set it 
+# explicitly to a value larger than 0 to get control over the balance 
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS        = 0
+
+# By default doxygen will write a font called Helvetica to the output 
+# directory and reference it in all dot files that doxygen generates. 
+# When you want a differently looking font you can specify the font name 
+# using DOT_FONTNAME. You need to make sure dot is able to find the font, 
+# which can be done by putting it in a standard location or by setting the 
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
+# containing the font.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the 
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
+# different font using DOT_FONTNAME you can set the path where dot 
+# can find it using this tag.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
+# doxygen will generate a call dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable call graphs 
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = YES
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
+# doxygen will generate a caller dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable caller 
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include 
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are svg, png, jpg, or gif. 
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that 
+# contain msc files that are included in the documentation (see the 
+# \mscfile command).
+
+MSCFILE_DIRS           = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen if the 
+# number of direct children of the root node in a graph is already larger than 
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that the size of a graph can be further restricted by 
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, because dot on Windows does not 
+# seem to support this out of the box. Warning: Depending on the platform used, 
+# enabling this option may lead to badly anti-aliased labels on the edges of 
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
Index: /XMLIO_V2/dev/common/bld.cfg
===================================================================
--- /XMLIO_V2/dev/common/bld.cfg	(revision 219)
+++ /XMLIO_V2/dev/common/bld.cfg	(revision 219)
@@ -0,0 +1,42 @@
+# ----------------------- 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::conf  CPP::INCLUDE
+bld::infile_ext::hpp   CPP::INCLUDE
+
+
+search_src           true
+src::xmlio XMLIO
+bld::lib::xmlio xmlio
+bld::target libxmlio.a
+bld::target main_server.exe
+bld::exe_dep
+
+bld::tool::cc        %CCOMPILER
+bld::tool::fc        %FCOMPILER
+bld::tool::cppflags  -I${PWD}/extra/include -I/usr/include
+bld::tool::ld        %LINKER
+bld::tool::ldflags   %LD_FLAGS 
+bld::tool::cflags    %CFLAGS -I${PWD}/extra/include -I/usr/include
+bld::tool::fflags    %FFLAGS -I/usr/include
+
+# Pre-process code before analysing dependencies
+bld::pp              false
+bld::excl_dep        inc::mpif.h
Index: /XMLIO_V2/dev/common/src/xmlio/array.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/array.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/array.hpp	(revision 219)
@@ -0,0 +1,65 @@
+#ifndef __XMLIO_CArray__
+#define __XMLIO_CArray__
+
+/// boost headers ///
+#include <boost/cstdint.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/multi_array.hpp>
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   template <typename ValueType, StdSize  NumDims,
+             typename Allocator = std::allocator<ValueType> >
+      class CArray
+         : public boost::multi_array<ValueType, NumDims, Allocator>
+   {
+         /// DÃ©finition de type ///
+         typedef boost::multi_array<ValueType, NumDims, Allocator> SuperClass;
+
+      public:
+
+         typedef ValueType ValType;
+
+         /// Constructeurs ///
+         template <typename ExtentList>
+            explicit CArray(const ExtentList & sizes);
+
+         template <typename ExtentList>
+            CArray(const ExtentList & sizes, const boost::general_storage_order<NumDims> & store);
+
+         CArray(const CArray & array);       // NEVER IMPLEMENTED.
+         CArray(const CArray * const array); // NEVER IMPLEMENTED.
+
+      public:
+      
+         /// Flux ///
+         template <typename U, StdSize V, typename W>
+            friend StdOStream & operator << 
+                  (StdOStream & os, const CArray<U, V, W> & array);
+
+         template <typename U, StdSize V, typename W>
+            friend StdIStream & operator >> 
+                  (StdIStream & is, CArray<U, V, W> & array);
+
+      public:
+
+         void toBinary  (StdOStream & os) const;
+         void fromBinary(StdIStream & is);
+
+         /// Destructeur ///
+         virtual ~CArray(void);
+
+   }; // class CArray
+
+   ///---------------------------------------------------------------
+
+} // namespace xmlioserver
+
+#include "array_impl.hpp"
+#include "array_mac.hpp"
+
+#endif // __XMLIO_CArray__
Index: /XMLIO_V2/dev/common/src/xmlio/array_impl.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/array_impl.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/array_impl.hpp	(revision 219)
@@ -0,0 +1,115 @@
+#ifndef __XMLIO_CArray_impl__
+#define __XMLIO_CArray_impl__
+
+#include "array_mac.hpp"
+
+namespace xmlioserver
+{
+   
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   template <typename ValueType, StdSize NumDims, typename Allocator>
+      template <typename ExtentList>
+         CArray<ValueType, NumDims, Allocator>::CArray(const ExtentList & sizes)
+            : boost::multi_array<ValueType, NumDims, Allocator>
+                  (sizes, boost::fortran_storage_order())
+   { /* Ne rien faire de plus */ }
+
+   template <typename ValueType, StdSize NumDims, typename Allocator>
+      template <typename ExtentList>
+         CArray<ValueType, NumDims, Allocator>::CArray
+            (const ExtentList & sizes, const boost::general_storage_order<NumDims> & store)
+               : boost::multi_array<ValueType, NumDims, Allocator> (sizes, store)
+   { /* Ne rien faire de plus */ }
+
+   template <typename ValueType, StdSize NumDims, typename Allocator>
+      CArray<ValueType, NumDims, Allocator>::~CArray(void)
+   { /* Ne rien faire de plus */ }
+
+   //----------------------------------------------------------------
+
+   template <typename ValueType, StdSize NumDims, typename Allocator>
+      StdOStream & operator << (StdOStream & os,
+                                const CArray<ValueType, NumDims, Allocator> & array)
+   {
+      os << (array.data()[0]) << "(" << array.shape()[0];
+      for (StdSize i = 1; i < array.num_dimensions(); i++)
+         os << ", " << array.shape()[i];
+      os << ")" << (array.data()[array.num_elements()-1]);
+      return (os);
+   }
+
+   //----------------------------------------------------------------
+
+   template <typename ValueType, StdSize NumDims, typename Allocator>
+      StdOStream & operator << 
+         (StdOStream & os, const boost::shared_ptr<CArray<ValueType, NumDims, Allocator> > & array)
+   { 
+      os << *array; 
+      return (os); 
+   }
+   
+   //----------------------------------------------------------------
+   
+   template <typename ValueType> void FromBinary
+         (StdIStream & is, ARRAY(ValueType, 1) & array)
+   {
+      ARRAY_ASSIGN(array, ValueType, 1, [1]);
+      array->fromBinary(is);
+   }
+   
+   template <typename ValueType> void FromBinary
+         (StdIStream & is, ARRAY(ValueType, 2) & array)
+   {
+      ARRAY_ASSIGN(array, ValueType, 2, [1][1]);
+      array->fromBinary(is);
+   }
+
+   template <typename ValueType> void FromBinary
+         (StdIStream & is, ARRAY(ValueType, 3) & array)
+   {
+      ARRAY_ASSIGN(array, ValueType, 3, [1][1][1]);
+      array->fromBinary(is);
+   }
+   //----------------------------------------------------------------
+
+   template <typename ValueType, StdSize NumDims, typename Allocator>
+      void CArray<ValueType, NumDims, Allocator>::toBinary  (StdOStream & os) const
+   {
+      typedef boost::multi_array_types::size_type LSize;
+      LSize nelem = this->num_elements();
+      LSize ndim  = this->num_dimensions();
+      const LSize * shape = this->shape();
+      const ValueType * data = this->data();
+
+      os.write (reinterpret_cast<const char*>(&ndim) , sizeof(LSize));
+      for (LSize i = 0; i < ndim; i++ )
+         os.write (reinterpret_cast<const char*>(&(shape[i])), sizeof(LSize));
+      os.write (reinterpret_cast<const char*>(&nelem), sizeof(LSize));
+      os.write (reinterpret_cast<const char*>(data), nelem * sizeof(ValueType));
+   }
+
+   //----------------------------------------------------------------
+
+   template <typename ValueType, StdSize NumDims, typename Allocator>
+      void CArray<ValueType, NumDims, Allocator>::fromBinary(StdIStream & is)
+   {
+      typedef boost::multi_array_types::size_type LSize;
+      LSize ndim = 0, nelem = 0, temp = 0;
+      std::vector<LSize> shape;
+      is.read (reinterpret_cast<char*>(&ndim) , sizeof(LSize));
+      for (LSize i = 0; i < ndim; i++ )
+      {
+         is.read (reinterpret_cast<char*>(&temp) , sizeof(LSize));
+         shape.push_back(temp);
+      }
+      this->resize(shape);
+      is.read (reinterpret_cast<char*>(&nelem), sizeof(LSize));
+      is.read (reinterpret_cast<char*>(this->data()), nelem * sizeof(ValueType));
+   }
+
+   ///---------------------------------------------------------------
+   
+} // namespace xmlioserver
+
+#endif // __XMLIO_CArray_impl__
Index: /XMLIO_V2/dev/common/src/xmlio/array_mac.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/array_mac.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/array_mac.hpp	(revision 219)
@@ -0,0 +1,26 @@
+#ifndef __XMLIO_CArray_mac__
+#define __XMLIO_CArray_mac__
+
+/// ////////////////////// Macros ////////////////////// ///
+
+// Type Fortran
+#define ARRAY(valuetype, numdims) boost::shared_ptr<CArray<valuetype, numdims> >
+
+#define ARRAY_ASSIGN(value, valuetype, numdims, extent)\
+   value.reset(new CArray<valuetype, numdims>(boost::extents extent)) 
+
+#define ARRAY_CREATE(value, valuetype, numdims, extent)\
+   ARRAY(valuetype, numdims) value =                   \
+   ARRAY(valuetype, numdims)(new CArray<valuetype, numdims>(boost::extents extent))
+
+// Type C
+#define ARRAY_C_ASSIGN(value, valuetype, numdims, extent)\
+   value = ARRAY(valuetype, numdims)                     \
+   (new CArray<valuetype, numdims>(boost::extents extent, c_storage_order()))
+
+#define ARRAY_C_CREATE(value, valuetype, numdims, extent)\
+   ARRAY_C_ASSIGN(ARRAY(valuetype, numdims) value, valuetype, numdims, extent)
+
+///---------------------------------------------------------------
+
+#endif // __XMLIO_CArray_mac__
Index: /XMLIO_V2/dev/common/src/xmlio/attribute.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/attribute.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/attribute.cpp	(revision 219)
@@ -0,0 +1,55 @@
+#include "attribute.hpp"
+
+namespace xmlioserver
+{
+   namespace tree
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CAttribute::CAttribute(const StdString & id)
+         : CObject(id)
+         , value()
+      { /* Ne rien faire de plus */ }
+
+      CAttribute::CAttribute(const CAttribute & attribut)
+         : CObject(attribut.getId())
+      { 
+         this->value = attribut.getAnyValue(); 
+      }
+      
+      CAttribute::~CAttribute(void)
+      { /* Ne rien faire de plus */ }
+      
+      ///--------------------------------------------------------------
+
+      const boost::any & CAttribute::getAnyValue(void) const
+      { 
+         return (this->value); 
+      }
+
+
+      void CAttribute::setAnyValue(const boost::any & value)
+      { 
+         this->value = value; 
+      }
+      
+      void CAttribute::clear(void)
+      {
+         this->value = boost::any(); 
+      }
+
+      //---------------------------------------------------------------
+
+      bool CAttribute::isEmpty(void) const
+      { 
+         return (this->value.empty()); 
+      }
+
+      const StdString & CAttribute::getName(void) const
+      { 
+         return (this->getId()); 
+      }
+      
+      ///--------------------------------------------------------------
+
+   } // namespace tree
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/attribute.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/attribute.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/attribute.hpp	(revision 219)
@@ -0,0 +1,85 @@
+#ifndef __XMLIO_CAttribute__
+#define __XMLIO_CAttribute__
+
+/// boost headers ///
+#include <boost/any.hpp>
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "object.hpp"
+
+namespace xmlioserver
+{
+   namespace tree
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CAttribute : public CObject
+      {
+            typedef CObject SuperClass;
+
+         public :
+
+            /// Constructeurs ///
+            explicit CAttribute(const StdString & id);
+            CAttribute(const CAttribute & attribut);
+            CAttribute(const CAttribute * const attribut); // Not implemented.
+
+            /// Accesseurs ///
+            const StdString & getName(void) const;
+            const boost::any & getAnyValue(void) const;
+            template <typename T> inline T getValue(void) const;
+
+            /// Mutateurs ///
+            template <typename T> inline void setValue(const T & value);
+            void setAnyValue(const boost::any & value);
+            void clear(void);
+
+            /// Test ///
+            bool isEmpty(void) const;
+            template <typename T> inline bool isType(void);
+
+            /// Destructeur ///
+            virtual ~CAttribute(void);
+
+            /// Autres ///
+            virtual StdString toString(void) const = 0;
+            virtual void fromString(const StdString & str) = 0;
+
+            virtual void toBinary  (StdOStream & os) const = 0;
+            virtual void fromBinary(StdIStream & is) = 0;
+
+         protected :
+
+            /// Constructeurs ///
+            CAttribute(void);  // Not implemented.
+
+         private :
+
+            /// PropriÃ©tÃ© ///
+            boost::any value;
+
+      }; // class CAttribute
+
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      template <typename T>
+         T CAttribute::getValue(void) const
+      { 
+         return (boost::any_cast<T>(this->value)); 
+      }
+
+      template <typename T>
+         void CAttribute::setValue(const T & value)
+      { 
+         this->value = value; 
+      }
+
+      template<typename T>
+         bool CAttribute::isType(void)
+      { 
+         return (this->value.type() == typeid(T)); 
+      }
+
+   } // namespace tree
+} // namespace xmlioserver
+
+#endif // __XMLIO_CAttribute__
Index: /XMLIO_V2/dev/common/src/xmlio/attribute_map.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/attribute_map.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/attribute_map.cpp	(revision 219)
@@ -0,0 +1,189 @@
+#include "attribute_map.hpp"
+
+namespace xmlioserver
+{
+   namespace tree
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CAttributeMap * CAttributeMap::Current = NULL;
+
+      CAttributeMap::CAttributeMap(void)
+         : xios_map<StdString, CAttribute*>()
+      { CAttributeMap::Current = this; }
+
+      CAttributeMap::~CAttributeMap(void)
+      { /* Ne rien faire de plus */ }
+      
+      ///--------------------------------------------------------------
+
+      void CAttributeMap::clearAllAttributes(void)
+      {
+         typedef std::pair<StdString, CAttribute*> StdStrAttPair;
+         SuperClassMap::const_iterator it = SuperClassMap::begin(), end = SuperClassMap::end();
+         for (; it != end; it++)
+         {
+            const StdStrAttPair & att = *it;
+            if (!att.second->isEmpty())
+               att.second->clear();
+         }
+      }
+
+      //---------------------------------------------------------------
+
+      bool CAttributeMap::hasAttribute(const StdString & key) const
+      { 
+         return (this->find(key) != this->end()); 
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CAttributeMap::setAttribute(const StdString & key, CAttribute * const attr)
+      {
+         if (!this->hasAttribute(key))
+            ERROR("CAttributeMap::setAttribute(key, attr)",
+                   << "[ key = " << key << "] key not found !");
+         if (attr == NULL)
+            ERROR("CAttributeMap::setAttribute(key, attr)",
+                   << "[ key = " << key << "] attr is null !");
+         this->find(key)->second->setAnyValue(attr->getAnyValue());
+      }
+      
+      //---------------------------------------------------------------
+      
+      CAttribute * CAttributeMap::operator[](const StdString & key)
+      {
+         if (!this->hasAttribute(key))
+            ERROR("CAttributeMap::operator[](const StdString & key)",
+                  << "[ key = " << key << "] key not found !");
+         return (SuperClassMap::operator[](key));
+      }
+      
+      //---------------------------------------------------------------
+      
+      StdString CAttributeMap::toString(void) const
+      {
+         typedef std::pair<StdString, CAttribute*> StdStrAttPair;
+         StdOStringStream oss;
+         
+         SuperClassMap::const_iterator it = SuperClassMap::begin(), end = SuperClassMap::end();
+         for (; it != end; it++)
+         {
+            const StdStrAttPair & att = *it;
+            if (!att.second->isEmpty())
+               oss << *att.second << " ";
+         }
+         return (oss.str());
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CAttributeMap::fromString(const StdString & str)
+      { 
+         ERROR("CAttributeMap::fromString(const StdString & str)",
+               << "[ str = " << str << "] Not implemented yet !"); 
+      }
+      
+      //---------------------------------------------------------------
+
+      //StdOStream & operator << (StdOStream & os, const CAttributeMap & attributmap)
+      //{ os << attributmap.toString(); return (os); }
+      
+      //---------------------------------------------------------------
+      
+      void CAttributeMap::setAttributes(const xml::THashAttributes & attributes)
+      {
+         for (xml::THashAttributes::const_iterator it  = attributes.begin();
+                                                   it != attributes.end();
+                                                   it ++)
+            if ((*it).first.compare(StdString("id")) != 0 &&
+                (*it).first.compare(StdString("src"))!= 0)
+            {
+               //if (CAttributeMap::operator[]((*it).first)->isEmpty())
+               CAttributeMap::operator[]((*it).first)->fromString((*it).second);
+            }
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CAttributeMap::setAttributes(const CAttributeMap * const _parent)
+      {
+         typedef std::pair<StdString, CAttribute*> StdStrAttPair;
+         
+         SuperClassMap::const_iterator it = _parent->begin(), end = _parent->end();
+         for (; it != end; it++)
+         {
+            const StdStrAttPair & el = *it;
+            if (this->hasAttribute(el.first))
+            {
+               CAttribute * currAtt = CAttributeMap::operator[](el.first);
+               if (currAtt->isEmpty() && !el.second->isEmpty())
+               {
+                  this->setAttribute(el.first, el.second);
+               }
+            }
+         }
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CAttributeMap::toBinary(StdOStream & os) const
+      {
+         typedef std::pair<StdString, CAttribute*> StdStrAttPair;
+         SuperClassMap::const_iterator it = this->begin(), end = this->end();
+         
+         const StdSize nbatt = SuperClassMap::size();
+         os.write (reinterpret_cast<const char*>(&nbatt) , sizeof(StdSize));
+         
+         for (; it != end; it++)
+         {
+            const StdString & key   = it->first;
+            const CAttribute* value = it->second;            
+            const StdSize size = key.size();
+            
+            os.write (reinterpret_cast<const char*>(&size) , sizeof(StdSize));
+            os.write (key.data(), size * sizeof(char));
+            
+            if (!value->isEmpty())
+            {
+               bool b = true;
+               os.write (reinterpret_cast<const char*>(&b) , sizeof(bool));
+               value->toBinary(os);
+            }
+            else 
+            {
+               bool b = false;
+               os.write (reinterpret_cast<const char*>(&b) , sizeof(bool));
+            }
+         }
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CAttributeMap::fromBinary(StdIStream & is)
+      {
+         StdSize nbatt = 0;
+         is.read (reinterpret_cast<char*>(&nbatt), sizeof(StdSize));
+         
+         for (StdSize i = 0; i < nbatt; i++)
+         {
+            bool hasValue = false;
+            StdSize size  = 0;
+            is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+            StdString key(size, ' ');
+            is.read (const_cast<char *>(key.data()), size * sizeof(char));
+            
+            if (!this->hasAttribute(key))
+               ERROR("CAttributeMap::fromBinary(StdIStream & is)",
+                     << "[ key = " << key << "] key not found !");
+                                        
+            is.read (reinterpret_cast<char*>(&hasValue), sizeof(bool));
+            
+            if (hasValue)          
+               this->operator[](key)->fromBinary(is);
+         }
+      }
+      
+      ///--------------------------------------------------------------
+
+   } // namespace tree
+} // namespace xmlioser
Index: /XMLIO_V2/dev/common/src/xmlio/attribute_map.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/attribute_map.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/attribute_map.hpp	(revision 219)
@@ -0,0 +1,66 @@
+#ifndef __XMLIO_CAttributeMap__
+#define __XMLIO_CAttributeMap__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "attribute.hpp"
+#include "attribute_template.hpp"
+#include "exception.hpp"
+#include "xml_node.hpp"
+
+namespace xmlioserver
+{
+   namespace tree
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CAttributeMap
+         : public xios_map<StdString, CAttribute*>
+      {
+            typedef xios_map<StdString, CAttribute*> SuperClassMap;
+
+         public :
+
+            /// Tests ///
+            inline bool hasAttribute(const StdString & key) const;
+
+            /// Accesseurs ///
+            CAttribute * operator[](const StdString & key);
+
+            /// Mutateurs ///
+            void setAttribute(const StdString & key, CAttribute * const attr);
+
+            void setAttributes(const xml::THashAttributes & attributes);
+            void setAttributes(const CAttributeMap * const _parent);
+
+            void clearAllAttributes(void);
+
+            /// Destructeur ///
+            virtual ~CAttributeMap(void);
+
+            /// Flux ///
+            // Debug only //
+            // friend StdOStream & operator << (StdOStream & os, const CAttributeMap & attributmap);
+
+            /// Autre ///
+            virtual StdString toString(void) const;
+            virtual void fromString(const StdString & str);
+            
+            virtual void toBinary  (StdOStream & os) const;
+            virtual void fromBinary(StdIStream & is);
+
+         protected :
+
+            /// Constructeurs ///
+            CAttributeMap(void);
+            CAttributeMap(const xios_map<StdString, CAttribute*> & umap);       // Never implemented.
+            CAttributeMap(const xios_map<StdString, CAttribute*> * const umap); // Not implemented.
+
+            /// PropriÃ©tÃ© statique ///
+            static CAttributeMap * Current;
+
+      };  // class CAttributeMap
+
+   } // namespace tree
+} // namespace xmlioserver
+
+#endif // __XMLIO_CAttributeMap__
Index: /XMLIO_V2/dev/common/src/xmlio/attribute_template.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/attribute_template.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/attribute_template.cpp	(revision 219)
@@ -0,0 +1,218 @@
+#include "attribute_template.hpp"
+#include "attribute_template_impl.hpp"
+
+#include <cfloat>
+
+namespace xmlioserver
+{
+   namespace tree
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      /** SpÃ©cialisations des templates pour la fonction [toString] **/
+      
+      template <>
+         StdString CAttributeTemplate<bool>::toString(void) const
+      {
+         StdOStringStream oss;
+         if (!this->isEmpty() && this->hasId())
+         {
+            if (this->getValue())
+               oss << this->getName() << "=\".TRUE.\"";
+            else
+               oss << this->getName() << "=\".FALSE.\"";
+         }
+         return (oss.str());
+      }
+
+      //---------------------------------------------------------------
+
+      /** SpÃ©cialisations des templates pour la fonction [fromString] **/
+
+      template <> // ChaÃ®ne de caractÃšres.
+         void CAttributeTemplate<StdString>::fromString(const StdString & str)
+      { 
+         this->setValue(str); 
+      }
+
+      template <> // Entier
+         void CAttributeTemplate<int>::fromString(const StdString & str)
+      {
+         try
+         {
+            this->setValue(boost::lexical_cast<int>(str));
+         }
+         catch(boost::bad_lexical_cast &)
+         {
+            ERROR("void CAttributeTemplate<int>::fromString(const StdString & str)",
+                  << "[ str = " << str << " ] Bad cast !");
+         }
+      }
+
+      template <> // Double
+         void CAttributeTemplate<double>::fromString(const StdString & str)
+      {
+         if (str.find("max") != StdString::npos)
+         {
+            this->setValue(DBL_MAX);
+            return;
+         }
+         if (str.find("min") != StdString::npos)
+         {
+            this->setValue(DBL_MIN);
+            return;
+         }
+         
+         try
+         {
+            this->setValue(boost::lexical_cast<double>(str));
+         }
+         catch(boost::bad_lexical_cast &)
+         {
+            ERROR("void CAttributeTemplate<double>::fromString(const StdString & str)",
+                  << "[ str = " << str << " ] Bad cast !");
+         }
+      }
+
+      template <> // BoolÃ©en
+         void CAttributeTemplate<bool>::fromString(const StdString & str)
+      {
+         if (str.find(".TRUE.") != StdString::npos)
+            this->setValue(true);
+         else
+            this->setValue(false);
+      }
+
+      //---------------------------------------------------------------
+
+      template<> // Tableau
+         void CAttributeTemplate<ARRAY(double, 1)>::fromString(const StdString & str)
+      {
+         ARRAY_CREATE(array_sptr, double, 1, [1]);
+         CArray<double, 1> & array = *array_sptr;
+         this->setValue(array_sptr);
+
+         StdIStringStream iss(str) ;
+         char c = '\0'; int size = 0;
+         double d = 0.,valsup = 0., valinf = 0.;
+         std::vector<double> vect;
+
+         iss >> d; vect.push_back(d);
+         if (!iss.eof ())
+         {
+            iss >> c;
+            switch (c)
+            {
+               case ',' : // Le tableau est gÃ©nÃ©rÃ© valeur par valeur.
+                  iss.unget();
+                  while(!iss.eof ())
+                  { // On rÃ©cupÃšre chacune des valeurs une par une jusqu'Ã  ce que le buffer soit vide.
+                     iss >> c >> d;
+                     if (c != ',')
+                        ERROR("CAttributeTemplate<ARRAY(...)>::fromString(const StdString & str)",
+                              << "[ str = " << str << " ] bad definition of array !");
+                     vect.push_back(d);
+                  }
+                  size = vect.size();
+                  break;
+               case '(' : // Le tableau est gÃ©nÃ©rÃ© automatiquement.
+                  if (!iss.eof ())
+                  { // on rÃ©cupÃšre la borne supÃ©rieure
+                     valinf = d;
+                     iss >> size >> c >> d;
+                     if ((c != ')') || (size <= 0))
+                        ERROR("CAttributeTemplate<ARRAY(...)>::fromString(const StdString & str)",
+                              << "[ str = " << str << " ] bad definition of array !");
+                     valsup = d;
+                  }
+                  d = (valsup - valinf) / (double)(size - 1);
+                  for (int j = 1; j <= size; j++)
+                     vect.push_back(valinf + j * d);
+                  break;
+               default :
+                  ERROR("CAttributeTemplate<ARRAY(...)>::fromString(const StdString & str)",
+                        << "[ str = " << str << " ] bad definition of array !");
+            }
+         }
+
+         array.resize(boost::extents[size]);
+         for (int i = 0; i < size; i++)
+            array[i] = vect[i];
+
+      }
+
+      //---------------------------------------------------------------
+
+      /** SpÃ©cialisations des templates pour la fonction [toBinary] **/
+
+      template <> // ChaÃ®ne de caractÃšres.
+         void CAttributeTemplate<StdString>::toBinary (StdOStream & os) const
+      {
+         StdString str = this->getValue();
+         StdSize size = str.size();
+         os.write (reinterpret_cast<const char*>(&size) , sizeof(StdSize));
+         os.write (str.data(), size * sizeof(char));
+      }
+
+      template <> // Entier
+         void CAttributeTemplate<int>::toBinary(StdOStream & os) const
+      {
+         int value = this->getValue();
+         os.write (reinterpret_cast<const char*>(&value) , sizeof(int));
+      }
+
+      template <> // BoolÃ©en
+         void CAttributeTemplate<bool>::toBinary(StdOStream & os) const
+      {
+         bool value = this->getValue();
+         os.write (reinterpret_cast<const char*>(&value) , sizeof(bool));
+      }
+
+      template <> // Double
+         void CAttributeTemplate<double>::toBinary(StdOStream & os) const
+      {
+         double value = this->getValue();
+         os.write (reinterpret_cast<const char*>(&value) , sizeof(double));
+      }
+
+      //---------------------------------------------------------------
+
+      /** SpÃ©cialisations des templates pour la fonction [fromBinary] **/
+
+      template <> // ChaÃ®ne de caractÃšres.
+         void CAttributeTemplate<StdString>::fromBinary(StdIStream & is)
+      {
+         StdSize size = 0;
+         is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+         StdString value(size, ' ');
+         is.read (const_cast<char *>(value.data()), size * sizeof(char));
+         this->setValue(value);
+      }
+
+      template <> // Entier
+         void CAttributeTemplate<int>::fromBinary(StdIStream & is)
+      {
+         int value = 0;
+         is.read (reinterpret_cast<char*>(&value), sizeof(int));
+         this->setValue(value);
+      }
+
+      template <> // BoolÃ©en
+         void CAttributeTemplate<bool>::fromBinary(StdIStream & is)
+      {
+         bool value = false;
+         is.read (reinterpret_cast<char*>(&value), sizeof(bool));
+         this->setValue(value);
+      }
+
+      template <> // Double
+         void CAttributeTemplate<double>::fromBinary(StdIStream & is)
+      {
+         double value = 0.;
+         is.read (reinterpret_cast<char*>(&value), sizeof(double));
+         this->setValue(value);
+      }
+
+      ///--------------------------------------------------------------
+   } // namespace tree
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/attribute_template.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/attribute_template.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/attribute_template.hpp	(revision 219)
@@ -0,0 +1,72 @@
+#ifndef __XMLIO_CAttributeTemplate__
+#define __XMLIO_CAttributeTemplate__
+
+/// boost headers ///
+#include <boost/lexical_cast.hpp>
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+#include "array.hpp"
+#include "attribute.hpp"
+
+namespace xmlioserver
+{
+   namespace tree
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      template <class T>
+         class CAttributeTemplate : public CAttribute
+      {
+            typedef CAttribute SuperClass;
+
+         public :
+
+            /// Typedef ///
+            typedef T ValueType;
+
+            /// Constructeurs ///
+            explicit CAttributeTemplate(const StdString & id);
+            CAttributeTemplate(const StdString & id,
+                               xios_map<StdString, CAttribute*> & umap);
+            CAttributeTemplate(const StdString & id, const ValueType & value);
+            CAttributeTemplate(const StdString & id, const ValueType & value,
+                               xios_map<StdString, CAttribute*> & umap);
+            CAttributeTemplate(const CAttribute & attribut) throw (CException);
+            CAttributeTemplate(const CAttribute * const attribut); // Not implemented.
+
+          public :
+
+            /// Accesseur ///
+            inline ValueType getValue(void) const;
+
+            /// Mutateurs ///
+            inline void setValue(const ValueType & value);
+
+            /// Destructeur ///
+            virtual ~CAttributeTemplate(void);
+
+            /// Operateur ///
+            ValueType operator=(const ValueType & value);
+
+            /// Autre ///
+            virtual StdString toString(void) const;
+            virtual void fromString(const StdString & str);
+
+            virtual void toBinary  (StdOStream & os) const;
+            virtual void fromBinary(StdIStream & is);            
+
+         protected :
+
+            /// Constructeurs ///
+            CAttributeTemplate(void); // Not implemented.
+
+      }; // class CAttribute    
+      
+   } // namespace tree
+   
+   template <class T>  void FromBinary(StdIStream & is, T & obj);
+   
+} // namespace xmlioserver
+
+#endif // __XMLIO_CAttributeTemplate__
Index: /XMLIO_V2/dev/common/src/xmlio/attribute_template_impl.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/attribute_template_impl.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/attribute_template_impl.hpp	(revision 219)
@@ -0,0 +1,179 @@
+#ifndef __XMLIO_CAttributeTemplate_impl__
+#define __XMLIO_CAttributeTemplate_impl__
+
+#include "array.hpp"
+
+namespace xmlioserver
+{
+   namespace tree
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      template <class T>
+         CAttributeTemplate<T>::CAttributeTemplate(const StdString & id)
+         : CAttribute(id)
+      { /* Ne rien faire de plus */ }
+
+      template <class T>
+         CAttributeTemplate<T>::CAttributeTemplate(const StdString & id, const T & value)
+         : CAttribute(id)
+      {
+         this->setValue(value);
+      }
+
+      template <class T>
+         CAttributeTemplate<T>::CAttributeTemplate(const CAttribute & attribut)
+         throw (CException)
+         : CAttribute(attribut)
+      {
+         if (!attribut.isEmpty() && !attribut.isType<T>())
+            ERROR("CAttributeTemplate", << "Invalid instantiation !");
+      }
+
+      template <class T>
+         CAttributeTemplate<T>::CAttributeTemplate(const StdString & id,
+                              xios_map<StdString, CAttribute*> & umap)
+         : CAttribute(id)
+      {
+         umap.insert(umap.end(), std::make_pair(id, this));
+      }
+
+      template <class T>
+         CAttributeTemplate<T>::CAttributeTemplate
+            (const StdString & id, const T & value,
+             xios_map<StdString, CAttribute*> & umap)
+         : CAttribute(id)
+      {
+         this->setValue(value);
+         umap.insert(umap.end(), std::make_pair(id, this));
+      }
+
+      template <class T>
+         CAttributeTemplate<T>::~CAttributeTemplate(void)
+      { 
+         this->clear();
+      }
+
+      ///--------------------------------------------------------------
+
+      template <class T>
+         T CAttributeTemplate<T>::getValue(void) const
+      {
+         if (SuperClass::isEmpty())
+            ERROR("T CAttributeTemplate<T>::getValue(void) const",
+                  << "[ id = " << this->getId() << "]"
+                  << " L'attribut est requis mais n'est pas dÃ©fini !");
+         return (SuperClass::getValue<T>());
+      }
+
+      template <class T>
+         void CAttributeTemplate<T>::setValue(const T & value)
+      {
+         SuperClass::setValue<T>(value);
+      }
+
+      //---------------------------------------------------------------
+
+      template <class T>
+         T CAttributeTemplate<T>::operator=(const T & value)
+      {
+         this->setValue(value);
+         return (this->getValue());
+      }
+
+      //---------------------------------------------------------------
+
+      template <class T>
+         StdString CAttributeTemplate<T>::toString(void) const
+      {
+         StdOStringStream oss;
+         if (!this->isEmpty() && this->hasId())
+            oss << this->getName() << "=\"" << this->getValue() << "\"";
+         return (oss.str());
+      }
+
+      template <class T>
+         void CAttributeTemplate<T>::fromString(const StdString & str)
+      {
+         ERROR("CAttributeTemplate<T>::fromString(const StdString & str)",
+               << "[ str = " << str << " ] Not implemented yet !");
+      }
+
+      //---------------------------------------------------------------
+
+      template <class T>
+         void CAttributeTemplate<T>::toBinary (StdOStream & os) const
+      {
+         this->getValue()->toBinary(os);
+      }
+
+      template <class T>
+         void CAttributeTemplate<T>::fromBinary(StdIStream & is)
+      {
+         T value;
+         FromBinary(is, value);
+         this->setValue(value);
+      }
+
+      //---------------------------------------------------------------
+
+      /** SpÃ©cialisations des templates pour la fonction [toString] **/
+
+      template <>
+         StdString CAttributeTemplate<bool>::toString(void) const;
+
+      //---------------------------------------------------------------
+
+      /** SpÃ©cialisations des templates pour la fonction [fromString] **/
+
+      template <> // ChaÃ®ne de caractÃšres.
+         void CAttributeTemplate<StdString>::fromString(const StdString & str);
+
+      template <> // Entier
+         void CAttributeTemplate<int>::fromString(const StdString & str);
+
+      template <> // BoolÃ©en
+         void CAttributeTemplate<bool>::fromString(const StdString & str);
+
+      template <> // Double
+         void CAttributeTemplate<double>::fromString(const StdString & str);
+
+      template<> // Tableau
+         void CAttributeTemplate<ARRAY(double, 1)>::fromString(const StdString & str);
+
+      //---------------------------------------------------------------
+
+      /** SpÃ©cialisations des templates pour la fonction [toBinary] **/
+
+      template <> // ChaÃ®ne de caractÃšres.
+         void CAttributeTemplate<StdString>::toBinary (StdOStream & os) const;
+
+      template <> // Entier
+         void CAttributeTemplate<int>::toBinary(StdOStream & os) const;
+
+      template <> // BoolÃ©en
+         void CAttributeTemplate<bool>::toBinary(StdOStream & os) const;
+         
+      template <> // Double
+         void CAttributeTemplate<double>::toBinary(StdOStream & os) const;
+
+      //---------------------------------------------------------------
+
+      /** SpÃ©cialisations des templates pour la fonction [fromBinary] **/
+
+      template <> // ChaÃ®ne de caractÃšres.
+         void CAttributeTemplate<StdString>::fromBinary(StdIStream & is);
+
+      template <> // Entier
+         void CAttributeTemplate<int>::fromBinary(StdIStream & is);
+
+      template <> // BoolÃ©en
+         void CAttributeTemplate<bool>::fromBinary(StdIStream & is);
+         
+      template <> // Double
+         void CAttributeTemplate<double>::fromBinary(StdIStream & is);
+
+      ///--------------------------------------------------------------
+   } // namespace tree
+} // namespace xmlioserver
+
+#endif // __XMLIO_CAttributeTemplate_impl__
Index: /XMLIO_V2/dev/common/src/xmlio/buffer.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/buffer.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/buffer.cpp	(revision 219)
@@ -0,0 +1,266 @@
+#include "buffer.hpp"
+
+#include "mpi_manager.hpp"
+#include "buffer_impl.hpp"
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CBuffer::CBuffer(StdSize size)
+         : size(size), delIdata(true)
+      {
+         this->idata = new char[size]();
+         //CMPIManager::AllocMem(&idata, size);
+      }
+
+      CBuffer::CBuffer(char * data, StdSize size)
+         : size(size), delIdata(false)
+      {
+         this->idata = data;
+      }
+      
+      CBuffer::CBuffer(const CBuffer & buffer)
+         : size(buffer.size), delIdata(true)
+      {
+         this->idata = new char[size]();
+         std::copy (buffer.idata, buffer.idata+size, this->idata);
+      }
+      
+      CBuffer::CBuffer(const CBuffer * const buffer)
+         : size(buffer->size), delIdata(true)
+      {
+         this->idata = new char[size]();
+         std::copy (buffer->idata, buffer->idata+size, this->idata);       
+      }
+
+      CBuffer::~CBuffer(void)
+      {
+         if (delIdata) delete [] this->idata;
+         else this->fillData('\0', this->getSize(), 0);
+         //CMPIManager::FreeMem(idata);
+      }
+
+      ///--------------------------------------------------------------
+
+      CBuffer::operator char * (void)
+      { return (this->getData()); }
+
+      char * CBuffer::operator[](StdSize position)
+      { return (this->getData(position)); }
+
+      //---------------------------------------------------------------
+
+      StdSize CBuffer::getSize(StdSize position) const
+      {
+         if (position > this->size)
+            ERROR("CBuffer::getSize(position)",
+                  << " Buffer size <  size + position !");
+         return (this->size - position);
+      }
+
+      char * CBuffer::getData(StdSize position) const
+      {
+         if (position > this->size)
+            ERROR("CBuffer::getData(position)",
+                   << " Buffer size < position !");
+         return &(this->idata[position]);
+      }
+
+      //---------------------------------------------------------------
+
+      void CBuffer::getData(char * data, StdSize size, StdSize position) const
+      {
+         if (this->size < (size + position))
+            ERROR("CBuffer::getData(data, size, position)",
+                   << " Buffer size <  size + position !");
+         std::copy(this->getData(position), this->getData(position + size), data);
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CBuffer::setData(const char * data, StdSize size, StdSize position)
+      {
+         if (this->size < (size + position))
+            ERROR("CBuffer::getData(data, size, position)",
+                   << " Buffer size <  size + position !");
+         std::copy(&(data[0]), &(data[size]), this->getData(position));
+      }
+
+      //---------------------------------------------------------------
+
+#define BufferDataTypeGetter(type, type_enum)\
+   template <> CBuffer::CBufferDataType \
+      CBuffer::getBufferDataType<type>(void) const { return (type_enum); }; \
+   template <> CBuffer::CBufferDataType \
+      CBuffer::getBufferDataType<ARRAY(type, 1)>(void) const { return (type_enum); };
+
+      BufferDataTypeGetter(bool, TBOOL8);
+      BufferDataTypeGetter(char, TCHAR8);
+      BufferDataTypeGetter(float, TFLOAT32);
+      BufferDataTypeGetter(double, TDOUBLE64);
+      BufferDataTypeGetter(long int, TINT32);
+
+#undef BufferDataTypeGetter
+
+
+      //---------------------------------------------------------------
+
+      void CBuffer::getBufferData(CBufferData & bufdata, StdSize position) const
+      {
+         StdSize currposition = position;
+         this->getData( reinterpret_cast<char*>(&(bufdata.type))
+                      , sizeof(CBufferDataType), currposition);
+         this->getData( reinterpret_cast<char*>(&(bufdata.isArray))
+                      , sizeof(bool), currposition += sizeof(CBufferDataType));
+         this->getData( reinterpret_cast<char*>(&(bufdata.size))
+                      , sizeof(StdSize), currposition += sizeof(bool));
+         this->getData( reinterpret_cast<char*>(&(bufdata.position))
+                      , sizeof(StdSize), currposition += sizeof(StdSize));
+      }
+
+      void CBuffer::setBufferData(const CBufferData & bufdata, StdSize position)
+      {
+         StdSize currposition = position;
+         this->setData( reinterpret_cast<const char*>(&(bufdata.type))
+                      , sizeof(CBufferDataType), currposition);
+         this->setData( reinterpret_cast<const char*>(&(bufdata.isArray))
+                      , sizeof(bool), currposition += sizeof(CBufferDataType));
+         this->setData( reinterpret_cast<const char*>(&(bufdata.size))
+                      , sizeof(StdSize), currposition += sizeof(bool));
+         this->setData( reinterpret_cast<const char*>(&(bufdata.position))
+                      , sizeof(StdSize), currposition += sizeof(StdSize));
+      }
+
+      //---------------------------------------------------------------
+
+#define CBufferGetter(type, Type)       \
+   type CBuffer::get##Type(StdSize position) const \
+   { type retvalue; this->getData<type>(retvalue, position); return (retvalue); }
+
+
+      CBufferGetter(char     , Char)
+      CBufferGetter(bool     , Bool)
+      CBufferGetter(float    , Float)
+      CBufferGetter(double   , Double)
+      CBufferGetter(long int , Int)
+
+#undef CBufferGetter
+
+      //---------------------------------------------------------------
+
+#define CBufferArrayGetter(type, Type) \
+   ARRAY(type, 1) CBuffer::get##Type##Array(StdSize position) const \
+   {  ARRAY_CREATE(retvalue, type, 1, [1]);                         \
+      this->getDataArray<type>(retvalue, position);                 \
+      return (retvalue); }
+
+      CBufferArrayGetter(char     , Char)
+      CBufferArrayGetter(bool     , Bool)
+      CBufferArrayGetter(float    , Float)
+      CBufferArrayGetter(double   , Double)
+      CBufferArrayGetter(long int , Int)
+
+#undef CBufferArrayGetter
+
+      StdString CBuffer::getString(StdSize position) const
+      {
+         ARRAY(char, 1) array = this->getCharArray(position);
+         return (StdString(array->data(), array->num_elements()));
+      }
+
+      //---------------------------------------------------------------
+
+#define CBufferSetter(type, Type) \
+      void  CBuffer::set##Type(type value, StdSize position) \
+      { this->setData(value, position); }
+
+      CBufferSetter(char     , Char)
+      CBufferSetter(bool     , Bool)
+      CBufferSetter(float    , Float)
+      CBufferSetter(double   , Double)
+      CBufferSetter(long int , Int)
+
+#undef CBufferSetter
+
+      //---------------------------------------------------------------
+
+#define CBufferArraySetter(type, Type) \
+      void  CBuffer::set##Type##Array(ARRAY(type, 1) value, StdSize position) \
+      { this->setDataArray(value, position); }
+
+      CBufferArraySetter(char     , Char)
+      CBufferArraySetter(bool     , Bool)
+      CBufferArraySetter(float    , Float)
+      CBufferArraySetter(double   , Double)
+      CBufferArraySetter(long int , Int)
+
+#undef CBufferArraySetter
+
+      void CBuffer::setString(const StdString & value, StdSize position)
+      {
+         ARRAY_CREATE(arr, char, 1, [value.size()]);
+         std::copy(value.data(), &(value.data()[value.size()]), arr->data());
+         this->setCharArray(arr, position);
+      }
+
+      //---------------------------------------------------------------
+
+      void CBuffer::printToBinaryFile (const StdString & filename)
+      {
+         StdOFStream ofs(filename.c_str());
+         this->printToBinaryStream(ofs);
+         ofs.close();
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CBuffer::printToBinaryStream (StdOStream & ostr)
+      {  
+         ostr.write (this->getData(), this->getSize()); 
+      }
+      
+      //---------------------------------------------------------------
+      
+      StdSize CBuffer::getNextDataPosition(StdSize position)
+      {
+         CBufferData  bufdata;
+         this->updateBufferData(position);
+         this->getBufferData(bufdata, position);
+         return (bufdata.size + bufdata.position);
+      }
+
+      //---------------------------------------------------------------
+
+      template <>
+         StdSize CBuffer::getRequestedSize(StdString data) const
+      { 
+         return (DATA_HEADER_SIZE + data.size() * sizeof (char)); 
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CBuffer::updateBufferData(StdSize position)
+      {
+         CBufferData bufdata;
+         this->getBufferData(bufdata, position);
+         bufdata.position = position + DATA_HEADER_SIZE;
+         this->setBufferData(bufdata, position);
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CBuffer::fillData(char data, StdSize size, StdSize position)
+      {
+         if (this->size < (size + position))
+            ERROR("CBuffer::getData(data, size, position)",
+                   << " Buffer size <  size + position !");
+         std::fill_n(this->getData(position), size, data);
+      }
+      
+      ///--------------------------------------------------------------
+
+   } // namespace tree
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/buffer.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/buffer.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/buffer.hpp	(revision 219)
@@ -0,0 +1,142 @@
+#ifndef __XMLIO_CBuffer__
+#define __XMLIO_CBuffer__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+#include "array.hpp"
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CBuffer
+      {
+         public :
+
+         //--------------------------------------------------------------
+
+            typedef enum buffer_data_type
+            { TBOOL8 = 0, TINT32, TCHAR8, TFLOAT32, TDOUBLE64
+            } CBufferDataType;
+
+            typedef struct  buffer_data
+            { CBufferDataType type; bool isArray; StdSize size; StdSize position;
+            } CBufferData;
+
+         //--------------------------------------------------------------
+
+            /// Operateurs ///
+            operator char * (void);
+            char * operator[](StdSize position);
+
+            /// Accesseurs ///
+            StdSize getSize(StdSize position = 0) const;
+            char * getData(StdSize position = 0) const;
+
+            template <class T>
+               inline StdSize getRequestedSize(T data) const;
+            template <class T>
+               inline StdSize getRequestedSize(ARRAY(T, 1) data) const;
+
+            StdSize getNextDataPosition(StdSize position);
+
+         //--------------------------------------------------------------
+
+            char     getChar  (StdSize position) const;
+            bool     getBool  (StdSize position) const;
+            float    getFloat (StdSize position) const;
+            double   getDouble(StdSize position) const;
+            long int getInt   (StdSize position) const;
+
+            StdString getString(StdSize position) const;
+
+            ARRAY(char,     1) getCharArray  (StdSize position) const;
+            ARRAY(bool,     1) getBoolArray  (StdSize position) const;
+            ARRAY(float,    1) getFloatArray (StdSize position) const;
+            ARRAY(double,   1) getDoubleArray(StdSize position) const;
+            ARRAY(long int, 1) getIntArray   (StdSize position) const;
+
+         //--------------------------------------------------------------
+
+            /// Mutateurs ///
+            void setChar  (char     value, StdSize position) ;
+            void setBool  (bool     value, StdSize position) ;
+            void setFloat (float    value, StdSize position) ;
+            void setDouble(double   value, StdSize position) ;
+            void setInt   (long int value, StdSize position) ;
+
+            void setString(const StdString & value, StdSize position) ;
+
+            void setCharArray  (ARRAY(char,     1) value, StdSize position) ;
+            void setBoolArray  (ARRAY(bool,     1) value, StdSize position) ;
+            void setFloatArray (ARRAY(float,    1) value, StdSize position) ;
+            void setDoubleArray(ARRAY(double,   1) value, StdSize position) ;
+            void setIntArray   (ARRAY(long int, 1) value, StdSize position) ;
+
+         //--------------------------------------------------------------
+
+            virtual void clear(void) = 0;
+            void updateBufferData(StdSize position);
+
+            /// Sortie fichier binaire ///
+            void printToBinaryFile (const StdString & filename);
+            void printToBinaryStream (StdOStream & ostr);
+
+            /// Sortie fichier ascii ///
+            virtual void printToTextFile (const StdString & filename) = 0;
+            virtual void printToTextStream (StdOStream & ostr) = 0;
+
+            /// Destructeur ///
+            virtual ~CBuffer(void);
+
+         protected :
+
+            /// Construteurs ///
+            CBuffer(char * data, StdSize size);
+            explicit CBuffer(StdSize size);
+            CBuffer(const CBuffer & buffer);
+            CBuffer(const CBuffer * const buffer);
+
+            /// Accesseurs protÃ©gÃ©s ///
+            void getBufferData(CBufferData & bufdata, StdSize position) const;
+
+            template <class T>
+               inline void getData(T & data, StdSize position) const;
+            template <class T>
+               inline void getDataArray(ARRAY(T, 1) data, StdSize position) const;
+
+            /// Mutateurs protÃ©gÃ©s ///
+            template <class T>
+               inline void setData(const T & data, StdSize position);
+            template <class T>
+               inline void setDataArray(const ARRAY(T, 1) data, StdSize position);
+
+            void setData(const char * data, StdSize size, StdSize position);
+            void fillData(char data, StdSize size, StdSize position);
+
+         private :
+
+         //--------------------------------------------------------------
+
+            /// Accesseurs privÃ©s ///
+            void getData(char * data, StdSize size, StdSize position) const;
+            template <class T>
+               CBufferDataType getBufferDataType(void) const;
+
+            /// Mutateurs privÃ©s ///
+            void setBufferData(const CBufferData & bufdata, StdSize position);
+            
+         //--------------------------------------------------------------
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            StdSize size;
+            char * idata;
+            bool delIdata;
+
+      }; // class CBuffer
+   } // namespace comm
+} // namespace xmlioserver
+
+#endif // __XMLIO_CBuffer__
Index: /XMLIO_V2/dev/common/src/xmlio/buffer_impl.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/buffer_impl.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/buffer_impl.hpp	(revision 219)
@@ -0,0 +1,100 @@
+#ifndef __XMLIO_CBuffer_impl__
+#define __XMLIO_CBuffer_impl__
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////// DÃ©finitions (inline) /////////////////// ///
+
+#define DATA_HEADER_SIZE  sizeof(CBufferDataType) + 2 * sizeof(StdSize) + sizeof(bool)
+
+      template <class T>
+         StdSize CBuffer::getRequestedSize(T data) const
+      { return (DATA_HEADER_SIZE + sizeof (T)); }
+
+      template <class T>
+         StdSize CBuffer::getRequestedSize(ARRAY(T, 1) data) const
+      { return (DATA_HEADER_SIZE + data->num_elements() * sizeof (T)); }
+
+      template <>
+         StdSize CBuffer::getRequestedSize(StdString data) const;
+
+      //---------------------------------------------------------------
+
+      template <class T>
+         void CBuffer::getData(T & data, StdSize position) const
+      {
+         if (this->size < (position + this->getRequestedSize(data)))
+            ERROR("CBuffer::getData(data, position)",
+                   << " Buffer size <  size + position !");
+         CBufferData bufdata;
+         this->getBufferData(bufdata, position);
+         if (bufdata.type != this->getBufferDataType<T>())
+            ERROR("CBuffer::getData(data, position)", 
+                  << "[ BufferDataType Read : " << bufdata.type                 << ", "
+                  << ", BufferDataType T : "    << this->getBufferDataType<T>() << "] "
+                  << " invalid type !");
+         if (bufdata.isArray != false)
+            ERROR("CBuffer::getData(data, position)",
+                   << " type should be an array !");
+
+         this->getData(reinterpret_cast<char*>(&data), bufdata.size , bufdata.position);
+      }
+
+      template <class T>
+         void CBuffer::getDataArray(ARRAY(T, 1) data, StdSize position) const
+      {
+         CBufferData bufdata;
+         this->getBufferData(bufdata, position);
+         if (bufdata.type != this->getBufferDataType<T>())
+            ERROR("CBuffer::getDataArray(data, position)", << " invalid type !");
+         if (bufdata.isArray != true)
+            ERROR("CBuffer::getDataArray(data, position)",
+                  << " type should not be an array !");
+         if (this->size < (position + (DATA_HEADER_SIZE + bufdata.size)))
+            ERROR("CBuffer::getData<T>(data, size, position)",
+                   << " Buffer size <  size + position !");
+         data->resize(boost::extents[bufdata.size/sizeof(T)]);
+         this->getData(reinterpret_cast<char*>(data->data()), bufdata.size , bufdata.position);
+      }
+
+      //---------------------------------------------------------------
+
+      template <class T>
+         void CBuffer::setData(const T & data, StdSize position)
+      {
+         if (this->size < (position + this->getRequestedSize(data)))
+            ERROR("CBuffer::setData<T>(data, size, position)",
+                   << " Buffer size <  size + position !");
+         CBufferData bufdata;
+         bufdata.type     = this->getBufferDataType<T>();
+         bufdata.isArray  = false;
+         bufdata.size     = sizeof(T);
+         bufdata.position = position + DATA_HEADER_SIZE;
+         this->setBufferData(bufdata, position);
+         this->setData(reinterpret_cast<const char*>(&data), bufdata.size , bufdata.position);
+      }
+
+      template <class T>
+         void CBuffer::setDataArray(const ARRAY(T, 1) data, StdSize position)
+      {
+         if (this->size < (position + this->getRequestedSize(data)))
+            ERROR("CBuffer::setDataArray<T>(data, size, position)",
+                   << " Buffer size <  size + position !");
+         CBufferData bufdata;
+         bufdata.type     = this->getBufferDataType<T>();
+         bufdata.isArray  = true;
+         bufdata.size     = data->num_elements() * sizeof (T);
+         bufdata.position = position + DATA_HEADER_SIZE;
+
+         this->setBufferData(bufdata, position);
+         this->setData(reinterpret_cast<const char*>(data->data()),
+                       bufdata.size , bufdata.position);
+      }
+      ///----------------------------------------------------------------
+
+   } // namespace comm
+} // namespace xmlioserver
+
+#endif // __XMLIO_CBuffer_impl__
Index: /XMLIO_V2/dev/common/src/xmlio/buffer_list.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/buffer_list.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/buffer_list.cpp	(revision 219)
@@ -0,0 +1,83 @@
+#include "buffer_list.hpp"
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CBufferList::CBufferList(MPIComm com_client_server)
+         : SuperClass(CMPIManager::GetCommSize(com_client_server) - 1)
+         , com_client_server(com_client_server)
+         , nbbuffer(CMPIManager::GetCommSize(com_client_server) - 1)
+      { /* Ne rien faire de plus */ }
+
+      CBufferList::~CBufferList(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      bool CBufferList::hasRequests(void) const
+      {
+         bool retvalue = SuperClass::operator[](0).hasRequest();
+         for (StdSize i = 1; i < this->nbbuffer; i++)
+            retvalue = retvalue && SuperClass::operator[](i).hasRequest();
+         return (retvalue);
+      }
+
+      bool CBufferList::recvRequests(void)
+      {
+         while (!this->hasRequests())
+         {
+            for (int i = 1; i < CMPIManager::GetCommSize(com_client_server); i++)
+            {
+               if (CMPIManager::HasReceivedData(com_client_server, i))
+               {
+                  StdSize size = CMPIManager::GetReceivedDataSize(com_client_server, i);
+                  if (SuperClass::operator[](i-1).isAvailable(size))
+                  {
+                     //std::cout << "DonnÃ©es reÃ§ues de " << i << std::endl;
+                     CMPIManager::ReceiveCircularBuffer
+                        (com_client_server, i, SuperClass::operator[](i-1));
+                  }
+                  else
+                  {
+                     DEBUG ("Impossible d'Ã©crire dans le tampon " << i 
+                             << " (Taille requise : " << size << " octets,"
+                             << " Taille du buffer circulaire : "
+                             << SuperClass::operator[](i-1).getSize() << " octets)");
+                  }
+               }
+            }
+         }
+         
+         //static int u = 0;
+         //std::cout << "Nouvelle requÃªte disponible " << u++ << std::endl;
+         /*if (u == 3046)
+            for (int i = 1; i < CMPIManager::GetCommSize(com_client_server); i++)
+            {
+               StdOStringStream oss; oss << "data/buffer"<<i<<".txt";
+               SuperClass::operator[](i-1).printToTextFile (oss.str());
+            }*/
+            
+         return (true);
+      }
+
+      void CBufferList::getRequests(std::vector<CLinearBuffer> & lbuffer)
+      {
+         for (StdSize i = 0; i < this->nbbuffer; i++)
+         {
+            //std::cout << "RÃ©cupÃ©ration de la requÃªte " << (i+1) << std::endl;
+            lbuffer.push_back(SuperClass::operator[](i).getNextRequest());
+         }
+      }
+
+      StdSize CBufferList::getNumberOfBuffers(void) const
+      { 
+         return (this->nbbuffer) ;
+      }
+
+      ///--------------------------------------------------------------
+
+   } // namespace tree
+} // namespace xmlioserver
+
Index: /XMLIO_V2/dev/common/src/xmlio/buffer_list.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/buffer_list.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/buffer_list.hpp	(revision 219)
@@ -0,0 +1,54 @@
+#ifndef __XMLIO_CBufferList__
+#define __XMLIO_CBufferList__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "buffer.hpp"
+#include "circular_buffer.hpp"
+#include "linear_buffer.hpp"
+#include "mpi_manager.hpp"
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CBufferList
+         : public std::vector<CCircularBuffer>   // << pas une liste
+      {
+
+            /// DÃ©finition de type ///
+            typedef std::vector<CCircularBuffer> SuperClass;
+            typedef CCircularBuffer BufferType;
+
+         public :
+
+            /// Construteurs ///
+            CBufferList(MPIComm com_client_server = CMPIManager::GetCommWorld());
+            CBufferList(const CBufferList & buffer_list);         // Not implemented yet.
+            CBufferList(const CBufferList * const buffer_list);   // Not implemented yet.
+
+            /// Test ///
+            bool hasRequests(void) const;
+
+            /// Traitement ///
+            bool recvRequests(void);
+
+            /// Accesseurs ///
+            StdSize getNumberOfBuffers(void) const;
+            void getRequests(std::vector<CLinearBuffer> & lbuffer);
+
+            /// Destructeur ///
+            virtual ~CBufferList(void);
+
+
+         private :
+
+            MPIComm com_client_server;
+            StdSize nbbuffer;
+
+      }; // class CBufferList
+   } // namespace comm
+} // namespace xmlioserver
+
+#endif // __XMLIO_CBufferList__
Index: /XMLIO_V2/dev/common/src/xmlio/buffer_pair.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/buffer_pair.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/buffer_pair.cpp	(revision 219)
@@ -0,0 +1,87 @@
+#include "buffer_pair.hpp"
+
+#include "impi_interface.hpp"
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CBufferPair::CBufferPair(MPIComm com_client_server)
+         : com_client_server(com_client_server) 
+         , first(BUFFER_CLIENT_SIZE), second(BUFFER_CLIENT_SIZE)
+         , first_request(mpi_request_null), second_request(mpi_request_null)
+         , currentBuffer(0)
+      { /* Ne rien faire de plus */ }
+
+      CBufferPair::~CBufferPair(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      bool CBufferPair::mustBeSent(void)
+      {
+         if ((currentBuffer  ==  0) && (first.getUsedSize()  != 0) &&
+            ((second_request == mpi_request_null) || CMPIManager::Test (second_request)))
+             return (true);
+             
+         if ((currentBuffer  ==  1) && (second.getUsedSize() != 0) &&
+            ((first_request  == mpi_request_null) || CMPIManager::Test (first_request)))
+            return (true);
+            
+         return (false);
+      }
+      
+      //---------------------------------------------------------------
+      
+      int CBufferPair::wait(void)
+      {
+         if (this->currentBuffer == 0)
+         {
+            CMPIManager::Wait(this->second_request);
+            this->second_request = mpi_request_null;
+            return (this->second_request);
+         }
+         else
+         {
+            CMPIManager::Wait(this->first_request);
+            this->first_request = mpi_request_null;
+            return (this->first_request);
+         }
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CBufferPair::sendCurrentBuffer(void)
+      {
+         if (this->currentBuffer == 0)
+         {
+            CMPIManager::SendLinearBuffer
+               (this->com_client_server, 0, this->first, this->first_request);
+            this->currentBuffer  =  1;
+            this->second_request = mpi_request_null;
+            this->second.clear();
+         }
+         else  if(this->currentBuffer == 1)
+         {
+            CMPIManager::SendLinearBuffer
+               (this->com_client_server, 0, this->second, this->second_request);
+            this->currentBuffer =  0;
+            this->first_request = mpi_request_null;
+            this->first.clear();
+         }
+      }
+      
+      //---------------------------------------------------------------
+      
+      CLinearBuffer & CBufferPair::getCurrentBuffer(void)
+      {
+         if (currentBuffer == 0) return (this->first);
+         return (this->second);
+      }
+      
+      ///--------------------------------------------------------------
+
+   } // namespace tree
+} // namespace xmlioserver
+
Index: /XMLIO_V2/dev/common/src/xmlio/buffer_pair.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/buffer_pair.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/buffer_pair.hpp	(revision 219)
@@ -0,0 +1,103 @@
+#ifndef __XMLIO_CBufferPair__
+#define __XMLIO_CBufferPair__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "buffer.hpp"
+#include "circular_buffer.hpp"
+#include "linear_buffer.hpp"
+#include "mpi_manager.hpp"
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CBufferPair
+      {
+
+            /// DÃ©finition de type ///
+            typedef CLinearBuffer BufferType;
+
+         public :
+
+            /// Construteurs ///
+            CBufferPair(MPIComm com_client_server = CMPIManager::GetCommWorld());
+            CBufferPair(const CBufferPair & buffer_pair);       // Not implemented yet.
+            CBufferPair(const CBufferPair * const buffer_pair); // Not implemented yet.
+
+            template <typename A1, typename A2, typename A3, typename A4>
+               void prepareRequest(const long int & managerId,
+                                   const long int & methodId,
+                                   A1 * arg1 = CLinearBuffer::NULL_ARG,
+                                   A2 * arg2 = CLinearBuffer::NULL_ARG,
+                                   A3 * arg3 = CLinearBuffer::NULL_ARG,
+                                   A4 * arg4 = CLinearBuffer::NULL_ARG);
+            /// Accesseur ///    
+            CLinearBuffer & getCurrentBuffer(void);
+            
+            /// Traitements divers ///
+            int wait(void);
+            void sendCurrentBuffer(void); 
+                        
+            /// Destructeur ///
+            virtual ~CBufferPair(void);
+            
+         protected :
+            
+            /// Test ///
+            bool mustBeSent(void);           
+
+         private :
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            MPIComm com_client_server;
+            CLinearBuffer first, second;
+            MPIRequest first_request, second_request;
+            int currentBuffer;
+
+      }; // class CBufferPair
+      
+      ///--------------------------------------------------------------
+      
+      template <typename A1, typename A2, typename A3, typename A4>
+         void CBufferPair::prepareRequest(const long int & managerId,
+                                          const long int & methodId,
+                                          A1 * arg1, A2 * arg2, A3 * arg3, A4 * arg4)
+      {       
+         if (this->mustBeSent()) 
+            this->sendCurrentBuffer();
+           
+         CLinearBuffer & cbuffer = this->getCurrentBuffer();
+         StdSize usize = cbuffer.getUnusedSize();         
+         StdSize rsize = cbuffer.getRequestedSize(arg1, arg2, arg3, arg4) ;
+         StdSize msize = cbuffer.getSize();
+         
+         long int nbargs = 0;
+         
+         if (arg1 != NULL) nbargs++;
+         if (arg2 != NULL) nbargs++;
+         if (arg3 != NULL) nbargs++;
+         if (arg4 != NULL) nbargs++;
+         
+         if (rsize > msize)
+            ERROR("CBufferPair::sendRequest(...)", << "Le tampon client est trop petit !");
+                  
+         if (rsize <= usize)
+         {
+            cbuffer.appendRequestInfos(managerId, methodId, nbargs);
+         }
+         else
+         {
+            this->wait();
+            this->prepareRequest(managerId, methodId, arg1, arg2, arg3, arg4);
+         }
+      }
+      
+      ///--------------------------------------------------------------
+      
+      
+   } // namespace comm
+} // namespace xmlioserver
+
+#endif // __XMLIO_CBufferPair__
Index: /XMLIO_V2/dev/common/src/xmlio/calendar.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/calendar.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/calendar.cpp	(revision 219)
@@ -0,0 +1,105 @@
+#include "calendar.hpp"
+#include "duration.hpp"
+#include "date.hpp"
+#include "calendar_util.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CCalendar::CCalendar(void)
+         : CObject()
+         , initDate(*this)
+         , currentDate(initDate)
+      { /* Ne rien faire de plus */ }
+
+      CCalendar::CCalendar(const StdString & id,
+                           int yr, int mth, int d  ,
+                           int hr, int min, int sec)
+               : CObject(id)
+               , initDate(*this, yr, mth, d, hr, min, sec)
+               , currentDate(initDate)
+      { /* Ne rien faire de plus */ }
+
+      CCalendar::CCalendar(const StdString & id, const StdString & dateStr)
+               : CObject(id)
+               , initDate(CDate::FromString(dateStr, *this))
+               , currentDate(initDate)
+      { /* Ne rien faire de plus */ }
+
+      CCalendar::~CCalendar(void)
+      { /* Ne rien faire de plus */ }
+
+      ///---------------------------------------------------------------
+
+      StdString CCalendar::toString(void) const
+      {
+         StdOStringStream oss;
+         oss <<   "[type: "   << this->getId()
+             << ", start: "   << this->initDate
+             << ", current: " << this->currentDate << "]";
+         return (oss.str());
+      }
+
+      void CCalendar::fromString(const StdString & str)
+      { ERROR("CCalendar::fromString(str)",
+               << "[ str = " << str << "] Not implemented yet !"); }
+
+      //-----------------------------------------------------------------
+
+      void CCalendar::setTimeStep(const CDuration & duration)
+      { this->timestep = duration; }
+
+      CDate & CCalendar::update(int step)
+      { return (this->getCurrentDate() = this->getCurrentDate() + step * this->timestep); }
+
+      //-----------------------------------------------------------------
+
+      const CDuration & CCalendar::getTimeStep(void) const { return (this->timestep); }
+      const CDate & CCalendar::getInitDate(void) const     { return (this->initDate); }
+      CDate & CCalendar::getCurrentDate(void)              { return (this->currentDate); }
+
+      //-----------------------------------------------------------------
+
+      int CCalendar::getMonthLength(const CDate & date) const
+      { // Retourne la durÃ©e du mois en jour.
+         static const int NoLeapMonthLength[] =
+            {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+         return (NoLeapMonthLength[date.getMonth()-1]);
+      }
+
+      StdString CCalendar::getType(void) const { return (StdString(this->getId())); }
+
+      int CCalendar::getYearTotalLength(const CDate & date) const { return (365 * 86400); }
+
+      int CCalendar::getYearLength  (void) const { return (12); }
+      int CCalendar::getDayLength   (void) const { return (24); }
+      int CCalendar::getHourLength  (void) const { return (60); }
+      int CCalendar::getMinuteLength(void) const { return (60); }
+
+      int CCalendar::getNbSecond(const CDate & date) const
+      { // Retourne le nombre de secondes Ã©coulÃ©es depuis le dÃ©but de l'annÃ©e.
+         CDate _d0(date); int  nbday = 0;
+
+         for(_d0.setMonth(1); _d0.getMonth() < date.getMonth(); _d0.setMonth(_d0.getMonth()+1))
+            nbday += getMonthLength(_d0);
+         return ((((nbday + date.getDay()) * getDayLength() + date.getHour()) * getHourLength()
+                     + date.getMinute()) * getMinuteLength() + date.getSecond());
+      }
+
+      StdString CCalendar::getMonthName(int month_id) const
+      {
+         static const StdString Monthname_str[] =
+            { "january", "february", "march"    , "april"  , "may"     , "june"    ,
+              "july"   , "august"  , "september", "october", "november", "december" };
+         return(Monthname_str[month_id-1]);
+      }
+
+      const StdString CCalendar::getMonthShortName(int month_id) const
+      { StdString value = this->getMonthName(month_id); value.resize(3); return (value); }
+
+      ///----------------------------------------------------------------
+
+   } // namespace date
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/calendar.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/calendar.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/calendar.hpp	(revision 219)
@@ -0,0 +1,96 @@
+#ifndef __XMLIO_CCalendar__
+#define __XMLIO_CCalendar__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+#include "date.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+      typedef enum _monthEnum
+      {  JAN = 1, FEB = 2, MAR = 3, APR = 4 , MAY = 5 , JUN = 6 ,
+         JUL = 7, AUG = 8, SEP = 9, OCT = 10, NOV = 11, DEC = 12  } MonthEnum;
+
+      ///---------------------------------------------------------------
+
+      class CDate;
+
+      class CCalendar : public CObject
+      {
+            /// Typedef ///
+            typedef CObject SuperClass;
+
+         public :
+
+            /// Destructeur ///
+            virtual ~CCalendar(void);
+
+         protected :
+
+            /// Constructeurs ///
+            CCalendar(void);
+            CCalendar(const StdString & id,
+                      int yr = 0, int mth = 1, int d   = 1,
+                      int hr = 0, int min = 0, int sec = 0);
+            CCalendar(const StdString & id, const StdString & dateStr);
+            CCalendar(const CCalendar & calendar);       // Not implemented yet.
+            CCalendar(const CCalendar * const calendar); // Not implemented yet.
+
+         public :
+
+            //------------------------------------------------------------
+
+            /// Autres ///
+            virtual StdString toString(void) const;
+            virtual void fromString(const StdString & str);
+
+            /// Mutateur ///
+            void setTimeStep(const CDuration & duration);
+
+            /// Traitemants ///
+            CDate & update(int step);
+
+            /// Accesseurs ///
+            const CDuration & getTimeStep(void) const;
+            const CDate & getInitDate(void) const;
+            CDate & getCurrentDate(void);
+            
+         public :
+         
+            //------------------------------------------------------------
+            virtual int getMonthLength(const CDate & date) const;
+
+            virtual StdString getType(void) const;
+
+            virtual int getYearTotalLength(const CDate & date) const ; // Retourne la durÃ©e d'une annÃ©e en seconde.
+
+            virtual int getYearLength  (void) const; // Retourne la durÃ©e d'une annÃ©e en mois.
+            virtual int getDayLength   (void) const; // Retourne la durÃ©e d'un jour en heures.
+            virtual int getHourLength  (void) const; // Retourne la durÃ©e d'une heure en minute.
+            virtual int getMinuteLength(void) const; // Retourne la durÃ©e d'une minute en secondes.
+
+            virtual int getNbSecond(const CDate & date) const;
+            virtual StdString getMonthName(int month_id) const;
+
+            virtual const StdString getMonthShortName(int month_id) const;
+
+            //------------------------------------------------------------
+
+         private :
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            const CDate initDate;
+            CDate currentDate;
+            CDuration timestep;
+
+      }; // class CCalendar
+   } // namespace date
+
+} // namespace xmlioserver
+
+#endif // __XMLIO_CCalendar__
Index: /XMLIO_V2/dev/common/src/xmlio/calendar_util.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/calendar_util.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/calendar_util.cpp	(revision 219)
@@ -0,0 +1,142 @@
+#include "calendar_util.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CDuration operator*(const double & scal, const CDuration & ddr)
+      { return (ddr * scal); }
+
+      CDuration operator-(const CDuration & ddr , const CDuration & dr)
+      {
+         CDuration dur(ddr);
+         dur.year -= dr.year;  dur.month  -= dr.month ; dur.day    -= dr.day;
+         dur.hour -= dr.hour;  dur.minute -= dr.minute; dur.second -= dr.second;
+         return (dur);
+      }
+
+      CDuration operator+(const CDuration & ddr , const CDuration & dr)
+      {
+         CDuration dur(ddr);
+         dur.year += dr.year;  dur.month  += dr.month ; dur.day    += dr.day;
+         dur.hour += dr.hour;  dur.minute += dr.minute; dur.second += dr.second;
+         return (dur);
+      }
+
+      CDuration operator*(const CDuration & ddr , const double & scal)
+      {
+         CDuration dur(ddr);
+         dur.year *= scal;  dur.month  *= scal; dur.day    *= scal;
+         dur.hour *= scal;  dur.minute *= scal; dur.second *= scal;
+         return (dur);
+      }
+
+      CDuration operator-(const CDuration & ddr)
+      {
+         CDuration dur(ddr);
+         dur.year = -dur.year;  dur.month  = -dur.month ; dur.day    = -dur.day;
+         dur.hour = -dur.hour;  dur.minute = -dur.minute; dur.second = -dur.second;
+         return (dur);
+      }
+
+      //-----------------------------------------------------------------
+
+      CDate operator+(const CDate & dt, const CDuration & dr)
+      {
+         CDuration drr (dr);
+         int year = 0, month = 0, day = 0, hour = 0, minute = 0, second = 0;
+         const CCalendar & c = dt.getRelCalendar();
+
+         drr.resolve(dt.getRelCalendar());
+
+         // Ajustement des minutes par rapport aux secondes.
+         second += dt.getSecond() + drr.second;
+         if (second <  0) { minute --; second += c.getMinuteLength(); }
+         if (second >= c.getMinuteLength()) { minute ++; second -= c.getMinuteLength(); }
+
+         // Ajustement des heures en fonction des minutes.
+         minute += dt.getMinute() + drr.minute;
+         if (minute < 0) { hour --; minute += c.getHourLength(); }
+         if (minute >= c.getHourLength()) { hour ++; minute -= c.getHourLength(); }
+
+         // Ajustement des jours en fonction des heures.
+         hour += dt.getHour() + drr.hour;
+         if (hour <  0) { drr.day --; hour += c.getDayLength(); }
+         if (hour >= c.getDayLength()) { drr.day ++; hour -= c.getDayLength(); }
+
+         // Ajustement des mois en fonction des jours.
+         int signVal = drr.day/fabs(drr.day);
+         CDate dtt(dt); dtt.addMonth (signVal);
+
+         for(; c.getMonthLength(dtt) < fabs(drr.day); dtt.addMonth (signVal))
+         { drr.day -= signVal * c.getMonthLength(dtt); drr.month += signVal; }
+
+         day += dt.getDay() + drr.day;
+         if (day <  0) { drr.month --; day += c.getMonthLength(dtt); }
+         if (day >= c.getMonthLength(dtt)) { drr.month ++; day -= c.getMonthLength(dtt); } // << ProblÃšme ici
+         if (day == 0) day = c.getMonthLength(dtt);
+
+         drr.resolve(dt.getRelCalendar());
+
+         // Ajustement des annÃ©es en fonction des mois.
+         month += dt.getMonth() + drr.month;
+         if (month <  0) { year --; month += c.getYearLength(); }
+         if (month >= c.getYearLength()) { year ++; month -= c.getYearLength(); }
+         if (month == 0) month = c.getYearLength();
+
+         year += dt.getYear() + drr.year;
+
+         return (CDate(dt.getRelCalendar(), year, month, day, hour, minute, second));
+      }
+
+      CDate operator-(const CDate & dt, const CDuration & dr) { return (dt + (-dr)); }
+
+      //-----------------------------------------------------------------
+
+      CDuration operator-(const CDate & dt0, const CDate & dt1)
+      {
+         // TODO :: VÃ©rifier que les deux dates (dt0 et dt1) ont une rÃ©fÃ©rence vers le mÃªme calendrier.
+         CDuration dur =
+         { dt0.getYear() - dt1.getYear(), dt0.getMonth()  - dt1.getMonth() , dt0.getDay()    - dt1.getDay(),
+           dt0.getHour() - dt1.getHour(), dt0.getMinute() - dt1.getMinute(), dt0.getSecond() - dt1.getSecond() };
+         return (dur.resolve(dt0.getRelCalendar()));
+      }
+
+      //-----------------------------------------------------------------
+
+      /// Les opÃ©rateurs de comparaison. (Non testÃ©s pour le moment)
+      bool operator==(const CDate& dt0, const CDate& dt1)
+      {
+         // TODO :: VÃ©rifier que les deux dates (dt0 et dt1) ont une rÃ©fÃ©rence vers le mÃªme calendrier.
+         return ((dt0.getYear() == dt1.getYear()) && (dt0.getMonth()  == dt1.getMonth())  && (dt1.getDay()    == dt0.getDay()) &&
+                 (dt0.getHour() == dt1.getHour()) && (dt0.getMinute() == dt1.getMinute()) && (dt1.getSecond() == dt0.getSecond()));
+      }
+
+      bool operator< (const CDate& dt0, const CDate& dt1)
+      {
+         // TODO :: VÃ©rifier que les deux dates (dt0 et dt1) ont une rÃ©fÃ©rence vers le mÃªme calendrier.
+         if (dt0.getYear()   < dt1.getYear())   return true; if (dt0.getMonth()  < dt1.getMonth())  return true;
+         if (dt0.getDay()    < dt1.getDay())    return true; if (dt0.getHour()   < dt1.getHour())   return true;
+         if (dt0.getMinute() < dt1.getMinute()) return true; if (dt0.getSecond() < dt1.getSecond()) return true;
+         return false;
+      }
+
+      //-----------------------------------------------------------------
+
+      bool operator!=(const CDate & dt0, const CDate & dt1){ return !(dt1 == dt0); }
+      bool operator> (const CDate & dt0, const CDate & dt1){ return (dt1 < dt0); }
+      bool operator>=(const CDate & dt0, const CDate & dt1){ return ((dt0 > dt1) || (dt1 == dt0)); }
+      bool operator<=(const CDate & dt0, const CDate & dt1){ return ((dt0 < dt1) || (dt1 == dt0)); }
+
+      ///----------------------------------------------------------------
+
+   } // namespace date
+} // namespace xmlioserver
+
+
+
+
+
+
Index: /XMLIO_V2/dev/common/src/xmlio/calendar_util.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/calendar_util.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/calendar_util.hpp	(revision 219)
@@ -0,0 +1,40 @@
+#ifndef __XMLIO_CCalendar_util__
+#define __XMLIO_CCalendar_util__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+#include "calendar.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+      CDuration operator*(const double    & scal, const CDuration & ddr);
+      CDuration operator-(const CDuration & ddr , const CDuration & dr);
+      CDuration operator+(const CDuration & ddr , const CDuration & dr);
+      CDuration operator*(const CDuration & ddr , const double    & scal);
+      CDuration operator-(const CDuration & ddr);
+
+      CDate operator+(const CDate & dt, const CDuration & dr); // Non testÃ©e.
+      CDate operator-(const CDate & dt, const CDuration & dr);
+
+      CDuration operator-(const CDate & dt0, const CDate & dt1);
+
+      /// Les opÃ©rateurs de comparaison. (Non testÃ©s pour le moment)
+      bool operator==(const CDate& dt0, const CDate& dt1);
+      bool operator< (const CDate& dt0, const CDate& dt1);
+
+      bool operator!=(const CDate & dt0, const CDate & dt1);
+      bool operator> (const CDate & dt0, const CDate & dt1);
+      bool operator>=(const CDate & dt0, const CDate & dt1);
+      bool operator<=(const CDate & dt0, const CDate & dt1);
+
+      ///---------------------------------------------------------------
+
+   } // namespace date
+} // namespace xmlioserver
+
+#endif //__XMLIO_CCalendar_util__
Index: /XMLIO_V2/dev/common/src/xmlio/circular_buffer.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/circular_buffer.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/circular_buffer.cpp	(revision 219)
@@ -0,0 +1,261 @@
+#include "circular_buffer.hpp"
+
+#include "linear_buffer_impl.hpp"
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CCircularBuffer::CCircularBuffer(StdSize size)
+         : SuperClass(size)
+         , p_write(0), p_read(0), p_unused(0)
+         , nbrequest(0)
+      { /* Ne rien faire de plus */ }
+
+      CCircularBuffer::CCircularBuffer(const CCircularBuffer & cbuffer)
+         : SuperClass(cbuffer)
+         , p_write(cbuffer.p_write), p_read(cbuffer.p_read), p_unused(cbuffer.p_unused)
+         , nbrequest(cbuffer.nbrequest)
+      { /* Ne rien faire de plus */ }
+      
+      CCircularBuffer::CCircularBuffer(const CCircularBuffer * const cbuffer)
+         : SuperClass(cbuffer)
+         , p_write(cbuffer->p_write), p_read(cbuffer->p_read), p_unused(cbuffer->p_unused)
+         , nbrequest(cbuffer->nbrequest)
+      { /* Ne rien faire de plus */ }
+
+      CCircularBuffer::~CCircularBuffer(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      void CCircularBuffer::clear(void)
+      {
+         this-> p_write  = 0;
+         this-> p_read   = 0;
+         this-> p_unused = 0;
+      }
+
+      //-------------------------------------------------------------
+
+      StdSize CCircularBuffer::getNextRequestSize(void) const
+      {
+         if (!this->hasRequest())
+            ERROR("CCircularBuffer::getNextRequestSize()",
+                  << " invalid call !");
+         long int nbargs  = 0;
+         StdSize startpos = this-> p_read;
+         StdSize currsize = 2 * SuperClass::getRequestedSize(nbargs);
+         nbargs    = SuperClass::getInt(startpos + currsize);
+         currsize += SuperClass::getRequestedSize(nbargs);
+         
+         for (long int i = 0; i < nbargs; i++)
+         {
+            CBufferData bufdata;
+            SuperClass::getBufferData(bufdata, startpos + currsize);
+            currsize += (bufdata.size + DATA_HEADER_SIZE);
+         }
+         return (currsize);
+      }
+      
+      //-------------------------------------------------------------
+      
+      CLinearBuffer CCircularBuffer::getNextRequest(void)
+      {
+         StdSize startpos = this-> p_read;
+         StdSize currsize = this->getNextRequestSize();
+        
+         this->movePRead(currsize);
+         this->nbrequest--;
+         //std::cout <<  this->nbrequest << std::endl;
+        
+         return (CLinearBuffer(SuperClass::getData(startpos), currsize));
+      }
+
+      //-------------------------------------------------------------
+
+      void CCircularBuffer::appendRequest(const CLinearBuffer & brequest)
+      {
+         StdSize usedsize   = brequest.getUsedSize();
+         if (!this->isAvailable(usedsize))
+            ERROR("CCircularBuffer::appendRequest(brequest)",
+                  << " invalid call !");
+         StdSize data_begin = this->prepareNextDataPosition(usedsize);
+         SuperClass::setData(brequest.getData(), usedsize, data_begin);
+         this->updateNbRequests(data_begin, data_begin + usedsize);
+      }
+
+      //-------------------------------------------------------------
+
+      char * CCircularBuffer::prepareNextData(StdSize data_size)
+      {
+         return (SuperClass::getData(this->prepareNextDataPosition(data_size)));
+      }
+      
+      //-------------------------------------------------------------
+
+      StdSize CCircularBuffer::prepareNextDataPosition(StdSize data_size)
+      {
+         StdSize startpos = this-> p_write;
+         if (!this->isAvailable(data_size))
+            ERROR("CCircularBuffer::prepareNextDataPosition(data_size)",
+                  << " invalid call !");
+         if ((this-> p_write + data_size) > SuperClass::getSize())
+            startpos = 0;
+
+         this->movePWrite(data_size);
+         return (startpos);
+      }
+
+      //-------------------------------------------------------------
+
+      void CCircularBuffer::movePRead(StdSize data_size)
+      {
+         this-> p_read += data_size;
+         if ((this-> p_read == this-> p_unused) &&
+             (this-> p_read == this-> p_write))
+         {
+            this->clear();
+            return;
+         }
+         
+         if (this-> p_read == this-> p_unused)
+         {
+            this-> p_unused = this-> p_write;
+            this-> p_read   = 0;
+            return;
+         }
+         if (this-> p_read == this-> p_write)
+         {
+            this->clear();
+         }
+      }
+      
+      //-------------------------------------------------------------
+      
+      void CCircularBuffer::movePWrite(StdSize data_size)
+      {
+         if ((this-> p_write + data_size) > SuperClass::getSize())
+         {
+            this-> p_unused = this-> p_write;
+            this-> p_write  = data_size;
+            if (this-> p_read < (data_size))
+               ERROR("CCircularBuffer::movePWrite(data_size)",
+                     << " invalid position 1 !");
+         }
+         else
+         {
+            if ((this-> p_read > this-> p_write) &&
+                (this-> p_read < (this-> p_write + data_size)))
+               ERROR("CCircularBuffer::movePWrite(data_size)",
+                     << " invalid position 2 !");
+            this-> p_write += data_size;
+            if (this->p_read < this->p_write)
+               this-> p_unused = this-> p_write;
+         }
+      }
+
+      //-------------------------------------------------------------
+
+      bool CCircularBuffer::hasRequest(void) const
+      { 
+         return (this->nbrequest != 0); 
+      }
+      
+      //-------------------------------------------------------------
+      
+      bool CCircularBuffer::isAvailable(StdSize data_size) const
+      {
+         if (this->p_write == this->p_unused)
+            return (((SuperClass::getSize() - this->p_write) >= data_size) ||
+                   (this->p_read >= data_size));
+         else
+            return ((this->p_read - this->p_write) >= data_size);
+      }
+      //---------------------------------------------------------------
+
+      void CCircularBuffer::printToTextFile (const StdString & filename)
+      {
+         StdOFStream ofs(filename.c_str());
+         this->printToTextStream(ofs);
+         ofs.close();
+      }
+      
+      //-------------------------------------------------------------
+      
+      void CCircularBuffer::printToTextStream (StdOStream & ostr)
+      {
+         StdSize _p_write   = p_write,
+                 _p_read    = p_read,
+                 _p_unused  = p_unused,
+                 _nbrequest = nbrequest;
+
+         while (this->hasRequest())
+         {
+            this->getNextRequest().printToTextStream(ostr);
+            ostr << std::endl;
+         }
+
+         p_write   = _p_write;
+         p_read    = _p_read;
+         p_unused  = _p_unused;
+         nbrequest = _nbrequest;
+      }
+
+      //---------------------------------------------------------------
+
+      StdSize CCircularBuffer::getNumberOfRequest(void) const
+      { 
+         return (this->nbrequest); 
+      }
+
+      //---------------------------------------------------------------
+
+      StdSize CCircularBuffer::getReadPosition(void) const
+      { 
+         return (this->p_read); 
+      }
+
+      //---------------------------------------------------------------
+
+      StdSize CCircularBuffer::getWritePosition(void) const
+      { 
+         return (this->p_write); 
+      }
+
+      //---------------------------------------------------------------
+
+      StdSize CCircularBuffer::getUnusedPosition(void) const
+      { 
+         return (this->p_unused); 
+      }
+
+      //---------------------------------------------------------------
+
+      void CCircularBuffer::updateNbRequests(StdSize data_begin, StdSize data_end)
+      {
+         StdSize position = data_begin;        
+         while (position != data_end)
+         {
+            this->nbrequest++;
+            position = SuperClass::getNextDataPosition(position); // manager id           
+            position = SuperClass::getNextDataPosition(position); // method id           
+            SuperClass::updateBufferData(position);
+            long int nbarg = SuperClass::getInt(position);
+            position = SuperClass::getNextDataPosition(position);
+            for (long int i = 0; i < nbarg; i++)
+               position = SuperClass::getNextDataPosition(position);
+               
+            if (position > data_end)
+              ERROR("CCircularBuffer::updateNbRequests(StdSize data_begin, StdSize data_end)",
+                     << "[ position courante" << position
+                     << ", fin de traitement" << data_end << " ] "
+                     << "Impossible de mettre Ã  jour la liste des requÃªtes !");
+         }
+      }
+
+      ///------------------------------------------------------------
+   } // namespace tree
+} // namespace xmlioserver
+
Index: /XMLIO_V2/dev/common/src/xmlio/circular_buffer.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/circular_buffer.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/circular_buffer.hpp	(revision 219)
@@ -0,0 +1,72 @@
+#ifndef __XMLIO_CCircularBuffer__
+#define __XMLIO_CCircularBuffer__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "linear_buffer.hpp"
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CCircularBuffer
+         : public CBuffer
+      {
+
+            /// DÃ©finition de type ///
+            typedef CBuffer SuperClass;
+
+         public :
+
+            /// Construteurs ///
+            explicit CCircularBuffer(StdSize size = BUFFER_SERVER_SIZE);
+            CCircularBuffer(const CCircularBuffer & cbuffer);
+            CCircularBuffer(const CCircularBuffer * const cbuffer);
+
+            /// Mutateurs ///
+            virtual void clear(void);
+
+            char * prepareNextData(StdSize data_size);
+            StdSize prepareNextDataPosition(StdSize data_size);
+
+            void appendRequest(const CLinearBuffer & brequest);
+
+            void updateNbRequests(StdSize data_begin, StdSize data_end);
+
+            /// Test ///
+            bool hasRequest(void) const ;
+            bool isAvailable(StdSize data_size) const;
+
+            /// Accesseurs ///
+            CLinearBuffer getNextRequest(void);
+            StdSize getNumberOfRequest(void) const;
+
+            StdSize getReadPosition(void) const;
+            StdSize getWritePosition(void) const;
+            StdSize getUnusedPosition(void) const;
+
+            /// Sortie fichier ascii ///
+            virtual void printToTextFile (const StdString & filename);
+            virtual void printToTextStream (StdOStream & ostr);
+
+            /// Destructeur ///
+            virtual ~CCircularBuffer(void);
+
+         private :
+
+            /// Mutateurs privÃ©s ///
+            void movePWrite(StdSize data_size);
+            void movePRead(StdSize data_size);
+
+            /// Accesseurs privÃ©s ///
+            StdSize getNextRequestSize(void) const;
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            StdSize p_write, p_read, p_unused, nbrequest;
+
+      }; // class CCircularBuffer
+   } // namespace comm
+} // namespace xmlioserver
+
+#endif // __XMLIO_CCircularBuffer__
Index: /XMLIO_V2/dev/common/src/xmlio/client.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/client.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/client.cpp	(revision 219)
@@ -0,0 +1,133 @@
+#include "client.hpp"
+
+#include "linear_buffer_impl.hpp"
+
+namespace xmlioserver {
+namespace comm {
+
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+   
+   CClient::CClient(MPIComm comm_client_server)
+      : bpair(comm_client_server)
+   { 
+      this->initialize();
+   }  
+        
+   CClient::~CClient(void)
+   { 
+      this->finalize();
+   } 
+   
+   ///--------------------------------------------------------------
+
+   boost::shared_ptr<CClient> CClient::Client;
+
+   ///--------------------------------------------------------------
+
+   boost::shared_ptr<CClient> CClient::CreateClient(MPIComm comm_client_server)
+   {
+      if (CClient::Client.get() != NULL)
+         CClient::Client = boost::shared_ptr<CClient>(new CClient(comm_client_server));
+      return (CClient::GetClient());
+   }
+
+   ///--------------------------------------------------------------
+
+   boost::shared_ptr<CClient> CClient::GetClient(void)
+   {
+      return (CClient::Client);
+   }
+
+   ///--------------------------------------------------------------
+   
+   const CBufferPair & CClient::getBufferPair(void) const 
+   {
+      return (this->bpair);
+   }   
+   
+   //---------------------------------------------------------------
+
+   void CClient::initialize(void)
+   {
+      this->bpair.prepareRequest(0, 0, CLinearBuffer::NULL_ARG,
+                                       CLinearBuffer::NULL_ARG,
+                                       CLinearBuffer::NULL_ARG,
+                                       CLinearBuffer::NULL_ARG);
+      // Pas d'argument Ã  ajouter.
+   }
+   
+   //---------------------------------------------------------------
+   
+   void CClient::finalize(void)
+   {
+      this->bpair.prepareRequest(0, 1, CLinearBuffer::NULL_ARG,
+                                       CLinearBuffer::NULL_ARG,
+                                       CLinearBuffer::NULL_ARG,
+                                       CLinearBuffer::NULL_ARG);
+      // Pas d'argument Ã  ajouter.
+      this->bpair.sendCurrentBuffer();
+      comm::CMPIManager::Barrier();
+   }
+   
+   //---------------------------------------------------------------
+   
+   void CClient::setContext(const StdString & idContext)
+   {
+      this->bpair.prepareRequest(1, 0, &idContext,
+                                       CLinearBuffer::NULL_ARG,
+                                       CLinearBuffer::NULL_ARG,
+                                       CLinearBuffer::NULL_ARG);
+      this->bpair.getCurrentBuffer().appendString(idContext);
+   }
+   
+   //---------------------------------------------------------------
+   
+   void CClient::updateCalendar(long int timestep)
+   {
+      this->bpair.prepareRequest(1, 1, &timestep,
+                                       CLinearBuffer::NULL_ARG,
+                                       CLinearBuffer::NULL_ARG,
+                                       CLinearBuffer::NULL_ARG);
+      this->bpair.getCurrentBuffer().appendInt(timestep);
+   }
+
+   //---------------------------------------------------------------
+
+   void CClient::setTimestep(const date::CDuration & duration)
+   {
+      StdString durationstr = duration.toString();
+      this->bpair.prepareRequest(1, 2, &durationstr,
+                                       CLinearBuffer::NULL_ARG,
+                                       CLinearBuffer::NULL_ARG,
+                                       CLinearBuffer::NULL_ARG);
+      this->bpair.getCurrentBuffer().appendString(durationstr);
+   }
+   
+   //---------------------------------------------------------------
+   
+   void CClient::sendData
+      (const StdString & fieldId, const StdString & fileId, const ARRAY(float, 1) dataArray)
+   {
+      this->bpair.prepareRequest(2, 0, &fieldId, &fileId, &dataArray,
+                                       CLinearBuffer::NULL_ARG);
+      this->bpair.getCurrentBuffer().appendString(fieldId);
+      this->bpair.getCurrentBuffer().appendString(fileId);
+      this->bpair.getCurrentBuffer().appendFloatArray(dataArray);
+   }
+   
+   //---------------------------------------------------------------
+   
+   void CClient::sendData
+      (const StdString & fieldId, const StdString & fileId, const ARRAY(double, 1) dataArray)
+   {
+      this->bpair.prepareRequest(2, 1, &fieldId, &fileId, &dataArray,
+                                       CLinearBuffer::NULL_ARG);
+      this->bpair.getCurrentBuffer().appendString(fieldId);
+      this->bpair.getCurrentBuffer().appendString(fileId);
+      this->bpair.getCurrentBuffer().appendDoubleArray(dataArray);
+   }
+
+   ///--------------------------------------------------------------
+
+} // namespace comm
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/client.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/client.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/client.hpp	(revision 219)
@@ -0,0 +1,64 @@
+#ifndef __XMLIO_Client__
+#define __XMLIO_Client__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "mpi_manager.hpp"
+#include "buffer_pair.hpp"
+#include "array.hpp"
+#include "duration.hpp"
+
+namespace xmlioserver {
+namespace comm {
+
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   
+   class CClient
+   {
+      public :
+
+         static boost::shared_ptr<CClient> CreateClient(MPIComm comm_client_server);
+         static boost::shared_ptr<CClient> GetClient(void);
+                
+         /// Destructeur ///
+         ~CClient(void);  
+         
+      protected : 
+      
+         /// Accesseur ///
+         const CBufferPair & getBufferPair(void) const;
+              
+         /// Appels distants///   
+         void initialize(void); // manager 0, method 0
+         void finalize(void);   // manager 0, method 1
+         
+      public : 
+       
+         void setContext(const StdString & idContext);      // manager 1, method 0
+         void updateCalendar(long int timestep);            // manager 1, method 1
+         void setTimestep(const date::CDuration & duration);// manager 1, method 2
+         
+         void sendData(const StdString & fieldId,
+                       const StdString & fileId,
+                       const ARRAY(float, 1)  dataArray); // manager 2, method 0
+         
+         void sendData(const StdString & fieldId,
+                       const StdString & fileId,
+                       const ARRAY(double, 1) dataArray); // manager 2, method 1
+         
+      private :
+
+         /// Constructeurs ///
+         CClient(MPIComm comm_client_server);
+      
+         /// PropriÃ©tÃ© privÃ©e ///
+         CBufferPair bpair;
+
+         static boost::shared_ptr<CClient> Client;
+      
+   }; // class CClient   
+   
+} // namespace comm
+} // namespace xmlioserver
+
+#endif //__XMLIO_Client__
Index: /XMLIO_V2/dev/common/src/xmlio/config/axis_attribute.conf
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/config/axis_attribute.conf	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/config/axis_attribute.conf	(revision 219)
@@ -0,0 +1,10 @@
+DECLARE_ATTRIBUTE(StdString, name)
+DECLARE_ATTRIBUTE(StdString, standard_name)
+DECLARE_ATTRIBUTE(StdString, long_name)
+
+DECLARE_ATTRIBUTE(StdString, unit)
+
+DECLARE_ATTRIBUTE(int,       size)
+DECLARE_ATTRIBUTE(ARRAY(double, 1), zvalue)
+
+
Index: /XMLIO_V2/dev/common/src/xmlio/config/calendar_type.conf
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/config/calendar_type.conf	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/config/calendar_type.conf	(revision 219)
@@ -0,0 +1,21 @@
+#ifdef __XMLIO_CAllLeapCalendar__
+   DECLARE_CALENDAR(AllLeap  , AllLeap)
+#endif //__XMLIO_CAllLeapCalendar__
+
+#ifdef __XMLIO_CD360Calendar__
+   DECLARE_CALENDAR(D360  , D360)
+#endif //__XMLIO_CD360Calendar__
+
+#ifdef __XMLIO_CGregorianCalendar__
+   DECLARE_CALENDAR(Gregorian  , Gregorian)
+#endif //__XMLIO_CGregorianCalendar__
+
+#ifdef __XMLIO_CJulianCalendar__
+   DECLARE_CALENDAR(Julian  , Julian)
+#endif //__XMLIO_CJulianCalendar__
+
+#ifdef __XMLIO_CNoLeapCalendar__
+   DECLARE_CALENDAR(NoLeap  , NoLeap)
+#endif //__XMLIO_CNoLeapCalendar__
+
+#undef DECLARE_CALENDAR
Index: /XMLIO_V2/dev/common/src/xmlio/config/context_attribute.conf
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/config/context_attribute.conf	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/config/context_attribute.conf	(revision 219)
@@ -0,0 +1,4 @@
+DECLARE_ATTRIBUTE(StdString, calendar_type)
+DECLARE_ATTRIBUTE(StdString, start_date)
+
+   DECLARE_ATTRIBUTE(StdString, output_dir)
Index: /XMLIO_V2/dev/common/src/xmlio/config/domain_attribute.conf
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/config/domain_attribute.conf	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/config/domain_attribute.conf	(revision 219)
@@ -0,0 +1,55 @@
+/* GLOBAL */
+DECLARE_ATTRIBUTE(StdString       , name)
+DECLARE_ATTRIBUTE(StdString       , standard_name)
+DECLARE_ATTRIBUTE(StdString       , long_name)
+
+/* SpÃ©cifique */
+DECLARE_ATTRIBUTE(StdString       , domain_group_ref)
+
+/* GLOBAL */
+DECLARE_ATTRIBUTE(int             , ni_glo)
+DECLARE_ATTRIBUTE(int             , nj_glo)
+
+/* LOCAL */
+DECLARE_ATTRIBUTE(int             , ibegin)
+DECLARE_ATTRIBUTE(int             , iend)
+DECLARE_ATTRIBUTE(int             , ni)
+
+/* LOCAL */
+DECLARE_ATTRIBUTE(int             , jbegin)
+DECLARE_ATTRIBUTE(int             , jend)
+DECLARE_ATTRIBUTE(int             , nj)
+
+/* LOCAL */
+DECLARE_ATTRIBUTE(ARRAY(bool, 2)  , mask)
+
+/* GLOBAL */
+DECLARE_ATTRIBUTE(int             , data_dim)
+
+/* LOCAL */
+DECLARE_ATTRIBUTE(int             , data_ni)
+DECLARE_ATTRIBUTE(int             , data_nj)
+DECLARE_ATTRIBUTE(int             , data_ibegin)
+DECLARE_ATTRIBUTE(int             , data_jbegin)
+
+/* GLOBAL */
+DECLARE_ATTRIBUTE(int             , zoom_ni)
+DECLARE_ATTRIBUTE(int             , zoom_nj)
+DECLARE_ATTRIBUTE(int             , zoom_ibegin)
+DECLARE_ATTRIBUTE(int             , zoom_jbegin)
+
+/* LOCAL */
+DECLARE_ATTRIBUTE(int             , zoom_ni_loc)
+DECLARE_ATTRIBUTE(int             , zoom_nj_loc)
+DECLARE_ATTRIBUTE(int             , zoom_ibegin_loc)
+DECLARE_ATTRIBUTE(int             , zoom_jbegin_loc)
+
+/* LOCAL */
+DECLARE_ATTRIBUTE(int             , data_n_index)
+DECLARE_ATTRIBUTE(ARRAY(int, 1)   , data_i_index)
+DECLARE_ATTRIBUTE(ARRAY(int, 1)   , data_j_index)
+
+/* LOCAL */
+DECLARE_ATTRIBUTE(ARRAY(double, 1), lonvalue)
+DECLARE_ATTRIBUTE(ARRAY(double, 1), latvalue)
+
Index: /XMLIO_V2/dev/common/src/xmlio/config/field_attribute.conf
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/config/field_attribute.conf	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/config/field_attribute.conf	(revision 219)
@@ -0,0 +1,20 @@
+DECLARE_ATTRIBUTE(StdString, name)
+DECLARE_ATTRIBUTE(StdString, standard_name)
+DECLARE_ATTRIBUTE(StdString, long_name)
+
+DECLARE_ATTRIBUTE(StdString, unit)
+DECLARE_ATTRIBUTE(StdString, operation)
+
+DECLARE_ATTRIBUTE(StdString, freq_op)
+DECLARE_ATTRIBUTE(int,       level)
+DECLARE_ATTRIBUTE(int,       prec)
+
+DECLARE_ATTRIBUTE(bool,      enabled)
+
+DECLARE_ATTRIBUTE(StdString, domain_ref)
+DECLARE_ATTRIBUTE(StdString, axis_ref)
+DECLARE_ATTRIBUTE(StdString, grid_ref)
+//DECLARE_ATTRIBUTE(StdString, zoom_ref)
+DECLARE_ATTRIBUTE(StdString, field_ref)
+
+DECLARE_ATTRIBUTE(double,    default_value)
Index: /XMLIO_V2/dev/common/src/xmlio/config/file_attribute.conf
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/config/file_attribute.conf	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/config/file_attribute.conf	(revision 219)
@@ -0,0 +1,10 @@
+DECLARE_ATTRIBUTE(StdString, name)
+DECLARE_ATTRIBUTE(StdString, description)
+
+DECLARE_ATTRIBUTE(StdString, output_freq)
+
+DECLARE_ATTRIBUTE(int,       output_level)
+
+DECLARE_ATTRIBUTE(bool,      enabled)
+
+// DECLARE_ATTRIBUTE_DEF(bool, enabled, true)
Index: /XMLIO_V2/dev/common/src/xmlio/config/functor_type.conf
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/config/functor_type.conf	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/config/functor_type.conf	(revision 219)
@@ -0,0 +1,13 @@
+#ifdef __XMLIO_CAverage__
+   DECLARE_FUNCTOR(Average  , average)
+#endif //__XMLIO_CAverage__
+
+#ifdef __XMLIO_CInstant__
+   DECLARE_FUNCTOR(Instant, instant)
+#endif //__XMLIO_CInstant__
+
+#ifdef __XMLIO_COnce__
+   DECLARE_FUNCTOR(Once , once)
+#endif //__XMLIO_COnce__
+
+#undef DECLARE_FUNCTOR
Index: /XMLIO_V2/dev/common/src/xmlio/config/grid_attribute.conf
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/config/grid_attribute.conf	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/config/grid_attribute.conf	(revision 219)
@@ -0,0 +1,5 @@
+DECLARE_ATTRIBUTE(StdString, name)
+DECLARE_ATTRIBUTE(StdString, description)
+DECLARE_ATTRIBUTE(StdString, domain_ref)
+DECLARE_ATTRIBUTE(StdString, axis_ref)
+
Index: /XMLIO_V2/dev/common/src/xmlio/config/method_attribute.conf
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/config/method_attribute.conf	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/config/method_attribute.conf	(revision 219)
@@ -0,0 +1,1 @@
+
Index: /XMLIO_V2/dev/common/src/xmlio/config/node_type.conf
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/config/node_type.conf	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/config/node_type.conf	(revision 219)
@@ -0,0 +1,34 @@
+#ifdef __XMLIO_CAxis__
+   DECLARE_NODE(Axis  , axis  )
+#endif //__XMLIO_CAxis__
+
+#ifdef __XMLIO_CDomain__
+   DECLARE_NODE(Domain, domain)
+#endif //__XMLIO_CDomain__
+
+#ifdef __XMLIO_CField__
+   DECLARE_NODE(Field , field )
+#endif //__XMLIO_CField__
+
+#ifdef __XMLIO_CFile__
+   DECLARE_NODE(File  , file  )
+#endif //__XMLIO_CFile__
+
+#ifdef __XMLIO_CGrid__
+   DECLARE_NODE(Grid  , grid  )
+#endif //__XMLIO_CGrid__
+
+#ifdef __XMLIO_CMethod__
+   DECLARE_NODE(Method, method)
+#endif //__XMLIO_CMethod__
+
+#ifdef __XMLIO_CVar__
+   DECLARE_NODE(Var   , var   )
+#endif //__XMLIO_CVar__
+
+#ifdef __XMLIO_CContext__
+   DECLARE_NODE_PAR(Context, context)
+#endif //__XMLIO_CContext__
+
+#undef DECLARE_NODE
+#undef DECLARE_NODE_PAR
Index: /XMLIO_V2/dev/common/src/xmlio/config/properties.conf
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/config/properties.conf	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/config/properties.conf	(revision 219)
@@ -0,0 +1,23 @@
+/// Author ///
+DECLARE_PROPERTY  (StdString, AUTHOR, "OZDOBA HervÃ©, MEURDESOIF Yann")
+
+/// Version number ///
+DECLARE_PROPERTY  (StdString, VERSION, "0.1")
+
+/// Time name ///
+DECLARE_PROPERTY  (StdString, TIME_NAME, "time")
+
+/// Output config ///
+DECLARE_PROPERTY  (StdString, NETCDF_OUTPUT,  "MULTI_FILE") // (ONE_FILE, TWO_FILE, MULTI_FILE)
+DECLARE_PROPERTY  (StdString, FILE_SUFFIX,    "_node"   )
+DECLARE_PROPERTY  (StdString, FILE_EXTENSION, ".nc"     )
+DECLARE_PROPERTY  (StdString, OUTPUT_PATH,    "./data/" )
+
+/// Default Value ///
+DECLARE_PROPERTY (double, FIELD_DEFAULT_VALUE,  1E-10)
+
+/// Buffer Size ///
+DECLARE_PROPERTY (StdSize, BUFFER_CLIENT_SIZE,  1E6) // 1 Mo
+DECLARE_PROPERTY (StdSize, BUFFER_SERVER_SIZE, 10E6) // 10 Mo
+
+
Index: /XMLIO_V2/dev/common/src/xmlio/config/var_attribute.conf
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/config/var_attribute.conf	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/config/var_attribute.conf	(revision 219)
@@ -0,0 +1,1 @@
+
Index: /XMLIO_V2/dev/common/src/xmlio/configure.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/configure.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/configure.cpp	(revision 219)
@@ -0,0 +1,14 @@
+#define __XMLIO_Configure__ // < Ne pas supprimer
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+
+/// /////////// Macros /////////// ///
+#undef  DECLARE_PROPERTY
+#define DECLARE_PROPERTY(type, name, value) \
+   type name = value;
+
+namespace xmlioserver
+{
+#include "properties.conf"
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/configure.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/configure.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/configure.hpp	(revision 219)
@@ -0,0 +1,16 @@
+#ifndef __XMLIO_Configure__
+#define __XMLIO_Configure__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+
+/// /////////// Macros /////////// ///
+#define DECLARE_PROPERTY(type, name, value) \
+   extern type name; // = value
+
+namespace xmlioserver
+{
+#include "properties.conf"
+} // namespace xmlioserver
+
+#endif // __XMLIO_Configure__
Index: /XMLIO_V2/dev/common/src/xmlio/data_output.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/data_output.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/data_output.cpp	(revision 219)
@@ -0,0 +1,100 @@
+#include "data_output.hpp"
+
+#include "attribute_template_impl.hpp"
+#include "context.hpp"
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CDataOutput::~CDataOutput(void)
+      { /* Ne rien faire de plus */ }
+
+      //----------------------------------------------------------------
+
+      void CDataOutput::writeGrid
+         (const boost::shared_ptr<tree::CGrid> grid)
+      {
+         if (grid->domain_ref.isEmpty())
+            ERROR("CONetCDF4Adv::writeGrid(grid)",
+                   << " domain is not defined !");
+
+         if (grid->axis_ref.isEmpty())
+         {
+            this->writeGrid
+            (CObjectFactory::GetObject<tree::CDomain>(grid->domain_ref.getValue()));
+         }
+         else
+         {
+            this->writeGrid
+            (CObjectFactory::GetObject<tree::CDomain>(grid->domain_ref.getValue()),
+             CObjectFactory::GetObject<tree::CAxis>(grid->axis_ref.getValue()));
+         }
+      }
+
+      //----------------------------------------------------------------
+
+      void CDataOutput::writeFile
+         (const boost::shared_ptr<tree::CFile>  file)
+      {
+         this->writeFile_(file);
+      }
+
+      //----------------------------------------------------------------
+
+      void CDataOutput::writeGrid
+         (const boost::shared_ptr<tree::CDomain> domain,
+          const boost::shared_ptr<tree::CAxis> axis)
+      {
+         this->writeDomain_(domain);
+         this->writeAxis_(axis);
+      }
+
+      //----------------------------------------------------------------
+
+      void CDataOutput::writeGrid
+         (const boost::shared_ptr<tree::CDomain> domain)
+      {
+         this->writeDomain_(domain);
+      }
+
+      //----------------------------------------------------------------
+
+      void CDataOutput::writeField
+         (const boost::shared_ptr<tree::CField> field)
+      {
+         boost::shared_ptr<tree::CContext> context =
+         CObjectFactory::GetObject<tree::CContext>(CObjectFactory::GetCurrentContextId());
+         boost::shared_ptr<date::CCalendar> calendar = context->getCalendar();
+         
+         this->writeField_(field);
+         this->writeTimeAxis_(field, calendar);
+      }
+
+      //----------------------------------------------------------------
+
+      void CDataOutput::writeFieldGrid
+         (const boost::shared_ptr<tree::CField> field)
+      {
+         this->writeGrid(field->getRelGrid());
+      }
+      
+      //----------------------------------------------------------------
+      
+      void CDataOutput::writeFieldData(const boost::shared_ptr<tree::CField> field)
+      {
+         boost::shared_ptr<CGrid> grid =
+            CObjectFactory::GetObject<CGrid>(field->grid_ref.getValue());
+         boost::shared_ptr<CDomain> domain =
+            CObjectFactory::GetObject<CDomain>(grid->domain_ref.getValue());
+            
+         if (domain->isEmpty()) return;
+         this->writeFieldData_(field);
+      }
+      
+      ///----------------------------------------------------------------
+
+   } // namespace io
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/data_output.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/data_output.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/data_output.hpp	(revision 219)
@@ -0,0 +1,60 @@
+#ifndef __XMLIO_DATA_OUTPUT__
+#define __XMLIO_DATA_OUTPUT__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+#include "grid.hpp"
+#include "field.hpp"
+
+#include <mpi.h>
+#include <netcdf.h>
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CDataOutput
+      {
+         public :
+
+            /// DÃ©finition de type ///
+            typedef enum { ONE_FILE = 0, MULTI_GROUP, MULTI_FILE } EDataOutputType;
+
+            /// Ecriture ///
+            void writeFile     (const boost::shared_ptr<tree::CFile>  file);
+            void writeField    (const boost::shared_ptr<tree::CField> field);
+            void writeFieldGrid(const boost::shared_ptr<tree::CField> field);
+            void writeFieldData(const boost::shared_ptr<tree::CField> field);
+
+            virtual void definition_start(void) = 0;
+            virtual void definition_end(void)   = 0;
+
+            virtual ~CDataOutput(void);
+
+         protected:
+
+            /// Ecriture ///
+            void writeGrid(const boost::shared_ptr<tree::CGrid>   grid);
+            void writeGrid(const boost::shared_ptr<tree::CDomain> domain,
+                           const boost::shared_ptr<tree::CAxis>   axis);
+            void writeGrid(const boost::shared_ptr<tree::CDomain> domain);
+
+            virtual void writeFile_       (const boost::shared_ptr<tree::CFile>     file)   = 0;
+            virtual void writeField_      (const boost::shared_ptr<tree::CField>    field)  = 0;
+            virtual void writeFieldData_  (const boost::shared_ptr<tree::CField>    field)  = 0;
+            virtual void writeDomain_     (const boost::shared_ptr<tree::CDomain>   domain) = 0;
+            virtual void writeAxis_       (const boost::shared_ptr<tree::CAxis>     axis)   = 0;
+            virtual void writeTimeAxis_   (const boost::shared_ptr<tree::CField>    field,
+                                           const boost::shared_ptr<date::CCalendar> cal)    = 0;
+
+            /// PropriÃ©tÃ©s protÃ©gÃ©es ///
+            EDataOutputType type;
+
+      }; // class CDataOutput
+
+   } // namespace io
+} // namespace xmlioserver
+
+#endif //__XMLIO_DATA_OUTPUT__
Index: /XMLIO_V2/dev/common/src/xmlio/data_treatment.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/data_treatment.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/data_treatment.cpp	(revision 219)
@@ -0,0 +1,169 @@
+#include "data_treatment.hpp"
+
+#include "attribute_template_impl.hpp"
+#include "object_template_impl.hpp"
+#include "group_template_impl.hpp"
+#include "object_factory_impl.hpp"
+
+
+namespace xmlioserver
+{
+   namespace data
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CDataTreatment::CDataTreatment (boost::shared_ptr<CContext> _ctxt)
+         : currentContext(_ctxt), enabledFiles()
+      { this->doTreatment(); }
+
+      CDataTreatment::~CDataTreatment(void)
+      { /* Ne rien faire de plus */ }
+
+      ///---------------------------------------------------------------
+
+      const boost::shared_ptr<CContext>
+         CDataTreatment::getCurrentContext(void) const
+      {
+         return (this->currentContext);
+      }
+
+      const std::vector<boost::shared_ptr<CFile> > &
+         CDataTreatment::getEnabledFiles (void) const
+      {
+         return (this->enabledFiles);
+      }
+      //----------------------------------------------------------------
+
+      void CDataTreatment::update_calendar(int step)
+      {
+         // Mise Ã  jour cÃŽtÃ© client
+         this->currentContext->getCalendar()->update(step);
+         if (CXIOSManager::GetStatus() == CXIOSManager::LOC_CLIENT)
+         { // Mise Ã  jour cÃŽtÃ© serveur
+            boost::shared_ptr<comm::CClient> client = comm::CClient::GetClient();
+            client->updateCalendar(step);
+         }
+      }
+
+      void CDataTreatment::set_timestep(const date::CDuration & duration)
+      {
+         // Mise Ã  jour cÃŽtÃ© client
+         this->currentContext->getCalendar()->setTimeStep(duration);
+         if (CXIOSManager::GetStatus() == CXIOSManager::LOC_CLIENT)
+         { // Mise Ã  jour cÃŽtÃ© serveur
+            boost::shared_ptr<comm::CClient> client = comm::CClient::GetClient();
+            client->setTimestep(duration);
+         }
+      }
+
+      //----------------------------------------------------------------
+      
+      void CDataTreatment::write_data
+                           (const StdString & fieldId,
+                            const StdString & fileId,
+                            const std::deque<ARRAY(double, 1)> & data)
+      {
+         const date::CDate & currDate =
+                this->currentContext->getCalendar()->getCurrentDate();
+         const std::vector<boost::shared_ptr<CField> > & refField=
+               CObjectFactory::GetObject<CField>(fieldId)->getAllReference();
+         std::vector<boost::shared_ptr<CField> >::const_iterator
+               it = refField.begin(), end = refField.end();
+
+         for (; it != end; it++)
+         {
+            boost::shared_ptr<CField> field = *it;
+            boost::shared_ptr<CFile>  file  = field->getRelFile();
+            if (file->getId().compare(fileId) == 0)
+            {
+               if (field->updateDataServer(currDate, data))
+                  file->getDataOutput()->writeFieldData(field);
+               return;
+            }
+         }
+
+      }
+
+      //----------------------------------------------------------------
+
+      void CDataTreatment::doTreatment(void)
+      {         
+         // RÃ©solution du calendrier
+         this->currentContext->solveCalendar();         
+         
+         // RÃ©solution des hÃ©ritages pour le context actuel.
+         //std::cout << "(Message temporaire) RÃ©solution des hÃ©ritages ..." << std::endl;
+         this->solveAllInheritance();
+
+         //Initialisation du vecteur 'enabledFiles' contenant la liste des fichiers Ã  sortir.
+         //std::cout << "(Message temporaire) Initialisation du vecteur enabledFiles ..." << std::endl;
+         this->findEnabledFiles();
+
+         //Recherche des champs Ã  sortir (enable Ã  true + niveau de sortie correct)
+         // pour chaque fichier prÃ©cÃ©demment listÃ©.
+         //std::cout << "(Message temporaire) Recherche des champs Ã  sortir ..." << std::endl;
+         this->findAllEnabledFields();
+
+         // RÃ©solution des rÃ©fÃ©rences de grilles pour chacun des champs.
+         //std::cout << "(Message temporaire) RÃ©solution des rÃ©fÃ©rences de grilles ..." << std::endl;
+         this->solveAllGridRef();
+
+         // Traitement des opÃ©rations.
+         this->solveAllOperation();
+
+         // Nettoyage de l'arborescence
+         CContext::CleanTree();
+
+         //std::cout << "(Message temporaire) fin traitement sorties ..." << std::endl;
+      }
+
+      void CDataTreatment::findAllEnabledFields(void)
+      {
+         for (unsigned int i = 0; i < this->enabledFiles.size(); i++)
+            (void)this->enabledFiles[i]->getEnabledFields();
+      }
+
+      void CDataTreatment::solveAllGridRef(void)
+      {
+         for (unsigned int i = 0; i < this->enabledFiles.size(); i++)
+            this->enabledFiles[i]->solveEFGridRef();
+      }
+
+      void CDataTreatment::solveAllOperation(void)
+      {
+         for (unsigned int i = 0; i < this->enabledFiles.size(); i++)
+            this->enabledFiles[i]->solveEFOperation();
+      }
+
+      void CDataTreatment::solveAllInheritance(void) const
+      {
+         // RÃ©solution des hÃ©ritages descendants (cÃ d des hÃ©ritages de groupes)
+         // pour chacun des contextes.
+         this->currentContext->solveDescInheritance();
+
+         // RÃ©solution des hÃ©ritages par rÃ©fÃ©rence au niveau des fichiers.
+          const std::vector<boost::shared_ptr<CFile> > & allFiles
+            = CObjectFactory::GetObjectVector<CFile>();
+
+         for (unsigned int i = 0; i < allFiles.size(); i++)
+            allFiles[i]->solveFieldRefInheritance();
+      }
+
+      void CDataTreatment::findEnabledFiles(void)
+      {
+         const std::vector<boost::shared_ptr<CFile> > & allFiles
+            = CObjectFactory::GetObjectVector<CFile>();
+
+         for (unsigned int i = 0; i < allFiles.size(); i++)
+            if (!allFiles[i]->enabled.isEmpty()) // Si l'attribut 'enabled' est dÃ©fini.
+               if (allFiles[i]->enabled.getValue()) // Si l'attribut 'enabled' est fixÃ© Ã  vrai.
+                  enabledFiles.push_back(allFiles[i]);
+
+         if (enabledFiles.size() == 0)
+            DEBUG(<<"Aucun fichier ne va Ãªtre sorti dans le contexte nommÃ© \""
+                  << this->currentContext->getId() << "\" !");
+      }
+
+      ///---------------------------------------------------------------
+
+   } // namespace data
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/data_treatment.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/data_treatment.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/data_treatment.hpp	(revision 219)
@@ -0,0 +1,141 @@
+#ifndef __XMLIO_CDataTreatment__
+#define __XMLIO_CDataTreatment__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "node_type.hpp"
+#include "mpi_manager.hpp"
+#include "data_output.hpp"
+#include "duration.hpp"
+#include "client.hpp"
+#include "xios_manager.hpp"
+
+namespace xmlioserver
+{
+   namespace data
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CDataTreatment
+      {
+         public :
+
+            /// Construteurs ///
+            CDataTreatment
+               (boost::shared_ptr<CContext> _ctxt =
+                  CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId()));
+
+            CDataTreatment(const CDataTreatment & data_treatment);       // Not implemented yet.
+            CDataTreatment(const CDataTreatment * const data_treatment); // Not implemented yet.
+
+            /// Accesseurs ///
+            const boost::shared_ptr<CContext> getCurrentContext(void) const;
+            const std::vector<boost::shared_ptr<CFile> > & getEnabledFiles  (void) const;
+
+            /// Ecriture et mise Ã  jour du calendrier ///
+            void write_data(const StdString & fieldId,
+                            const StdString & fileId,
+                            const std::deque<ARRAY(double, 1)> & data);
+
+            template <StdSize N>
+               void write_data(const StdString & fieldId, const ARRAY(double, N) & data);
+
+            template <StdSize N>
+               void write_data(const StdString & fieldId, const ARRAY(float, N) & data);
+
+            void update_calendar(int step);
+            void set_timestep(const date::CDuration & duration);
+
+            /// CrÃ©ation des sorties ///
+            template <class T> void createDataOutput(void);
+
+            /// Destructeur ///
+            ~CDataTreatment(void);
+
+         private :
+
+            /// Traitements ///
+            void doTreatment(void);
+
+            void findAllEnabledFields(void);
+            void solveAllGridRef(void);
+            void solveAllOperation(void);
+            void solveAllInheritance(void) const;
+            void findEnabledFiles(void);
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            boost::shared_ptr<CContext> currentContext;
+            std::vector<boost::shared_ptr<CFile> > enabledFiles;
+
+      }; // CDataTreatment
+
+      //----------------------------------------------------------------
+
+      template <class T>
+         void CDataTreatment::createDataOutput(void)
+      {
+         std::vector<boost::shared_ptr<CFile> >::const_iterator
+            it = this->enabledFiles.begin(), end = this->enabledFiles.end();
+         
+         for (; it != end; it++)
+         {
+            boost::shared_ptr<CFile> file = *it;
+            StdString filename = (!file->name.isEmpty())
+                               ? file->name.getValue() : file->getId();
+            StdOStringStream oss;
+            oss << "wk/data/" << filename << "_node" << comm::CMPIManager::GetCommRank() << ".nc";
+            boost::shared_ptr<io::CDataOutput> dout(new T(oss.str(), false));
+            file->initializeDataOutput(dout);
+         }
+      }
+
+      template <StdSize N>
+         void CDataTreatment::write_data
+            (const StdString & fieldId, const ARRAY(float, N) & data)
+      {
+         std::vector<boost::multi_array<double, N>::size_type shape() > shape;
+         const size_type *	shapearr = data->shape();
+
+         shape.assign(shapearr, shapearr + N);
+         ARRAY_CREATE(datad, double, N, shape);
+         datad->assign(data->begin(), data->end());
+
+         this->write_data(fieldId, datad);
+      }
+
+      template <StdSize N>
+         void CDataTreatment::write_data
+            (const StdString & fieldId, const ARRAY(double, N) & data)
+      {
+         const date::CDate & currDate =
+                this->currentContext->getCalendar()->getCurrentDate();
+         const std::vector<boost::shared_ptr<CField> > & refField=
+               CObjectFactory::GetObject<CField>(fieldId)->getAllReference();
+         std::vector<boost::shared_ptr<CField> >::const_iterator
+               it = refField.begin(), end = refField.end();
+
+         for (; it != end; it++)
+         {
+            boost::shared_ptr<CField> field = *it;
+            boost::shared_ptr<CFile>  file  = field->getRelFile();
+            if (field->updateData(currDate, data))
+            {
+               if (CXIOSManager::GetStatus() == CXIOSManager::LOC_CLIENT)
+               { 
+                   boost::shared_ptr<comm::CClient> client = comm::CClient::GetClient();
+                   client.sendData(fieldId, file->getId(), field->getData());
+               }
+               else
+               {
+                  file->getDataOutput()->writeFieldData(field);
+               }
+            }
+            return;
+         }
+
+      }
+
+   } // namespace data
+
+} // namespace xmlioserver
+
+#endif // __XMLIO_CDataTreatment__
Index: /XMLIO_V2/dev/common/src/xmlio/date.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/date.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/date.cpp	(revision 219)
@@ -0,0 +1,177 @@
+#include "date.hpp"
+#include "calendar.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CDate::CDate(const CCalendar& calendar,
+                   int yr, int mth, int d,
+                   int hr, int min, int sec)
+         : relCalendar(calendar)
+         , year(yr), month(mth) , day(d)
+         , hour(hr), minute(min), second(sec)
+      {
+         if(!this->checkDate())
+            DEBUG(<< "La date initialisÃ©e a Ã©tÃ© modifiÃ©e "
+                  << "car elle Ã©tait incorrecte par rapport au calendrier souhaitÃ©.");
+      }
+
+      CDate::CDate(const CDate & date)
+            : relCalendar(date.getRelCalendar()),
+              year(date.year), month(date.month)  , day(date.day),
+              hour(date.hour), minute(date.minute), second(date.second)
+      {
+         if(!this->checkDate())
+            DEBUG(<< "La date initialisÃ©e a Ã©tÃ© modifiÃ©e "
+                  << "car elle Ã©tait incorrecte par rapport au calendrier souhaitÃ©.");
+      }
+
+      CDate::~CDate(void)
+      { /* Ne rien faire de plus */ }
+
+      ///---------------------------------------------------------------
+
+      CDate & CDate::operator=(const CDate & date)
+      {
+         // relCalendar = d.getRelCalendar(); << inutile si fonction bien utilisÃ©e
+         year = date.year; month  = date.month ; day    = date.day;
+         hour = date.hour; minute = date.minute; second = date.second;
+         return (*this);
+      }
+
+      StdOStream & operator<<(StdOStream & out, const CDate & date)
+      {
+         std::streamsize s = out.width (2);
+         char c = out.fill ('0');
+         out << date.day << '/';
+         s = out.width (2); c = out.fill ('0');
+         out << date.month << '/';
+         s = out.width (4); c = out.fill ('0');
+         out << date.year << '-';
+         s = out.width (2); c = out.fill ('0');
+         out << date.hour << ':';
+         s = out.width (2); c = out.fill ('0');
+         out << date.minute << ':';
+         s = out.width (2); c = out.fill ('0');
+         out << date.second;
+         
+         return (out);
+      }
+
+      StdIStream & operator>>(StdIStream & in, CDate & date) // Non testÃ©e.
+      {
+         char c = '/'; // Le caractÃšre c est utilisÃ© pour "recueillir" les sÃ©parateurs "/" et ":".
+         in >> date.day  >> c >> date.month  >> c >> date.year   >> c;
+         in >> date.hour >> c >> date.minute >> c >> date.second;
+         if(!date.checkDate())
+            DEBUG("La date initialisÃ©e (depuis une chaÃ®ne de caractÃšres) "
+                  << "a Ã©tÃ© modifiÃ©e car elle Ã©tait incorrecte "
+                  << "par rapport au calendrier souhaitÃ©.");
+         return (in);
+      }
+
+      CDate::operator Time(void) // Non vÃ©rifiÃ©e, pas optimisÃ©e ...
+      {
+         // Todo : Tester si la date courante est supÃ©rieure Ã  la date initiale.
+         Time retvalue = - relCalendar.getNbSecond(relCalendar.getInitDate())
+                         + relCalendar.getNbSecond(*this);
+
+         if ((relCalendar.getId().compare("D360")    == 0) ||
+             (relCalendar.getId().compare("AllLeap") == 0) ||
+             (relCalendar.getId().compare("NoLeap")  == 0))
+         return (retvalue + (getYear() - relCalendar.getInitDate().getYear())
+                                       * relCalendar.getYearTotalLength(*this));
+
+         for(CDate _d(relCalendar.getInitDate());
+            _d.getYear() < getYear(); _d.setYear(_d.getYear()+1))
+            retvalue += relCalendar.getYearTotalLength(_d);
+         return (retvalue);
+      }
+
+      //----------------------------------------------------------------
+
+      bool CDate::checkDate(void)
+      {
+         bool retValue = true;
+
+         // VÃ©rificatio de la valeur du mois.
+         if (month  < 1) { retValue = false; month  = 1; }
+         if (month  > relCalendar.getYearLength())
+         { retValue = false; month = relCalendar.getYearLength(); }
+
+         // VÃ©rification de la valeur du jour.
+         if (day    < 1) { retValue = false; month  = 1; }
+         if (day    > relCalendar.getMonthLength(*this))
+         { retValue = false; day = relCalendar.getMonthLength(*this); }
+
+         // VÃ©rification de la valeur de l'heure.
+         if (hour   < 0) { retValue = false; hour  = 0; }
+         if (hour   >= relCalendar.getDayLength())
+         { retValue = false; hour = relCalendar.getDayLength()-1; }
+
+         // VÃ©rification de la valeur des minutes.
+         if (minute < 0) { retValue = false; minute = 0; }
+         if (minute >= relCalendar.getHourLength())
+         { retValue = false; minute = relCalendar.getHourLength()-1; }
+
+         // VÃ©rification de la valeur des secondes.
+         if (second < 0) { retValue = false; month  = 0; }
+         if (second >= relCalendar.getMinuteLength())
+         { retValue = false; second = relCalendar.getMinuteLength()-1; }
+
+         return retValue;
+      }
+
+      //----------------------------------------------------------------
+
+      int CDate::getYear  (void) const { return (this->year  ); }
+      int CDate::getMonth (void) const { return (this->month ); }
+      int CDate::getDay   (void) const { return (this->day   ); }
+      int CDate::getHour  (void) const { return (this->hour  ); }
+      int CDate::getMinute(void) const { return (this->minute); }
+      int CDate::getSecond(void) const { return (this->second); }
+
+      //----------------------------------------------------------------
+
+      const CCalendar & CDate::getRelCalendar(void) const
+      { return (this->relCalendar); }
+
+      //----------------------------------------------------------------
+
+      void CDate::setYear  (int newyear)  { this->year  = newyear; }
+      void CDate::setMonth (int newmonth) { this->month = newmonth; }
+
+      //----------------------------------------------------------------
+
+      void CDate::addMonth (int value)
+      {// Value doit Ãªtre Ã©gale Ã  1 ou -1.
+         this->month += value;
+         if (this->month == 13) { year++; this->month = 1 ; }
+         if (this->month == 0 ) { year--; this->month = 12; }
+      }
+
+      //----------------------------------------------------------------
+
+      CDate CDate::FromString(const StdString & str, const CCalendar & calendar)
+      {
+         CDate dt(calendar);
+         StdIStringStream iss(str);
+         iss >> dt;
+         return dt;
+      }
+      
+      //----------------------------------------------------------------
+      
+       StdString CDate::toString(void) const
+      { 
+         StdOStringStream oss;
+         oss << (*this);
+         return (oss.str()); 
+      }
+
+      ///---------------------------------------------------------------
+
+   } // namespace date
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/date.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/date.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/date.hpp	(revision 219)
@@ -0,0 +1,76 @@
+#ifndef __XMLIO_CDate__
+#define __XMLIO_CDate__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+#include "duration.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CCalendar;
+
+      class CDate
+      {
+         public :
+
+            /// Constructeurs ///
+            CDate(void);                      // Not implemented yet
+            CDate(const CCalendar & cal,
+                  int yr = 0, int mth = 1, int d   = 1,
+                  int hr = 0, int min = 0, int sec = 0);
+            CDate(const CDate & odate);
+            CDate(const CDate * const odate); // Not implemented yet
+
+            /// Destructeur ///
+            ~CDate(void);
+
+            /// OpÃ©rateurs ///
+            CDate & operator=(const CDate & date);
+            friend StdOStream & operator<<(StdOStream & out, const CDate & date);
+            friend StdIStream & operator>>(StdIStream & in, CDate & date); // Non testÃ©e.
+
+            operator Time(void);  // Retourne le nombre de secondes Ã©coulÃ©es depuis la date initiale dÃ©finie dans le calendrier.
+
+            /// Traitements ///
+            bool checkDate(void); // VÃ©rifie la validitÃ© de la date.
+
+            /// Divers accesseurs ///
+            int getYear  (void) const;
+            int getMonth (void) const;
+            int getDay   (void) const;
+            int getHour  (void) const;
+            int getMinute(void) const;
+            int getSecond(void) const;
+
+            const CCalendar & getRelCalendar(void) const;
+
+            /// Mutateurs ///
+            void setYear  (int newyear);
+            void setMonth (int newmonth);
+
+            void addMonth (int value);
+
+            /// Autres ///
+            StdString toString(void) const;
+
+         public : /* static */
+
+            static CDate FromString(const StdString & str, const CCalendar & calendar);
+
+         private :
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            const CCalendar & relCalendar; // Calendrier liÃ© Ã  la Date.
+            int year, month, day, hour, minute, second; // AnnÃ©e, mois, ...
+
+
+      }; // class CDate;
+
+   } // namespace date
+} // namespace xmlioserver
+
+#endif // __XMLIO_CDate__
Index: /XMLIO_V2/dev/common/src/xmlio/date/allleap.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/date/allleap.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/date/allleap.cpp	(revision 219)
@@ -0,0 +1,38 @@
+#include "allleap.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CAllLeapCalendar::CAllLeapCalendar(const StdString & dateStr)
+         : CCalendar("AllLeap", dateStr)
+      { /* Ne rien faire de plus */ }
+
+      CAllLeapCalendar::CAllLeapCalendar(int yr, int mth, int d,
+                                         int hr, int min, int sec)
+         : CCalendar("AllLeap", yr, mth, d, hr, min, sec)
+      { /* Ne rien faire de plus */ }
+
+      CAllLeapCalendar::~CAllLeapCalendar(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      int CAllLeapCalendar::getYearTotalLength(const CDate & date) const
+      { return (366 * 86400); }
+
+      int CAllLeapCalendar::getMonthLength(const CDate & date) const
+      {
+         if (date.getMonth() == 2) return (29);
+         return (CCalendar::getMonthLength(date));
+      }
+
+      StdString CAllLeapCalendar::getType(void) const
+      { return (StdString("allleap")); }
+
+      ///--------------------------------------------------------------
+   } // namespace date
+} // namespace xmlioserver
+
Index: /XMLIO_V2/dev/common/src/xmlio/date/allleap.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/date/allleap.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/date/allleap.hpp	(revision 219)
@@ -0,0 +1,41 @@
+#ifndef __XMLIO_CAllLeapCalendar__
+#define __XMLIO_CAllLeapCalendar__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "calendar.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CAllLeapCalendar : public CCalendar
+      {
+            /// Typedef ///
+            typedef CCalendar SuperClass;
+
+         public :
+
+            /// Constructeur ///
+            CAllLeapCalendar(void);                                   // Not implemented yet.
+            CAllLeapCalendar(const StdString & dateStr);
+            CAllLeapCalendar(int yr = 0, int mth = 1, int d   = 1,
+                            int hr = 0, int min = 0, int sec = 0);
+            CAllLeapCalendar(const CAllLeapCalendar & calendar);       // Not implemented yet.
+            CAllLeapCalendar(const CAllLeapCalendar * calendar);       // Not implemented yet.
+
+            /// Accesseurs ///
+            virtual int getYearTotalLength(const CDate & date) const;
+            virtual int getMonthLength(const CDate & date) const;
+            virtual StdString getType(void) const;
+
+            /// Destructeur ///
+            virtual ~CAllLeapCalendar(void);
+
+      }; // class CAllLeapCalendar
+
+   } // namespace date
+} // namespace xmlioserver
+
+#endif // __XMLIO_CAllLeapCalendar__
Index: /XMLIO_V2/dev/common/src/xmlio/date/calendar_type.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/date/calendar_type.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/date/calendar_type.hpp	(revision 219)
@@ -0,0 +1,10 @@
+#ifndef __XMLIO_calendar_type__
+#define __XMLIO_calendar_type__
+
+#include "allleap.hpp"
+#include "d360.hpp"
+#include "gregorian.hpp"
+#include "julian.hpp"
+#include "noleap.hpp"
+
+#endif //__XMLIO_calendar_type__
Index: /XMLIO_V2/dev/common/src/xmlio/date/d360.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/date/d360.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/date/d360.cpp	(revision 219)
@@ -0,0 +1,35 @@
+#include "d360.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CD360Calendar::CD360Calendar(const StdString & dateStr)
+         : CCalendar("D360", dateStr)
+      { /* Ne rien faire de plus */ }
+
+      CD360Calendar::CD360Calendar(int yr, int mth, int d,
+                                   int hr, int min, int sec)
+         : CCalendar("D360", yr, mth, d, hr, min, sec)
+      { /* Ne rien faire de plus */ }
+
+      CD360Calendar::~CD360Calendar(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      int CD360Calendar::getYearTotalLength(const CDate & date) const
+      { return (360 * 86400); }
+
+      int CD360Calendar::getMonthLength(const CDate & date) const
+      { return (30); }
+
+      StdString CD360Calendar::getType(void) const
+      { return (StdString("d360")); }
+
+      ///--------------------------------------------------------------
+   } // namespace date
+} // namespace xmlioserver
+
Index: /XMLIO_V2/dev/common/src/xmlio/date/d360.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/date/d360.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/date/d360.hpp	(revision 219)
@@ -0,0 +1,42 @@
+#ifndef __XMLIO_CD360Calendar__
+#define __XMLIO_CD360Calendar__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "calendar.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CD360Calendar : public CCalendar
+      {
+            /// Typedef ///
+            typedef CCalendar SuperClass;
+
+         public :
+
+            /// Constructeur ///
+            CD360Calendar(void);                                   // Not implemented yet.
+            CD360Calendar(const StdString & dateStr);
+            CD360Calendar(int yr = 0, int mth = 1, int d   = 1,
+                          int hr = 0, int min = 0, int sec = 0);
+            CD360Calendar(const CD360Calendar & calendar);       // Not implemented yet.
+            CD360Calendar(const CD360Calendar * calendar);       // Not implemented yet.
+
+            /// Accesseurs ///
+            virtual int getYearTotalLength(const CDate & date) const;
+            virtual int getMonthLength(const CDate & date) const;
+            virtual StdString getType(void) const;
+
+            /// Destructeur ///
+            virtual ~CD360Calendar(void);
+
+      }; // class CD360Calendar
+
+   } // namespace date
+} // namespace xmlioserver
+
+#endif // __XMLIO_CD360Calendar__
+
Index: /XMLIO_V2/dev/common/src/xmlio/date/gregorian.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/date/gregorian.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/date/gregorian.cpp	(revision 219)
@@ -0,0 +1,51 @@
+#include "gregorian.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CGregorianCalendar::CGregorianCalendar(const StdString & dateStr)
+         : CCalendar("Gregorian", dateStr)
+      { /* Ne rien faire de plus */ }
+
+      CGregorianCalendar::CGregorianCalendar(int yr, int mth, int d,
+                                             int hr, int min, int sec)
+         : CCalendar("Gregorian", yr, mth, d, hr, min, sec)
+      { /* Ne rien faire de plus */ }
+
+      CGregorianCalendar::~CGregorianCalendar(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      int CGregorianCalendar::getYearTotalLength(const CDate & date) const
+      { // Retourne la durÃ©e d'une annÃ©e en seconde.
+         if ((date.getYear() % 4   == 0) &&
+            ((date.getYear() % 100 != 0)  ||
+             (date.getYear() % 400 == 0)  ))
+            return (366 * 86400);
+         return (365 * 86400);
+      }
+
+      int CGregorianCalendar::getMonthLength(const CDate & date) const
+      { // Retourne la durÃ©e du mois en jour.
+         if (date.getMonth() == 2)
+         { // Traitement du cas particulier en FÃ©vrier.
+            if ((date.getYear() % 4   == 0) &&
+               ((date.getYear() % 100 != 0) ||
+                (date.getYear() % 400 == 0) ))
+               return (29);
+            return (28);
+         }
+         return (CCalendar::getMonthLength(date));
+      }
+
+      StdString CGregorianCalendar::getType(void) const
+      { return (StdString("gregorian")); }
+
+      ///--------------------------------------------------------------
+   } // namespace date
+} // namespace xmlioserver
+
Index: /XMLIO_V2/dev/common/src/xmlio/date/gregorian.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/date/gregorian.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/date/gregorian.hpp	(revision 219)
@@ -0,0 +1,41 @@
+#ifndef __XMLIO_CGregorianCalendar__
+#define __XMLIO_CGregorianCalendar__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "calendar.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CGregorianCalendar : public CCalendar
+      {
+            /// Typedef ///
+            typedef CCalendar SuperClass;
+
+         public :
+
+            /// Constructeur ///
+            CGregorianCalendar(void);                                   // Not implemented yet.
+            CGregorianCalendar(const StdString & dateStr);
+            CGregorianCalendar(int yr = 0, int mth = 1, int d   = 1,
+                               int hr = 0, int min = 0, int sec = 0);
+            CGregorianCalendar(const CGregorianCalendar & calendar);       // Not implemented yet.
+            CGregorianCalendar(const CGregorianCalendar * calendar);       // Not implemented yet.
+
+            /// Accesseurs ///
+            virtual int getYearTotalLength(const CDate & date) const;
+            virtual int getMonthLength(const CDate & date) const;
+            virtual StdString getType(void) const;
+
+            /// Destructeur ///
+            virtual ~CGregorianCalendar(void);
+
+      }; // class CGregorianCalendar
+
+   } // namespace date
+} // namespace xmlioserver
+
+#endif // __XMLIO_CGregorianCalendar__
Index: /XMLIO_V2/dev/common/src/xmlio/date/julian.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/date/julian.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/date/julian.cpp	(revision 219)
@@ -0,0 +1,44 @@
+#include "julian.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CJulianCalendar::CJulianCalendar(const StdString & dateStr)
+         : CCalendar("Julian", dateStr)
+      { /* Ne rien faire de plus */ }
+
+      CJulianCalendar::CJulianCalendar(int yr, int mth, int d,
+                                       int hr, int min, int sec)
+         : CCalendar("Julian", yr, mth, d, hr, min, sec)
+      { /* Ne rien faire de plus */ }
+
+      CJulianCalendar::~CJulianCalendar(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      int CJulianCalendar::getYearTotalLength(const CDate & date) const
+      { // Retourne la durÃ©e d'une annÃ©e en seconde.
+         if (date.getYear() % 4 == 0) return (366 * 86400);
+         return (365 * 86400);
+      }
+
+      int CJulianCalendar::getMonthLength(const CDate & date) const
+      { // Retourne la durÃ©e du mois en jour.
+         if (date.getMonth() == 2)
+         {
+            if (date.getYear()%4 == 0) return 29;
+               return 28;
+         }
+         return (CCalendar::getMonthLength(date));
+      }
+
+      StdString CJulianCalendar::getType(void) const
+      { return (StdString("julian")); }
+
+      ///--------------------------------------------------------------
+   } // namespace date
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/date/julian.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/date/julian.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/date/julian.hpp	(revision 219)
@@ -0,0 +1,41 @@
+#ifndef __XMLIO_CJulianCalendar__
+#define __XMLIO_CJulianCalendar__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "calendar.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CJulianCalendar : public CCalendar
+      {
+            /// Typedef ///
+            typedef CCalendar SuperClass;
+
+         public :
+
+            /// Constructeur ///
+            CJulianCalendar(void);                                   // Not implemented yet.
+            CJulianCalendar(const StdString & dateStr);
+            CJulianCalendar(int yr = 0, int mth = 1, int d   = 1,
+                            int hr = 0, int min = 0, int sec = 0);
+            CJulianCalendar(const CJulianCalendar & calendar);       // Not implemented yet.
+            CJulianCalendar(const CJulianCalendar * calendar);       // Not implemented yet.
+
+            /// Accesseurs ///
+            virtual int getYearTotalLength(const CDate & date) const;
+            virtual int getMonthLength(const CDate & date) const;
+            virtual StdString getType(void) const;
+
+            /// Destructeur ///
+            virtual ~CJulianCalendar(void);
+
+      }; // class CJulianCalendar
+
+   } // namespace date
+} // namespace xmlioserver
+
+#endif // __XMLIO_CJulianCalendar__
Index: /XMLIO_V2/dev/common/src/xmlio/date/noleap.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/date/noleap.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/date/noleap.cpp	(revision 219)
@@ -0,0 +1,29 @@
+#include "noleap.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CNoLeapCalendar::CNoLeapCalendar(const StdString & dateStr)
+         : CCalendar("NoLeap", dateStr)
+      { /* Ne rien faire de plus */ }
+
+      CNoLeapCalendar::CNoLeapCalendar(int yr, int mth, int d,
+                                       int hr, int min, int sec)
+         : CCalendar("NoLeap", yr, mth, d, hr, min, sec)
+      { /* Ne rien faire de plus */ }
+
+      CNoLeapCalendar::~CNoLeapCalendar(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      StdString CNoLeapCalendar::getType(void) const
+      { return (StdString("noleap")); }
+
+      ///--------------------------------------------------------------
+   } // namespace date
+} // namespace xmlioserver
+
Index: /XMLIO_V2/dev/common/src/xmlio/date/noleap.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/date/noleap.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/date/noleap.hpp	(revision 219)
@@ -0,0 +1,40 @@
+#ifndef __XMLIO_CNoLeapCalendar__
+#define __XMLIO_CNoLeapCalendar__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "calendar.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CNoLeapCalendar : public CCalendar
+      {
+            /// Typedef ///
+            typedef CCalendar SuperClass;
+
+         public :
+
+            /// Constructeur ///
+            CNoLeapCalendar(void);                                   // Not implemented yet.
+            CNoLeapCalendar(const StdString & dateStr);
+            CNoLeapCalendar(int yr = 0, int mth = 1, int d   = 1,
+                            int hr = 0, int min = 0, int sec = 0);
+            CNoLeapCalendar(const CNoLeapCalendar & calendar);       // Not implemented yet.
+            CNoLeapCalendar(const CNoLeapCalendar * calendar);       // Not implemented yet.
+
+            /// Accesseurs ///
+            virtual StdString getType(void) const;
+
+            /// Destructeur ///
+            virtual ~CNoLeapCalendar(void);
+
+      }; // class CNoLeapCalendar
+
+   } // namespace date
+} // namespace xmlioserver
+
+#endif // __XMLIO_CNoLeapCalendar__
+
Index: /XMLIO_V2/dev/common/src/xmlio/declare_attribute.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/declare_attribute.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/declare_attribute.hpp	(revision 219)
@@ -0,0 +1,43 @@
+#ifndef __XMLIO_DECLARE_ATTRIBUTE__
+#define __XMLIO_DECLARE_ATTRIBUTE__
+
+/// ///////////////////////////// Macros ///////////////////////////// ///
+
+#define DECLARE_ATTRIBUTE(type, name)                             \
+   class name##att : public CAttributeTemplate<type>{             \
+      public :                                                    \
+         name##att(void)                                          \
+            : CAttributeTemplate<type>                            \
+            (#name, *CAttributeMap::Current)                      \
+         { /* Ne rien faire de plus */ }                          \
+         type operator=(const type & value)                       \
+         { return (CAttributeTemplate<type>::operator=(value)); } \
+         virtual ~name##att(void)                                 \
+         { /* Ne rien faire de plus */ }                          \
+   } name;
+
+#define DECLARE_ATTRIBUTE_DEF(type, name, def)                     \
+   class name##att : public CAttributeTemplate<type>{              \
+      public :                                                     \
+         name##att(void)                                           \
+            : CAttributeTemplate<type>                             \
+            (#name, def, *CAttributeMap::Current)                  \
+         { /* Ne rien faire de plus */ }                           \
+         type operator=(const type & value)                        \
+         { return (CAttributeTemplate<type>::operator=(value)); }  \
+         virtual ~name##att(void)                                  \
+         { /* Ne rien faire de plus */ }                           \
+   } name;
+
+#define BEGIN_DECLARE_ATTRIBUTE_MAP(type)                  \
+   class type##Attributes : public virtual CAttributeMap { \
+      public :
+
+#define END_DECLARE_ATTRIBUTE_MAP(type)            \
+         type##Attributes (void) : CAttributeMap() \
+         { /* Ne rien faire de plus */ }           \
+         virtual ~type##Attributes (void)          \
+         { /* Ne rien faire de plus */ }           \
+   };
+
+#endif // __XMLIO_DECLARE_ATTRIBUTE__
Index: /XMLIO_V2/dev/common/src/xmlio/declare_group.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/declare_group.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/declare_group.hpp	(revision 219)
@@ -0,0 +1,30 @@
+#ifndef __XMLIO_DECLARE_GROUP__
+#define __XMLIO_DECLARE_GROUP__
+
+/// ///////////////////////////// Macros ///////////////////////////// ///
+
+#define DECLARE_GROUP(type)                                           \
+   class type##Group                                                  \
+      : public CGroupTemplate<type, type##Group, type##Attributes>    \
+   {                                                                  \
+      public:                                                         \
+         typedef type              RelChild;                          \
+         typedef type##Group       RelGroup;                          \
+         typedef type##Attributes  RelAttributes;                     \
+                                                                      \
+         type##Group(void)                                            \
+            : CGroupTemplate<RelChild, RelGroup, RelAttributes> ()    \
+         { /* Ne rien faire de plus */ }                              \
+         type##Group(const StdString& _id)                            \
+            : CGroupTemplate<RelChild, RelGroup, RelAttributes> (_id) \
+         { /* Ne rien faire de plus */ }                              \
+                                                                      \
+         static ENodeType GetType(void)                               \
+         { return static_cast<ENodeType>(RelChild::GetType()+1); }    \
+                                                                      \
+         virtual ~type##Group(void)                                   \
+         { /* Ne rien faire de plus */ }                              \
+   };                                                                 \
+   typedef type##Group type##Definition
+
+#endif // __XMLIO_DECLARE_GROUP__
Index: /XMLIO_V2/dev/common/src/xmlio/duration.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/duration.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/duration.cpp	(revision 219)
@@ -0,0 +1,134 @@
+#include "duration.hpp"
+#include "date.hpp"
+#include "calendar.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      const CDuration Year   = {1.0, 0.0, 0.0, 0.0, 0.0, 0.0},
+                      Month  = {0.0, 1.0, 0.0, 0.0, 0.0, 0.0},
+                      Week   = {0.0, 0.0, 7.0, 0.0, 0.0, 0.0},
+                      Day    = {0.0, 0.0, 1.0, 0.0, 0.0, 0.0},
+                      Hour   = {0.0, 0.0, 0.0, 1.0, 0.0, 0.0},
+                      Minute = {0.0, 0.0, 0.0, 0.0, 1.0, 0.0},
+                      Second = {0.0, 0.0, 0.0, 0.0, 0.0, 1.0},
+                      NoneDu = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
+
+      ///---------------------------------------------------------------
+
+      CDuration & CDuration::operator=(const CDuration & duration)
+      {
+         year = duration.year;  month  = duration.month ; day    = duration.day;
+         hour = duration.hour;  minute = duration.minute; second = duration.second;
+         return (*this);
+      }
+
+      StdOStream & operator<<(StdOStream & out, const CDuration & duration)
+      {
+         StdOStringStream sout;
+         bool testValue = true;
+         if(duration.year   != 0.0) { testValue = false; sout << duration.year   << "y " ; }
+         if(duration.month  != 0.0) { testValue = false; sout << duration.month  << "mo "; }
+         if(duration.day    != 0.0) { testValue = false; sout << duration.day    << "d " ; }
+         if(duration.hour   != 0.0) { testValue = false; sout << duration.hour   << "h " ; }
+         if(duration.minute != 0.0) { testValue = false; sout << duration.minute << "mi "; }
+         if(duration.second != 0.0 || testValue)       { sout << duration.second << "s " ; }
+
+         // << suppression de l'espace en fin de chaÃ®ne.
+         out << (sout.str().substr(0, sout.str().size()-1));
+         return (out);
+      }
+
+      StdIStream & operator>>(StdIStream & in , CDuration & duration)
+      {
+         duration.year = duration.month  = duration.day    =
+         duration.hour = duration.minute = duration.second = 0.0;
+         double v = 1.0;
+         char   c = '/';
+         while (!in.eof())
+         {
+               in >> v >> c;
+               switch (c)
+               {
+                  case 'y': duration.year   = v; continue;
+                  case 'd': duration.day    = v; continue;
+                  case 'h': duration.hour   = v; continue;
+                  case 's': duration.second = v; continue;
+                  case 'm':
+                     in >> c;
+                     if     (c == 'i') duration.minute = v;
+                     else if(c == 'o') duration.month  = v;
+                     else
+                     {
+                        StdString valc("m"); valc.append(1, c);
+                        DEBUG("La chaine \"" << valc << "\" ne permet pas de dÃ©finir une unitÃ© de durÃ©e.");
+                        continue;
+                     }
+                     continue;
+                  default:
+                     StdString valc; valc.append(1, c);
+                     DEBUG("La chaine \"" << valc << "\" ne permet pas de dÃ©finir une unitÃ© de durÃ©e.");
+                     continue;
+               }
+            }
+            return (in);
+      }
+
+      //-----------------------------------------------------------------
+
+      bool CDuration::isNone(void) const
+      {
+         if ((year == 0) && (month  == 0) && (day    == 0) &&
+             (hour == 0) && (minute == 0) && (second == 0))
+            return (true);
+         return (false);
+      }
+
+      //-----------------------------------------------------------------
+
+      CDuration & CDuration::resolve(const CCalendar & c)
+      {
+         // Simplification de l'Ã©criture des minutes.
+         second += modf(minute, &minute) * (float)c.getMinuteLength();
+         minute += int(second)/c.getMinuteLength(); second = int(second)%c.getMinuteLength();
+
+         // Simplification de l'Ã©criture des heures.
+         minute += modf(hour , &hour) * (float)c.getHourLength();
+         hour   += int(minute)/c.getHourLength(); minute = int(minute)%c.getHourLength();
+
+         // Simplification de l'Ã©criture des jours.
+         hour   += modf(day, &day) * (float)c.getDayLength();
+         day    += int(hour)  /c.getDayLength(); hour   = int(hour)%c.getDayLength();
+
+         // > Aucune Ã©quivalence jour - mois fixÃ©e par avance. //
+
+         // Simplification de l'Ã©criture des annÃ©es.
+         month  += modf(year, &year) * (float)c.getYearLength();
+         year   += int(month) /c.getYearLength(); month  = int(month)%c.getYearLength();
+         return (*this);
+      }
+
+      //-----------------------------------------------------------------
+
+      StdString CDuration::toString(void) const
+      {
+         const  CDuration & own = *this;
+         StdOStringStream oss; oss << own;
+         return (oss.str());
+      }
+
+      CDuration CDuration::FromString(const StdString & str)
+      {
+         CDuration dr = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
+         StdIStringStream iss(str); iss >> dr;
+         return (dr);
+      }
+
+      ///---------------------------------------------------------------
+
+
+   } // namespace date
+} // namespace xmlioserver
+
Index: /XMLIO_V2/dev/common/src/xmlio/duration.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/duration.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/duration.hpp	(revision 219)
@@ -0,0 +1,54 @@
+#ifndef __XMLIO_CDuration__
+#define __XMLIO_CDuration__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+
+namespace xmlioserver
+{
+   namespace date
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      typedef long long int Time;
+      class CCalendar;
+
+      ///---------------------------------------------------------------
+      typedef struct _duration
+      {
+         public :
+
+            /// OpÃ©rateurs ///
+            struct _duration & operator=(const struct _duration& duration);
+
+            friend StdOStream & operator<<(StdOStream & out, const struct _duration& duration);
+            friend StdIStream & operator>>(StdIStream & in , struct _duration& duration);
+
+            /// Test ///
+            bool isNone(void) const;
+
+            /// Traitement ///
+            struct _duration & resolve(const CCalendar & calendar);
+
+            /// Autres ///
+            StdString toString(void) const;
+
+         public: /* static */
+
+            static struct _duration FromString(const StdString & str);
+
+            /// PropriÃ©tÃ©s publiques ///
+            double year, month, day, hour, minute, second;
+
+      } CDuration;
+
+      ///---------------------------------------------------------------
+
+      const extern CDuration Year, Month , Week  , Day    ,
+                             Hour, Minute, Second, NoneDu ;
+      ///---------------------------------------------------------------
+
+   } // namespace date
+} // namespace xmlioserver
+
+#endif // __XMLIO_CDuration__
Index: /XMLIO_V2/dev/common/src/xmlio/exception.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/exception.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/exception.cpp	(revision 219)
@@ -0,0 +1,47 @@
+#include "exception.hpp"
+
+/// boost headers ///
+#include <boost/cast.hpp>
+
+namespace xmlioserver
+{
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+   CException::CException(void)
+      : CObject(), desc_rethrow(true)
+   { /* Ne rien faire de plus */ }
+
+   CException::CException(const StdString & id)
+      : CObject(id), desc_rethrow(true)
+   { /* Ne rien faire de plus */ }
+
+   CException::CException(const CException & exception)
+      : std::basic_ios<char>()
+      , CObject(exception.getId())
+      , StdOStringStream()
+      , desc_rethrow(false)
+   { (*this) << exception.str(); }
+
+   CException::~CException(void)
+   { if (desc_rethrow) throw (*this); }
+
+   //---------------------------------------------------------------
+
+   StdString CException::getMessage(void) const
+   {
+      StdOStringStream oss;
+      oss << "> Error [" << this->getId() << "] : " << this->str();
+      return (oss.str());
+   }
+
+   StdOStringStream &  CException::getStream(void)
+   { return (*boost::polymorphic_cast<StdOStringStream*>(this)); }
+
+   StdString CException::toString(void) const
+   { return (StdString(this->getMessage())); }
+
+   void CException::fromString(const StdString & str)
+   { this->str(str); }
+
+   //---------------------------------------------------------------
+
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/exception.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/exception.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/exception.hpp	(revision 219)
@@ -0,0 +1,56 @@
+#ifndef __XMLIO_CException__
+#define __XMLIO_CException__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "object.hpp"
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   class CException
+      : private CObject, public StdOStringStream
+   {
+         typedef CObject SuperClass;
+
+      public :
+
+         /// Constructeurs ///
+         CException(void);
+         explicit CException(const StdString & id);
+         CException(const CException & exception);
+         CException(const CException * const exception); // Not implemented.
+
+         /// Accesseurs ///
+         StdString getMessage(void) const;
+         StdOStringStream & getStream(void);
+
+         /// Destructeur ///
+         virtual ~CException(void);
+
+         /// Autre ///
+         virtual StdString toString(void) const;
+         virtual void fromString(const StdString & str);
+
+      private :
+
+         /// PropriÃ©tÃ©s ///
+         bool desc_rethrow; // throw destructor
+
+   }; // CException
+} // namespace xmlioserver
+
+/// //////////////////////////// Macros //////////////////////////// ///
+
+#define INFO(x) \
+   "In file \'" __FILE__ "\', line " << __LINE__ << " -> " x << std::endl;
+
+#ifdef XIOS_DEBUG
+#  define DEBUG(x) std::clog << "> Debug " << INFO(x)
+#else
+#  define DEBUG(x)
+#endif
+
+#define ERROR(id, x)  CException(id).getStream() << INFO(x)
+
+#endif // __XMLIO_CException__
Index: /XMLIO_V2/dev/common/src/xmlio/fake_client/fake.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/fake_client/fake.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/fake_client/fake.hpp	(revision 219)
@@ -0,0 +1,29 @@
+#ifndef __XMLIO_FAKE__
+#define __XMLIO_FAKE__
+
+#ifdef __cplusplus
+extern"C"
+{
+#endif //__cplusplus
+
+   // Point d'entrÃ©e du faux client nemo (src/fake_client/fake_nemo.f90)
+   void nemo_fake_entry(MPIComm comm_client,
+                        MPIComm comm_client_grp,
+                        MPIComm comm_client_server);
+
+   // Point d'entrÃ©e du faux client nemo (src/fake_client/fake_lmdz.f90)
+   void lmdz_fake_entry(MPIComm comm_client,
+                        MPIComm comm_client_grp,
+                        MPIComm comm_client_server);
+
+   // Point d'entrÃ©e du faux client nemo (src/fake_client/fake_orchidee.f90)
+   void orchidee_fake_entry(MPIComm comm_client,
+                            MPIComm comm_client_grp,
+                            MPIComm comm_client_server);
+
+
+#ifdef __cplusplus
+}
+#endif //__cplusplus
+
+#endif //__XMLIO_FAKE__
Index: /XMLIO_V2/dev/common/src/xmlio/fake_client/fake_lmdz.f90
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/fake_client/fake_lmdz.f90	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/fake_client/fake_lmdz.f90	(revision 219)
@@ -0,0 +1,33 @@
+! --------------------------------------------------- !
+!          XMLIO SERVER MAIN TEST (LMDZ)              !
+! --------------------------------------------------- !
+
+MODULE LMDZ_FAKE
+
+   ! Modules de la bibliothÃšque xmlioserver
+   USE IXMLIOSERVER
+   USE ISO_C_BINDING
+
+include 'mpif.h'
+
+   CONTAINS
+
+   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+   SUBROUTINE LMDZ_FAKE_ENTRY(comm_client, comm_client_grp, comm_client_server) BIND(C)
+      INTEGER(kind = C_INT), INTENT(IN), VALUE :: comm_client,       & ! communicateur des clients
+                                                  comm_client_grp,   & ! communicateur du groupe de clients
+                                                  comm_client_server   ! communicateur client-serveur
+      INTEGER                                  :: rankGrp, error
+
+      CALL MPI_COMM_RANK(comm_client, rankGrp, error)
+
+      IF (rankGrp .EQ. 0) THEN
+         PRINT*," Starting LMDZ Client Tests ..."
+      END IF
+
+   END SUBROUTINE LMDZ_FAKE_ENTRY
+
+   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+END MODULE LMDZ_FAKE
Index: /XMLIO_V2/dev/common/src/xmlio/fake_client/fake_nemo.f90
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/fake_client/fake_nemo.f90	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/fake_client/fake_nemo.f90	(revision 219)
@@ -0,0 +1,490 @@
+! --------------------------------------------------- !
+!          XMLIO SERVER MAIN TEST (NEMO)              !
+! --------------------------------------------------- !
+
+MODULE NEMO_FAKE
+
+   ! Modules de la bibliothÃšque xmlioserver
+   USE IXMLIOSERVER
+   USE ISO_C_BINDING
+
+include 'mpif.h'
+
+   CONTAINS
+
+   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+   SUBROUTINE NEMO_FAKE_ENTRY(comm_client, comm_client_grp, comm_client_server) BIND(C)
+      INTEGER(kind = C_INT), INTENT(IN), VALUE :: comm_client,       & ! communicateur des clients
+                                                  comm_client_grp,   & ! communicateur du groupe de clients
+                                                  comm_client_server   ! communicateur client-serveur
+      REAL(kind = 8), DIMENSION(10000)  :: real_array
+      INTEGER                           :: rankGrp, sizeGrp, error, i
+      INTEGER                           :: ibegin, iend, jbegin, jend, data_ni, data_ibegin, ni_glo, nj_glo
+      TYPE(XDate)                       :: init_date_nemo  = XDate(1985, 03, 15, 17, 35, 00)
+      TYPE(XHandle)                     :: nemo_style_ctxt = NULLHANDLE
+      TYPE(XHandle)                     :: temp_mod    = NULLHANDLE, &
+                                           temp_mod_   = NULLHANDLE, &
+                                           temp_mod__  = NULLHANDLE, &
+                                           temp_mod___ = NULLHANDLE
+                                           
+      CALL MPI_COMM_RANK(comm_client, rankGrp, error)
+      CALL MPI_COMM_SIZE(comm_client, sizeGrp, error)
+      
+      DO i = 1, 10000
+         real_array(i) = i;
+      END DO
+      
+      IF (rankGrp .EQ. 0) THEN
+          PRINT*," Starting NEMO Client Tests ..."
+      END IF
+
+      ! Parsing du document xml de dÃ©finition Ã  partir d'une faire de caractÃšre.
+      CALL xml_parse_string ("<? xml version=1.0 ?><simulation></simulation>")
+
+      !!!!!!!!!!!!!!!!!!!! EXEMPLE RECONSTRUCTION !!!!!!!!!!!!!!!!!!!!!
+
+      ! On crÃ©e un nouveau context et on lui associe un handle.
+      CALL context_create(context_hdl   = nemo_style_ctxt, &
+                          context_id    = "nemo_style",    &
+                          calendar_type = GREGORIAN,       &
+                          init_date     = init_date_nemo)
+
+      ! ---------> field_definition
+      CALL handle_create(temp_mod, GFIELD,  "field_definition")
+
+      ! Ajout d'un groupe de champ anomyme
+      CALL xml_tree_add(parent_hdl  = temp_mod,        &
+                        parent_type = GFIELD,          &
+                        child_hdl   = temp_mod_,       &
+                        child_type  = GFIELD)
+
+      CALL set_field_attributes(field_hdl      = temp_mod_, &
+                                ftype          = GFIELD,    &
+                                unit_          = "SI",      &
+                                default_value_ = 10E-10_8,  &
+                                prec_          = 8)
+
+      CALL xml_tree_add(parent_hdl  = temp_mod_,       &
+                        parent_type = GFIELD,          &
+                        child_hdl   = temp_mod,        &
+                        child_type  = GFIELD,          &
+                        child_id    = "field_enabled")
+
+      CALL set_field_attributes(field_hdl      = temp_mod,     &
+                                ftype          = GFIELD,       &
+                                operation_     = "instant",    &
+                                enabled_       = .TRUE._1,     &
+                                freq_op_       = "1h")
+
+      CALL xml_tree_add(parent_hdl  = temp_mod,        &
+                        parent_type = GFIELD,          &
+                        child_hdl   = temp_mod__,      &
+                        child_type  = EFIELD,          &
+                        child_id    = "champ_2D_k8_inst")
+
+      CALL set_field_attributes(field_hdl      = temp_mod__,   &
+                                ftype          = EFIELD,       &
+                                name_          = "champ1",     &
+                                standard_name_ = "lechamp1",   &
+                                long_name_     = "le champ 1", &
+                                domain_ref_    = "simple_domaine0")
+
+      CALL xml_tree_add(parent_hdl  = temp_mod,        &
+                        parent_type = GFIELD,          &
+                        child_hdl   = temp_mod__,      &
+                        child_type  = EFIELD,          &
+                        child_id    = "champ_2D_k4_once_dis")
+
+      CALL set_field_attributes(field_hdl      = temp_mod__,   &
+                                ftype          = EFIELD,       &
+                                prec_          = 4,            &
+                                operation_     = "once",       &
+                                enabled_       = .FALSE._1,    &
+                                name_          = "champ2",     &
+                                standard_name_ = "lechamp2",   &
+                                long_name_     = "le champ 2", &
+                                domain_ref_    = "simple_domaine1")
+
+      CALL xml_tree_add(parent_hdl  = temp_mod,        &
+                        parent_type = GFIELD,          &
+                        child_hdl   = temp_mod__,      &
+                        child_type  = EFIELD,          &
+                        child_id    = "champ_3D_k4_once")
+
+      CALL set_field_attributes(field_hdl      = temp_mod__,   &
+                                ftype          = EFIELD,       &
+                                prec_          = 4,            &
+                                operation_     = "once",       &
+                                name_          = "champ3",     &
+                                standard_name_ = "lechamp3",   &
+                                long_name_     = "le champ 3", &
+                                grid_ref_      = "simple_grille")
+
+      CALL xml_tree_add(parent_hdl  = temp_mod,        &
+                        parent_type = GFIELD,          &
+                        child_hdl   = temp_mod__,      &
+                        child_type  = EFIELD,          &
+                        child_id    = "champ_3D_k8_average")
+
+      CALL set_field_attributes(field_hdl      = temp_mod__,   &
+                                ftype          = EFIELD,       &
+                                prec_          = 8,            &
+                                operation_     = "average",    &
+                                name_          = "champ4",     &
+                                standard_name_ = "lechamp4",   &
+                                long_name_     = "le champ 4", &
+                                grid_ref_       = "simple_grille")
+                                
+      CALL xml_tree_add(parent_hdl  = temp_mod,        &
+                        parent_type = GFIELD,          &
+                        child_hdl   = temp_mod__,      &
+                        child_type  = EFIELD,          &
+                        child_id    = "champ_3D_k8_average_zoom")
+
+      CALL set_field_attributes(field_hdl      = temp_mod__,   &
+                                ftype          = EFIELD,       &
+                                prec_          = 8,            &
+                                operation_     = "average",    &
+                                name_          = "champ5",     &
+                                standard_name_ = "lechamp5",   &
+                                long_name_     = "le champ 5", &
+                                grid_ref_      = "simple_grille_zoom")
+
+      CALL xml_tree_add(parent_hdl  = temp_mod_,       &
+                        parent_type = GFIELD,          &
+                        child_hdl   = temp_mod,        &
+                        child_type  = GFIELD,          &
+                        child_id    = "field_disabled")
+
+      CALL set_field_attributes(field_hdl  = temp_mod,  &
+                                ftype      = GFIELD,    &
+                                operation_ = "instant", &
+                                enabled_   = .FALSE._1)
+
+      CALL xml_tree_add(parent_hdl  = temp_mod,        &
+                        parent_type = GFIELD,          &
+                        child_hdl   = temp_mod__,      &
+                        child_type  = EFIELD,          &
+                        child_id    = "champ_3D_k8_inst")
+
+      CALL set_field_attributes(field_hdl      = temp_mod__,       &
+                                ftype          = EFIELD,           &
+                                prec_          = 8,                &
+                                name_          = "champ5",         &
+                                standard_name_ = "lechamp5",       &
+                                long_name_     = "le champ 5",     &
+                                domain_ref_    = "simple_domaine", &
+                                axis_ref_      = "simple_axe")
+
+      ! ---------> axis_definition
+      
+      CALL handle_create(temp_mod, GAXIS,  "axis_definition")
+      CALL xml_tree_add(parent_hdl  = temp_mod,   &
+                        parent_type = GAXIS,      &
+                        child_hdl   = temp_mod_,  &
+                        child_type  = GAXIS,      &
+                        child_id    = "all_axis")
+
+      CALL set_axis_attributes(axis_hdl = temp_mod_, &
+                               ftype    = GAXIS,     &
+                               unit_    = "km")
+
+      CALL xml_tree_add(parent_hdl     = temp_mod_,       &
+                        parent_type    = GAXIS,           &
+                        child_hdl      = temp_mod,        &
+                        child_type     = EAXIS,           &
+                        child_id       = "simple_axe")
+
+      CALL set_axis_attributes(axis_hdl       = temp_mod, &
+                               ftype          = EAXIS,    &
+                               name_          = "axe1",   &
+                               standard_name_ = "laxe1",  &
+                               long_name_     = "l axe1", &
+                               size_          = 30,       &
+                               zvalue_        = real_array(1:30))
+
+      ! ---------> domain_definition
+      CALL handle_create(temp_mod, GDOMAIN,  "domain_definition")
+      CALL xml_tree_add(parent_hdl  = temp_mod,   &
+                        parent_type = GDOMAIN,    &
+                        child_hdl   = temp_mod_,  &
+                        child_type  = GDOMAIN,    &
+                        child_id    = "all_domain")
+                        
+      CALL xml_tree_add(parent_hdl  = temp_mod_,   &
+                        parent_type = GDOMAIN,     &
+                        child_hdl   = temp_mod___, &
+                        child_type  = GDOMAIN,     &
+                        child_id    = "simple_domaine_grp")
+
+
+      ni_glo = 100
+      nj_glo = 50
+      IF (rankGrp .EQ. 0) THEN
+         ibegin = 1
+         iend   = 26
+         jbegin = 1
+         jend   = 50
+         data_ni     = 25
+         data_ibegin = 0
+      ELSE IF (rankGrp .EQ. 1) THEN
+         ibegin = 25
+         iend   = 51
+         jbegin = 1
+         jend   = 50
+         data_ni     = 25
+         data_ibegin = 1
+      ELSE IF (rankGrp .EQ. 2) THEN
+         ibegin = 50
+         iend   = 76
+         jbegin = 1
+         jend   = 50
+         data_ni     = 25
+         data_ibegin = 1
+      ELSE IF (rankGrp .EQ. 3) THEN
+         ibegin = 75
+         iend   = 100
+         jbegin = 1
+         jend   = 50
+         data_ni     = 25
+         data_ibegin = 1         
+      END IF 
+
+      CALL set_domain_attributes(domain_hdl     = temp_mod___,    &
+                                 ftype          = GDOMAIN,        &
+                                 lonvalue_      = real_array(1:((jend-jbegin+1)*(iend-ibegin+1))), &
+                                 latvalue_      = real_array(1:((jend-jbegin+1)*(iend-ibegin+1))), &
+                                 data_dim_      = 2,              &
+                                 ni_glo_        = ni_glo,         &
+                                 nj_glo_        = nj_glo,         &
+                                 ibegin_        = ibegin,         &
+                                 iend_          = iend,           &
+                                 jbegin_        = jbegin,         &
+                                 jend_          = jend,           &
+                                 data_ni_       = data_ni,        &
+                                 data_ibegin_   = data_ibegin)                       
+
+      CALL xml_tree_add(parent_hdl  = temp_mod___,&
+                        parent_type = GDOMAIN,    &
+                        child_hdl   = temp_mod,   &
+                        child_type  = EDOMAIN,    &
+                        child_id    = "simple_domaine0")
+
+      CALL set_domain_attributes(domain_hdl     = temp_mod,       &
+                                 ftype          = EDOMAIN,        &
+                                 name_          = "domaine0",     &
+                                 standard_name_ = "ledomaine0",   &
+                                 long_name_     = "le domaine 0")
+                                 
+      CALL xml_tree_add(parent_hdl  = temp_mod___,&
+                        parent_type = GDOMAIN,    &
+                        child_hdl   = temp_mod,   &
+                        child_type  = EDOMAIN,    &
+                        child_id    = "simple_domaine0_zoom")
+                        
+      CALL set_domain_attributes(domain_hdl     = temp_mod,           &
+                                 ftype          = EDOMAIN,            &
+                                 name_          = "domaine0zoom",     &
+                                 standard_name_ = "ledomaine0zoom",   &
+                                 long_name_     = "le domaine 0 zoom",&
+                                 zoom_ibegin_   = 21,                 &
+                                 zoom_jbegin_   = 5 ,                 &
+                                 zoom_ni_       = 20,                 &
+                                 zoom_nj_       = 15)
+
+      CALL xml_tree_add(parent_hdl  = temp_mod_,  &
+                        parent_type = GDOMAIN,    &
+                        child_hdl   = temp_mod,   &
+                        child_type  = EDOMAIN,    &
+                        child_id    = "simple_domaine1")
+
+
+      ni_glo = 90
+      nj_glo = 20
+      IF (rankGrp .EQ. 0) THEN
+         ibegin = 1
+         iend   = 90
+         jbegin = 1
+         jend   = 5        
+      ELSE IF (rankGrp .EQ. 1) THEN
+         ibegin = 1
+         iend   = 90
+         jbegin = 6
+         jend   = 10
+      ELSE IF (rankGrp .EQ. 2) THEN
+         ibegin = 1
+         iend   = 90
+         jbegin = 11
+         jend   = 15
+      ELSE IF (rankGrp .EQ. 3) THEN
+         ibegin = 1
+         iend   = 90
+         jbegin = 16
+         jend   = 20
+      END IF
+
+      CALL set_domain_attributes(domain_hdl     = temp_mod,       &
+                                 ftype          = EDOMAIN,        &
+                                 name_          = "domaine1",     &
+                                 standard_name_ = "ledomaine1",   &
+                                 long_name_     = "le domaine 1", &
+                                 lonvalue_      = real_array(1:((jend-jbegin+1)*(iend-ibegin+1))), &
+                                 latvalue_      = real_array(1:((jend-jbegin+1)*(iend-ibegin+1))), &
+                                 data_dim_      = 2,              &
+                                 ni_glo_        = ni_glo,         &
+                                 nj_glo_        = nj_glo,         &
+                                 ibegin_        = ibegin,         &
+                                 iend_          = iend,           &
+                                 jbegin_        = jbegin,         &
+                                 jend_          = jend)
+
+      ! ---------> grid_definition
+      CALL handle_create(temp_mod, GGRID, "grid_definition")
+      CALL xml_tree_add(parent_hdl  = temp_mod,   &
+                        parent_type = GGRID,      &
+                        child_hdl   = temp_mod_,  &
+                        child_type  = EGRID,      &
+                        child_id    = "simple_grille")
+
+      CALL set_grid_attributes(grid_hdl     = temp_mod_,         &
+                               ftype        = EGRID,             &
+                               name_        = "grille1",         &
+                               description_ = "la grille 1",     &
+                               domain_ref_  = "simple_domaine1", &
+                               axis_ref_    = "simple_axe")
+                               
+      CALL xml_tree_add(parent_hdl  = temp_mod,   &
+                        parent_type = GGRID,      &
+                        child_hdl   = temp_mod_,  &
+                        child_type  = EGRID,      &
+                        child_id    = "simple_grille_zoom")
+
+      CALL set_grid_attributes(grid_hdl     = temp_mod_,              &
+                               ftype        = EGRID,                  &
+                               name_        = "grille2",              &
+                               description_ = "la grille 2",          &
+                               domain_ref_  = "simple_domaine0_zoom", &
+                               axis_ref_    = "simple_axe")
+
+      ! ---------> file_definition
+      CALL handle_create(temp_mod, GFILE, "file_definition")
+
+      CALL xml_tree_add(parent_hdl  = temp_mod,   &
+                        parent_type = GFILE,      &
+                        child_hdl   = temp_mod_,  &
+                        child_type  = EFILE,      &
+                        child_id    = "simple_fichier1")
+
+      CALL set_file_attributes(file_hdl      = temp_mod_,        &
+                               ftype         = EFILE,            &
+                               name_         = "fichier1",       &
+                               description_  = "mon fichier 1 ", &
+                               output_freq_  = "12h",            &
+                               output_level_ = 3,                &
+                               enabled_      =  .TRUE._1)
+
+      CALL xml_tree_add(parent_hdl  = temp_mod_,  &
+                        parent_type = EFILE,      &
+                        child_hdl   = temp_mod__, &
+                        child_type  = EFIELD)
+                        
+      CALL set_field_attributes(field_hdl      = temp_mod__,       &
+                                ftype          = EFIELD,           &
+                                field_ref_     = "champ_3D_k8_average_zoom")  
+
+      CALL xml_tree_add(parent_hdl  = temp_mod_,  &
+                        parent_type = EFILE,      &
+                        child_hdl   = temp_mod__, &
+                        child_type  = EFIELD)
+
+      CALL set_field_attributes(field_hdl      = temp_mod__,       &
+                                ftype          = EFIELD,           &
+                                field_ref_     = "champ_2D_k8_inst")
+
+      CALL xml_tree_add(parent_hdl  = temp_mod_,  &
+                        parent_type = EFILE,      &
+                        child_hdl   = temp_mod__, &
+                        child_type  = EFIELD)
+
+      CALL set_field_attributes(field_hdl      = temp_mod__,       &
+                                ftype          = EFIELD,           &
+                                field_ref_     = "champ_2D_k4_once_dis")
+
+      CALL xml_tree_add(parent_hdl  = temp_mod_,  &
+                        parent_type = EFILE,      &
+                        child_hdl   = temp_mod__, &
+                        child_type  = EFIELD)
+
+      CALL set_field_attributes(field_hdl      = temp_mod__,       &
+                                ftype          = EFIELD,           &
+                                field_ref_     = "champ_3D_k4_once")
+
+      CALL xml_tree_add(parent_hdl  = temp_mod_,  &
+                        parent_type = EFILE,      &
+                        child_hdl   = temp_mod__, &
+                        child_type  = EFIELD)
+
+      CALL set_field_attributes(field_hdl      = temp_mod__,       &
+                                ftype          = EFIELD,           &
+                                field_ref_     = "champ_3D_k8_average")
+
+      CALL xml_tree_add(parent_hdl  = temp_mod,   &
+                        parent_type = GFILE,      &
+                        child_hdl   = temp_mod_,  &
+                        child_type  = EFILE,      &
+                        child_id    = "simple_fichier2")
+
+      CALL set_file_attributes(file_hdl      = temp_mod_,        &
+                               ftype         = EFILE,            &
+                               name_         = "fichier2",       &
+                               description_  = "mon fichier 2 ", &
+                               output_freq_  = "1d",             &
+                               output_level_ = 3,                &
+                               enabled_      =  .TRUE._1)
+
+      CALL xml_tree_add(parent_hdl  = temp_mod_,  &
+                        parent_type = EFILE,      &
+                        child_hdl   = temp_mod__, &
+                        child_type  = EFIELD)
+
+      CALL set_field_attributes(field_hdl      = temp_mod__,       &
+                                ftype          = EFIELD,           &
+                                field_ref_     = "champ_2D_k8_inst")
+
+      CALL xml_tree_add(parent_hdl  = temp_mod,   &
+                        parent_type = GFILE,      &
+                        child_hdl   = temp_mod_,  &
+                        child_type  = EFILE,      &
+                        child_id    = "simple_fichier3")
+
+      CALL set_file_attributes(file_hdl      = temp_mod_,        &
+                               ftype         = EFILE,            &
+                               name_         = "fichier3",       &
+                               description_  = "mon fichier 3 ", &
+                               output_freq_  = "18h",            &
+                               output_level_ = 5,                &
+                               enabled_      =  .FALSE._1)
+
+      CALL xml_tree_add(parent_hdl  = temp_mod_,  &
+                        parent_type = EFILE,      &
+                        child_hdl   = temp_mod__, &
+                        child_type  = EFIELD)
+
+      CALL set_field_attributes(field_hdl      = temp_mod__,       &
+                                ftype          = EFIELD,           &
+                                field_ref_     = "champ_2D_k8_inst")
+
+      !!!!!!!!!!!!!!!!!!!!!!! DÃ©but du traitement !!!!!!!!!!!!!!!!!!!!!
+
+      ! On choisit le context dans lequel on va travailler
+      ! et on commence le traitement des donnÃ©es.
+      CALL dtreatment_start(nemo_style_ctxt, NETCDF4, comm_client_server)
+      
+      CALL dtreatment_end(nemo_style_ctxt)
+
+   END SUBROUTINE NEMO_FAKE_ENTRY
+
+   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+END MODULE NEMO_FAKE
Index: /XMLIO_V2/dev/common/src/xmlio/fake_client/fake_orchidee.f90
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/fake_client/fake_orchidee.f90	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/fake_client/fake_orchidee.f90	(revision 219)
@@ -0,0 +1,33 @@
+! --------------------------------------------------- !
+!        XMLIO SERVER MAIN TEST (ORCHIDEE)            !
+! --------------------------------------------------- !
+
+MODULE ORCHIDEE_FAKE
+
+   ! Modules de la bibliothÃšque xmlioserver
+   USE IXMLIOSERVER
+   USE ISO_C_BINDING
+
+include 'mpif.h'
+
+   CONTAINS
+
+   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+   SUBROUTINE ORCHIDEE_FAKE_ENTRY(comm_client, comm_client_grp, comm_client_server) BIND(C)
+      INTEGER(kind = C_INT), INTENT(IN), VALUE :: comm_client,       & ! communicateur des clients
+                                                  comm_client_grp,   & ! communicateur du groupe de clients
+                                                  comm_client_server   ! communicateur client-serveur
+      INTEGER                                  :: rankGrp, error
+
+      CALL MPI_COMM_RANK(comm_client, rankGrp, error)
+
+      IF (rankGrp .EQ. 0) THEN
+         PRINT*," Starting ORCHIDEE Client Tests ..."
+      END IF
+
+   END SUBROUTINE ORCHIDEE_FAKE_ENTRY
+
+   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+END MODULE ORCHIDEE_FAKE
Index: /XMLIO_V2/dev/common/src/xmlio/fortran/impi_interface.f90
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/fortran/impi_interface.f90	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/fortran/impi_interface.f90	(revision 219)
@@ -0,0 +1,178 @@
+MODULE IMPI_INTERFACE
+   USE ISO_C_BINDING
+
+include "mpif.h"
+
+   INTEGER (kind = C_INT ), BIND(C, NAME = "mpi_success" )      :: xios_mpi_success      = MPI_SUCCESS
+   INTEGER (kind = C_INT ), BIND(C, NAME = "mpi_comm_world" )   :: xios_mpi_comm_world   = MPI_COMM_WORLD
+   INTEGER (kind = C_INT ), BIND(C, NAME = "mpi_char" )         :: xios_mpi_char         = MPI_CHARACTER
+   INTEGER (kind = C_INT ), BIND(C, NAME = "mpi_status_size" )  :: xios_mpi_status_size  = MPI_STATUS_SIZE
+   INTEGER (kind = C_INT ), BIND(C, NAME = "mpi_any_tag" )      :: xios_mpi_any_tag      = MPI_ANY_TAG
+   INTEGER (kind = C_INT ), BIND(C, NAME = "mpi_request_null" ) :: xios_mpi_request_null = MPI_REQUEST_NULL
+
+   CONTAINS
+
+   ! Initialiser MPI
+   SUBROUTINE xios_mpi_init(err) BIND(C, NAME ="mpi_init")
+      INTEGER  (kind = C_INT) :: err
+      CALL MPI_INIT(err)
+   END SUBROUTINE xios_mpi_init
+
+   ! Quitter MPI
+   SUBROUTINE xios_mpi_finalize(err) BIND(C, NAME ="mpi_finalize")
+      INTEGER  (kind = C_INT) :: err
+      CALL MPI_FINALIZE(err)
+   END SUBROUTINE xios_mpi_finalize
+
+   ! Quitter brutalement MPI
+   SUBROUTINE xios_mpi_abort(comm, errcode, err) BIND(C, NAME ="mpi_abort")
+      INTEGER  (kind = C_INT) :: comm, errcode, err
+      CALL MPI_ABORT(comm, errcode, err)
+   END SUBROUTINE xios_mpi_abort
+
+   ! Savoir si un processus Ã  fait un MPI_INIT
+   SUBROUTINE xios_mpi_initialized(flag, err) BIND(C, NAME ="mpi_initialized")
+      LOGICAL (kind = C_BOOL) :: flag
+      INTEGER (kind = C_INT)  :: err
+      LOGICAL                 :: cflag
+      cflag = flag
+      CALL MPI_INITIALIZED(cflag, err)
+   END SUBROUTINE xios_mpi_initialized
+
+   ! RÃ©cupÃ©rer la chaine de caractÃšres associÃ©e au code d'erreur err
+   SUBROUTINE xios_mpi_error_string(errcode, chaine, taille_chaine, err) &
+                                    BIND(C, NAME ="mpi_error_string")
+      INTEGER (kind = C_INT)                 :: errcode, taille_chaine, err
+      CHARACTER(kind = C_CHAR), DIMENSION(*) :: chaine
+      CHARACTER(len = taille_chaine)         :: cchaine
+      CALL MPI_ERROR_STRING(errcode, cchaine, taille_chaine, err)
+      chaine(taille_chaine) = cchaine
+   END SUBROUTINE xios_mpi_error_string
+
+   ! Envoyer un message Ã  un processus
+   SUBROUTINE xios_mpi_send(buf, count, datatype, dest, tag, comm, err) &
+                            BIND(C, NAME ="mpi_send")
+      CHARACTER(kind = C_CHAR), DIMENSION(*) :: buf
+      INTEGER (kind = C_INT)                 :: dest, count, datatype, tag, comm, err
+      CALL MPI_SEND(buf, count, datatype, dest, tag, comm, err)
+   END SUBROUTINE xios_mpi_send
+
+   ! Recevoir un message d'un processus
+   SUBROUTINE xios_mpi_recv(buf, count, datatype, source, &
+                            tag, comm, status, err)       &
+                            BIND(C, NAME ="mpi_recv")
+      CHARACTER(kind = C_CHAR), DIMENSION(*)              :: buf
+      INTEGER (kind = C_INT)                              :: count, datatype, source, tag, comm, err
+      INTEGER (kind = C_INT) , DIMENSION(mpi_status_size) :: status
+      CALL MPI_RECV(buf, count, datatype, source, tag, comm, status, err)
+   END SUBROUTINE xios_mpi_recv
+
+   ! Envoyer et recevoir un message
+   SUBROUTINE xios_mpi_sendrecv(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, &
+                                recvtype, source, recvtag, comm, status, err) &
+                                BIND(C, NAME ="mpi_sendrecv")
+      CHARACTER(kind = C_CHAR), DIMENSION(*) :: sendbuf, recvbuf
+      INTEGER (kind = C_INT)                 :: sendcount, sendtype, dest, sendtag, recvcount, &
+                                                recvtype, source, recvtag, comm, err
+      INTEGER (kind = C_INT) , DIMENSION(mpi_status_size) :: status
+      CALL MPI_SENDRECV(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, &
+                        recvcount, recvtype, source, recvtag, comm, status, err)
+   END SUBROUTINE xios_mpi_sendrecv
+
+   ! Compter le nombre d'Ã©lÃ©ments reÃ§us
+   SUBROUTINE xios_mpi_get_count(status, datatype, count, err) BIND(C, NAME ="mpi_get_count")
+      INTEGER (kind = C_INT)                 :: datatype, count, err
+      INTEGER (kind = C_INT) , DIMENSION(mpi_status_size) :: status
+      
+      ! ATTTENTION GROS BUG ICI  SOUS GNU MAIS PAS INTEL ???????? voir datatype
+      ! PRINT *, datatype, MPI_CHARACTER, xios_mpi_char
+      CALL MPI_GET_COUNT(status, MPI_CHARACTER, count, err)
+   END SUBROUTINE xios_mpi_get_count
+
+   ! Tester l'arrivÃ©e d'un message
+   SUBROUTINE xios_mpi_iprobe(source, tag, comm, flag, status, err) BIND(C, NAME ="mpi_iprobe")
+      INTEGER (kind = C_INT) :: source, tag, comm, err
+      INTEGER (kind = C_INT) , DIMENSION(mpi_status_size) :: status
+      LOGICAL (kind = C_BOOL) :: flag
+      CALL MPI_IPROBE(source, tag, comm, flag, status, err)
+   END SUBROUTINE xios_mpi_iprobe
+
+   ! Nombre de processus dans un intracommunicateur
+   SUBROUTINE xios_mpi_comm_size(comm, nbre, err) BIND(C, NAME ="mpi_comm_size")
+      INTEGER (kind = C_INT)  :: comm, nbre, err
+      CALL MPI_COMM_SIZE(comm, nbre, err)
+   END SUBROUTINE xios_mpi_comm_size
+
+   ! Rang d'un processus dans un intracommunicateur
+   SUBROUTINE xios_mpi_comm_rank(comm, rang, err) BIND(C, NAME ="mpi_comm_rank")
+      INTEGER (kind = C_INT)  :: comm, rang, err
+      CALL MPI_COMM_RANK(comm, rang, err )
+   END SUBROUTINE xios_mpi_comm_rank
+
+   ! Partage d'un communicateur
+   SUBROUTINE xios_mpi_comm_split(comm, couleur, cle, newcomm, err) BIND(C, NAME ="mpi_comm_split")
+      INTEGER (kind = C_INT)  :: comm, couleur, cle, newcomm, err
+      CALL MPI_COMM_SPLIT(comm, couleur, cle, newcomm, err)
+   END SUBROUTINE xios_mpi_comm_split
+
+   ! Commencer Ã  envoyer un message
+   SUBROUTINE xios_mpi_issend(buf, count, datatype, dest, tag, comm, request, err) &
+                            BIND(C, NAME ="mpi_issend")
+      CHARACTER(kind = C_CHAR), DIMENSION(*) :: buf
+      INTEGER (kind = C_INT)                 :: count, datatype, tag, comm, request, err, dest
+      CALL MPI_ISSEND(buf, count, datatype, dest, tag, comm, request, err)
+   END SUBROUTINE xios_mpi_issend
+
+   ! Commencer Ã  recevoir un message
+   SUBROUTINE xios_mpi_irecv(buf, count, datatype, source, &
+                            tag, comm, request, err)       &
+                            BIND(C, NAME ="mpi_irecv")
+      CHARACTER(kind = C_CHAR), DIMENSION(*)              :: buf
+      INTEGER (kind = C_INT)                              :: count, datatype, source, tag, &
+                                                             comm, request, err
+      CALL MPI_IRECV(buf, count, datatype, source, tag, comm, request, err)
+   END SUBROUTINE xios_mpi_irecv
+
+   ! ComplÃ©ter une opÃ©ration non bloquante
+   SUBROUTINE xios_mpi_wait(request, status, err) BIND(C, NAME ="mpi_wait")
+      INTEGER (kind = C_INT)                              :: request, err
+      INTEGER (kind = C_INT) , DIMENSION(mpi_status_size) :: status
+      CALL MPI_WAIT(request, status, err)
+   END SUBROUTINE xios_mpi_wait
+
+   ! Tester une opÃ©ration non bloquante
+   SUBROUTINE xios_mpi_test(request, flag, status, err) BIND(C, NAME ="mpi_test")
+      INTEGER (kind = C_INT)                              :: request, err
+      INTEGER (kind = C_INT) , DIMENSION(mpi_status_size) :: status
+      LOGICAL (kind = C_BOOL)                             :: flag
+      LOGICAL                                             :: cflag
+      cflag = flag
+      CALL MPI_TEST(request, cflag, status, err)
+   END SUBROUTINE xios_mpi_test
+
+   ! CrÃ©ation d'un communicateur Ã  partir d'un groupe
+   SUBROUTINE xios_mpi_comm_create(comm, group, newcomm, err) BIND(C, NAME ="mpi_comm_create")
+      INTEGER (kind = C_INT) :: comm, group, newcomm, err
+      CALL MPI_COMM_CREATE(comm, group, newcomm, err)
+   END SUBROUTINE xios_mpi_comm_create
+
+   ! Obtention d'une groupe Ã  partir d'un communicateur
+   SUBROUTINE xios_mpi_comm_group(comm, group, err) BIND(C, NAME ="mpi_comm_group")
+      INTEGER (kind = C_INT) :: comm, group, err
+      CALL MPI_COMM_GROUP(comm, group, err)
+   END SUBROUTINE xios_mpi_comm_group
+
+   ! CrÃ©ation de sous-groupe
+   SUBROUTINE xios_mpi_group_incl(group, n, rank, newgroup, err) BIND(C, NAME ="mpi_group_incl")
+      INTEGER (kind = C_INT) :: group, n,  newgroup, err
+      INTEGER (kind = C_INT) , DIMENSION(*) :: rank
+      CALL MPI_GROUP_INCL(group, n, rank, newgroup, err)
+   END SUBROUTINE xios_mpi_group_incl
+
+   ! BarriÃšre
+   SUBROUTINE xios_mpi_barrier (comm, err) BIND (C, NAME ="mpi_barrier")
+      INTEGER (kind = C_INT) :: comm, err
+      CALL MPI_BARRIER(comm, err)
+   END SUBROUTINE xios_mpi_barrier
+
+END MODULE IMPI_INTERFACE
Index: /XMLIO_V2/dev/common/src/xmlio/fortran/impi_interface.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/fortran/impi_interface.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/fortran/impi_interface.hpp	(revision 219)
@@ -0,0 +1,86 @@
+#ifndef __MPI_INTERFACE__
+#define __MPI_INTERFACE
+
+#ifdef __cplusplus
+extern"C"
+{
+#endif //__cplusplus
+
+/// Groupe ///
+extern int mpi_comm_world;
+extern int mpi_success;
+extern int mpi_char;
+extern int mpi_status_size;
+extern int mpi_any_tag;
+extern int mpi_request_null;
+
+
+/// Initialisation / Finalisation ///
+void mpi_init(int * err);
+void mpi_finalize(int * err);
+
+/// Quitter brutalement MPI ///
+void mpi_abort(int * comm, int * errcode, int * err);
+
+/// Savoir si un processus Ã  fait un MPI_INIT ///
+void mpi_initialized(bool * flag, int * err);
+
+/// RÃ©cupÃ©rer la chaine de caractÃšres associÃ©e au code d'erreur err(non fonctionnelle) ///
+void mpi_error_string(int * errcode, char chaine[], int * taille_chaine, int * err);
+
+/// Envoyer un message Ã  un processus ///
+void mpi_send(char buf[], int * count, int * datatype, int * dest, int * tag, int * comm, int * err);
+
+/// Recevoir un message d'un processus ///
+void mpi_recv(char buf[], int * count, int * datatype, int * source,  int * tag, int * comm, int status[], int * err);
+
+/// Envoyer et recevoir un message ///
+void mpi_sendrecv(char sendbuf[], int * sendcount, int * sendtype, int * dest, int * sendtag, int recvbuf[], int * recvcount,
+                  int * recvtype, char source[], int * recvtag, int * comm, int status[], int * err) ;
+
+/// Compter le nombre d'Ã©lÃ©ments reÃ§us ///
+void mpi_get_count(int status[], int * datatype, int * count, int * err);
+
+/// Tester l'arrivÃ©e d'un message ///
+void mpi_iprobe(int * source, int * tag, int * comm, bool * flag, int status[], int * err);
+
+/// Nombre de processus dans un intracommunicateur ///
+void mpi_comm_size(int * comm, int * nbre, int * err);
+
+/// Rang d'un processus dans un intracommunicateur ///
+void mpi_comm_rank(int * comm, int * rang, int * err);
+
+/// Partage d'un communicateur ///
+void mpi_comm_split(int * comm, int * couleur, int * cle, int * newcomm, int * err);
+
+/// Commencer Ã  envoyer un message ///
+void mpi_issend(char * buf, int * count, int * datatype, int * dest,
+                int * tag, int * comm, int * request, int * err);
+
+/// Commencer Ã  recevoir un message ///
+void mpi_irecv(char buf[], int * count, int * datatype, int * source,
+                            int * tag, int * comm, int * request, int * err);
+
+/// ComplÃ©ter une opÃ©ration non bloquante ///
+void mpi_wait(int * request, int status[], int * err);
+
+/// Tester une opÃ©ration non bloquante ///
+void mpi_test(int * request, bool * flag, int status[], int * err);
+
+/// CrÃ©ation d'un communicateur Ã  partir d'un groupe ///
+void mpi_comm_create(int * comm, int * group, int * newcomm, int * err);
+
+/// Obtention d'un groupe Ã  partir d'un communicateur ///
+void mpi_comm_group(int * comm, int * group, int * err);
+
+/// CrÃ©ation de sous-groupe ///
+void mpi_group_incl(int * group, int * n, const int rank[], int * newgroup, int * err);
+
+/// BarriÃšre ///
+void mpi_barrier(int * comm, int * err);
+
+#ifdef __cplusplus
+}
+#endif //__cplusplus
+
+#endif //__MPI_INTERFACE__
Index: /XMLIO_V2/dev/common/src/xmlio/fortran/ixmlioserver.f03.in
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/fortran/ixmlioserver.f03.in	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/fortran/ixmlioserver.f03.in	(revision 219)
@@ -0,0 +1,391 @@
+! --------------------------------------------- !
+!                 IXMLIOSERVER                  !
+!          GESTION DES ENTREES-SORTIES          !
+! --------------------------------------------- !
+
+#include "macro.inc"
+
+MODULE IXMLIOSERVER
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   ! Ne jamais modifier les valeurs internes de ce type dans le code fortran.
+   TYPE XHandle
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE XHandle
+
+   ! enum XDType
+   INTEGER(kind = C_INT), PARAMETER  :: NOTYPE = 0
+   INTEGER(kind = C_INT), PARAMETER  :: DTREATMENT = 1, DDATE = 2, CALENDAR = 3, ECONTEXT = 4
+   INTEGER(kind = C_INT), PARAMETER  :: EAXIS = 5 , EDOMAIN = 6 , EFIELD = 7 , EFILE = 8 , EGRID = 9
+   INTEGER(kind = C_INT), PARAMETER  :: GAXIS = 10, GDOMAIN = 11, GFIELD = 12, GFILE = 13, GGRID = 14
+
+   ! enum XCalendarType
+   INTEGER(kind = C_INT), PARAMETER  :: D360 = 0 , ALLLEAP = 1 , NOLEAP = 2 , JULIAN = 3 , GREGORIAN = 4
+
+   TYPE XDate
+      INTEGER :: year, month, day, hour, minute, second
+   END TYPE XDate
+
+   TYPE XDuration
+      REAL(kind = 8) :: year, month, day, hour, minute, second
+   END TYPE XDuration
+
+   ! Autres constantes
+   TYPE(XHandle)  , PARAMETER :: NULLHANDLE = XHandle(0)
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE xios_handle_create(ret, dtype, idt, idt_size) BIND(C)
+         import C_CHAR, C_INTPTR_T, C_INT
+         INTEGER  (kind = C_INTPTR_T)           :: ret
+         INTEGER  (kind = C_INT), VALUE         :: dtype
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT), VALUE         :: idt_size
+      END SUBROUTINE xios_handle_create
+
+      SUBROUTINE xios_set_timestep(ts_year, ts_month, ts_day,          &
+                                   ts_hour, ts_minute, ts_second) BIND(C)
+         import C_DOUBLE
+         REAL (kind = C_DOUBLE), VALUE :: ts_year, ts_month, ts_day,   &
+                                          ts_hour, ts_minute, ts_second
+      END SUBROUTINE xios_set_timestep
+
+      SUBROUTINE xios_update_calendar(step) BIND(C)
+         import C_INT
+         INTEGER  (kind = C_INT), VALUE :: step
+      END SUBROUTINE xios_update_calendar
+
+      SUBROUTINE xios_xml_tree_add(parent_, parent_type, child_, child_type, child_id, child_id_size) BIND(C)
+         import C_CHAR, C_INT, C_INTPTR_T
+         INTEGER  (kind = C_INTPTR_T), VALUE    :: parent_
+         INTEGER  (kind = C_INT), VALUE         :: parent_type
+         INTEGER  (kind = C_INTPTR_T)           :: child_
+         INTEGER  (kind = C_INT), VALUE         :: child_type
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT), VALUE         :: child_id_size
+      END SUBROUTINE xios_xml_tree_add
+
+      SUBROUTINE  xios_xml_tree_show(filename, filename_size) BIND(C)
+         import C_CHAR, C_INT
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: filename
+         INTEGER  (kind = C_INT), VALUE         :: filename_size
+      END SUBROUTINE xios_xml_tree_show
+
+      SUBROUTINE xios_xml_parse_file(filename, filename_size) BIND(C)
+         import C_CHAR, C_INT
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: filename
+         INTEGER  (kind = C_INT), VALUE         :: filename_size
+      END SUBROUTINE xios_xml_Parse_File
+
+      SUBROUTINE xios_xml_parse_string(xmlcontent, xmlcontent_size) BIND(C)
+         import C_CHAR, C_INT
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: xmlcontent
+         INTEGER  (kind = C_INT), VALUE         :: xmlcontent_size
+      END SUBROUTINE xios_xml_Parse_String
+
+      SUBROUTINE xios_context_set_current(context, withswap) BIND(C)
+         import C_BOOL, C_INT, C_INTPTR_T
+         INTEGER  (kind = C_INTPTR_T), VALUE :: context
+         LOGICAL (kind = C_BOOL), VALUE      :: withswap
+      END SUBROUTINE xios_context_set_current
+
+      SUBROUTINE xios_context_create(context, context_id, context_id_size, calendar_type, &
+                                     year, month, day, hour, minute, second) BIND(C)
+         import C_CHAR, C_INT, C_INTPTR_T
+         INTEGER  (kind = C_INTPTR_T)           :: context
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: context_id
+         INTEGER  (kind = C_INT), VALUE         :: context_id_size
+         INTEGER  (kind = C_INT), VALUE         :: calendar_type, year, month, day, hour, minute, second
+      END SUBROUTINE xios_context_create
+
+      SUBROUTINE xios_dtreatment_start(context_hdl, filetype, comm_client_server) BIND(C)
+         import C_INTPTR_T, C_INT
+         INTEGER  (kind = C_INTPTR_T), VALUE  :: context_hdl
+         INTEGER  (kind = C_INT), VALUE       :: filetype, comm_client_server
+      END SUBROUTINE xios_dtreatment_start
+
+      SUBROUTINE xios_dtreatment_end() BIND(C)
+         ! Sans argument
+      END SUBROUTINE xios_dtreatment_end
+
+      SUBROUTINE xios_write_data(fieldid, fieldid_size, data_k8, data_Xsize, data_Ysize, data_Zsize) BIND(C)
+         import C_INT, C_CHAR, C_PTR, C_FLOAT, C_DOUBLE, C_BOOL
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: fieldid
+         INTEGER  (kind = C_INT),  VALUE        :: fieldid_size
+         REAL(kind = C_DOUBLE), DIMENSION(*)    :: data_k8
+         INTEGER  (kind = C_INT), VALUE         :: data_Xsize, data_Ysize, data_Zsize
+      END SUBROUTINE xios_write_data
+
+#define DECLARE_ATTRIBUTE(type, name) \
+        DECLARE_INTERFACE(axis, type, name)
+#include "../config/axis_attribute.conf"
+
+#undef  DECLARE_ATTRIBUTE
+#define DECLARE_ATTRIBUTE(type, name) \
+        DECLARE_INTERFACE(field, type, name)
+#include "../config/field_attribute.conf"
+
+#undef  DECLARE_ATTRIBUTE
+#define DECLARE_ATTRIBUTE(type, name) \
+        DECLARE_INTERFACE(context, type, name)
+#include "../config/context_attribute.conf"
+
+#undef  DECLARE_ATTRIBUTE
+#define DECLARE_ATTRIBUTE(type, name) \
+        DECLARE_INTERFACE(domain, type, name)
+#include "../config/domain_attribute.conf"
+
+#undef  DECLARE_ATTRIBUTE
+#define DECLARE_ATTRIBUTE(type, name) \
+        DECLARE_INTERFACE(file, type, name)
+#include "../config/file_attribute.conf"
+
+#undef  DECLARE_ATTRIBUTE
+#define DECLARE_ATTRIBUTE(type, name) \
+        DECLARE_INTERFACE(grid, type, name)
+#include "../config/grid_attribute.conf"
+
+   END INTERFACE
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE handle_create(ret, dtype, idt)
+      TYPE(XHandle), INTENT(OUT)     :: ret
+      INTEGER, INTENT(IN)            :: dtype
+      CHARACTER(len = *), INTENT(IN) :: idt
+      CALL xios_handle_create(ret%daddr, dtype, idt, len(idt))
+   END SUBROUTINE handle_create
+
+   SUBROUTINE set_timestep(timestep)
+      TYPE(XDuration), INTENT(IN):: timestep
+      CALL xios_set_timestep(timestep%year, timestep%month , timestep%day,   &
+                             timestep%hour, timestep%minute, timestep%second)
+   END SUBROUTINE set_timestep
+
+   SUBROUTINE update_calendar(step)
+      INTEGER, INTENT(IN):: step
+      IF (step < 1) THEN
+         PRINT *, "L'argument 'step' ne peut Ãªtre nÃ©gatif ou nul"
+         STOP
+      END IF
+      CALL xios_update_calendar(step)
+   END SUBROUTINE update_calendar
+
+   SUBROUTINE xml_tree_add(parent_hdl, parent_type, child_hdl, child_type, child_id)
+      TYPE(XHandle), INTENT(IN)                :: parent_hdl
+      TYPE(XHandle), INTENT(OUT)               :: child_hdl
+      INTEGER, INTENT(IN)                      :: child_type, parent_type
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+      child_hdl = NULLHANDLE
+
+      IF (PRESENT(child_id)) THEN
+         CALL xios_xml_tree_add(parent_hdl%daddr, parent_type, child_hdl%daddr, child_type, child_id, len(child_id))
+      ELSE
+         CALL xios_xml_tree_add(parent_hdl%daddr, parent_type, child_hdl%daddr, child_type, "NONE", -1)
+      END IF
+   END SUBROUTINE xml_tree_add
+
+   SUBROUTINE xml_tree_show(filename)
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: filename
+      IF (PRESENT(filename)) THEN
+         CALL xios_xml_tree_show(filename, len(filename))
+      ELSE
+         CALL xios_xml_tree_show("NONE", -1)
+      END IF
+   END SUBROUTINE xml_tree_show
+
+   SUBROUTINE xml_parse_file(filename)
+      CHARACTER(len = *), INTENT(IN) :: filename
+      CALL xios_xml_Parse_File(filename, len(filename))
+   END SUBROUTINE xml_Parse_File
+
+   SUBROUTINE xml_parse_string(xmlcontent)
+      CHARACTER(len = *), INTENT(IN) :: xmlcontent
+      CALL xios_xml_Parse_String(xmlcontent, len(xmlcontent))
+   END SUBROUTINE xml_Parse_String
+
+   SUBROUTINE context_set_current(context, withswap)
+      TYPE(XHandle), INTENT(IN)                :: context
+      LOGICAL (kind = 1), OPTIONAL, INTENT(IN) :: withswap
+      LOGICAL (kind = 1)                       :: wswap
+      IF (PRESENT(withswap)) THEN
+         wswap = withswap
+      ELSE
+         wswap = .FALSE.
+      END IF
+      CALL xios_context_set_current(context%daddr, wswap)
+   END SUBROUTINE context_set_current
+
+   SUBROUTINE context_create(context_hdl, context_id, calendar_type, init_date)
+      TYPE(XHandle), INTENT(OUT)        :: context_hdl
+      CHARACTER(len = *), INTENT(IN)    :: context_id
+      INTEGER, INTENT(IN)               :: calendar_type
+      TYPE(XDate), INTENT(IN), OPTIONAL :: init_date
+      IF (PRESENT(init_date)) THEN
+         CALL xios_context_create(context_hdl%daddr, context_id, len(context_id), calendar_type, &
+                                  init_date%year, init_date%month, init_date%day,                &
+                                  init_date%hour, init_date%minute, init_date%second)
+      ELSE
+         CALL xios_context_create(context_hdl%daddr, context_id, len(context_id), calendar_type, &
+                                 0, 1, 1, 0, 0, 0)
+      END IF
+   END SUBROUTINE context_create
+
+   SUBROUTINE dtreatment_start(context_hdl, filetype, comm_client_server)
+      TYPE(XHandle), INTENT(IN), VALUE :: context_hdl
+      INTEGER, INTENT(IN), OPTIONAL    :: filetype, comm_client_server
+      INTEGER                          :: filetype_, comm_client_server_
+      
+      IF (PRESENT(filetype)) THEN
+         filetype_ = filetype
+      ELSE
+         filetype_ = NETCDF4
+      END IF
+      
+      IF (PRESENT(comm_client_server)) THEN
+         comm_client_server_ = comm_client_server
+      ELSE
+         comm_client_server_ = -1
+      END IF
+      
+      CALL context_set_current(context_hdl)
+      CALL xios_dtreatment_start(context_hdl%daddr, filetype_, comm_client_server_)
+   END SUBROUTINE dtreatment_start
+
+   SUBROUTINE dtreatment_end(context_hdl)
+      TYPE(XHandle), INTENT(IN), VALUE :: context_hdl
+      CALL context_set_current(context_hdl)
+      CALL xios_dtreatment_end()
+   END SUBROUTINE dtreatment_end
+
+   SUBROUTINE write_data (fieldid,                         &
+                          data1d_k8, data2d_k8, data3d_k8)
+      CHARACTER(len = *), INTENT(IN)                     :: fieldid
+      REAL(kind = 8), DIMENSION(*), OPTIONAL, INTENT(IN) :: data1d_k8(:), data2d_k8(:,:), data3d_k8(:,:,:)
+      IF((.NOT. PRESENT(data1d_k8)) .AND. &
+         (.NOT. PRESENT(data2d_k8)) .AND. &
+         (.NOT. PRESENT(data3d_k8))) THEN
+         PRINT *, "(F2003 interface) Veuillez spÃÂ©cifier des donnÃ©es Ã  Ã©crire !"
+         STOP
+      END IF
+      IF (PRESENT (data1d_k8)) THEN
+         CALL xios_write_data(fieldid, len(fieldid), data1d_k8, &
+                              size(data1d_k8, 1), -1, -1)
+      ELSE IF (PRESENT (data2d_k8)) THEN
+         CALL xios_write_data(fieldid, len(fieldid), data2d_k8, &
+                              size(data2d_k8, 1), size(data2d_k8, 2), -1)
+      ELSE IF (PRESENT (data3d_k8)) THEN
+         CALL xios_write_data(fieldid, len(fieldid), data3d_k8, &
+                              size(data3d_k8, 1), size(data3d_k8, 2), size(data3d_k8, 3))
+      END IF
+   END SUBROUTINE
+
+   SUBROUTINE  set_axis_attributes( axis_hdl, ftype &
+   #undef  DECLARE_ATTRIBUTE
+   #define DECLARE_ATTRIBUTE(type, name) arg_##type(name) &
+   #include "../config/axis_attribute.conf"
+   )
+
+      TYPE(XHandle) :: axis_hdl
+      INTEGER (kind = C_INT)      :: ftype
+      #undef  DECLARE_ATTRIBUTE
+      #define DECLARE_ATTRIBUTE(type, name) def_##type(name)
+      #include "../config/axis_attribute.conf"
+
+      #undef  DECLARE_ATTRIBUTE
+      #define DECLARE_ATTRIBUTE(type, name) ip_##type(axis, name)
+      #include "../config/axis_attribute.conf"
+
+   END SUBROUTINE set_axis_attributes
+
+   SUBROUTINE  set_field_attributes( field_hdl, ftype &
+   #undef  DECLARE_ATTRIBUTE
+   #define DECLARE_ATTRIBUTE(type, name) arg_##type(name) &
+   #include "../config/field_attribute.conf"
+   )
+
+      TYPE(XHandle) :: field_hdl
+      INTEGER (kind = C_INT)      :: ftype
+      #undef  DECLARE_ATTRIBUTE
+      #define DECLARE_ATTRIBUTE(type, name) def_##type(name)
+      #include "../config/field_attribute.conf"
+
+      #undef  DECLARE_ATTRIBUTE
+      #define DECLARE_ATTRIBUTE(type, name) ip_##type(field, name)
+      #include "../config/field_attribute.conf"
+
+   END SUBROUTINE set_field_attributes
+
+   SUBROUTINE  set_context_attributes( context_hdl, ftype &
+   #undef  DECLARE_ATTRIBUTE
+   #define DECLARE_ATTRIBUTE(type, name) arg_##type(name) &
+   #include "../config/context_attribute.conf"
+   )
+
+      TYPE(XHandle) :: context_hdl
+      INTEGER (kind = C_INT)      :: ftype
+      #undef  DECLARE_ATTRIBUTE
+      #define DECLARE_ATTRIBUTE(type, name) def_##type(name)
+      #include "../config/context_attribute.conf"
+
+      #undef  DECLARE_ATTRIBUTE
+      #define DECLARE_ATTRIBUTE(type, name) ip_##type(context, name)
+      #include "../config/context_attribute.conf"
+
+   END SUBROUTINE set_context_attributes
+
+   SUBROUTINE  set_domain_attributes( domain_hdl, ftype &
+   #undef  DECLARE_ATTRIBUTE
+   #define DECLARE_ATTRIBUTE(type, name) arg_##type(name) &
+   #include "../config/domain_attribute.conf"
+   )
+
+      TYPE(XHandle) :: domain_hdl
+      INTEGER (kind = C_INT)      :: ftype
+      #undef  DECLARE_ATTRIBUTE
+      #define DECLARE_ATTRIBUTE(type, name) def_##type(name)
+      #include "../config/domain_attribute.conf"
+
+      #undef  DECLARE_ATTRIBUTE
+      #define DECLARE_ATTRIBUTE(type, name) ip_##type(domain, name)
+      #include "../config/domain_attribute.conf"
+
+   END SUBROUTINE set_domain_attributes
+
+   SUBROUTINE  set_grid_attributes( grid_hdl, ftype &
+   #undef  DECLARE_ATTRIBUTE
+   #define DECLARE_ATTRIBUTE(type, name) arg_##type(name) &
+   #include "../config/grid_attribute.conf"
+   )
+
+      TYPE(XHandle) :: grid_hdl
+      INTEGER (kind = C_INT)      :: ftype
+      #undef  DECLARE_ATTRIBUTE
+      #define DECLARE_ATTRIBUTE(type, name) def_##type(name)
+      #include "../config/grid_attribute.conf"
+
+      #undef  DECLARE_ATTRIBUTE
+      #define DECLARE_ATTRIBUTE(type, name) ip_##type(grid, name)
+      #include "../config/grid_attribute.conf"
+
+   END SUBROUTINE set_grid_attributes
+
+   SUBROUTINE  set_file_attributes( file_hdl, ftype &
+   #undef  DECLARE_ATTRIBUTE
+   #define DECLARE_ATTRIBUTE(type, name) arg_##type(name) &
+   #include "../config/file_attribute.conf"
+   )
+
+      TYPE(XHandle) :: file_hdl
+      INTEGER (kind = C_INT)      :: ftype
+      #undef  DECLARE_ATTRIBUTE
+      #define DECLARE_ATTRIBUTE(type, name) def_##type(name)
+      #include "../config/file_attribute.conf"
+
+      #undef  DECLARE_ATTRIBUTE
+      #define DECLARE_ATTRIBUTE(type, name) ip_##type(file, name)
+      #include "../config/file_attribute.conf"
+
+   END SUBROUTINE set_file_attributes
+
+END MODULE IXMLIOSERVER
Index: /XMLIO_V2/dev/common/src/xmlio/fortran/macro.inc
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/fortran/macro.inc	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/fortran/macro.inc	(revision 219)
@@ -0,0 +1,145 @@
+#define iarg_bool(name) ,name
+#define iarg_double(name) ,name
+#define iarg_int(name) ,name
+#define iarg_StdString(name) ,name iarg_int(name##_size)
+
+#define iarg_ARRAY1(name) ,name iarg_int(name##_extent1)
+#define iarg_ARRAY2(name) iarg_ARRAY1(name) iarg_int(name##_extent2)
+#define iarg_ARRAY3(name) iarg_ARRAY2(name) iarg_int(name##_extent3)
+#define iarg_ARRAY(type, numdim) iarg_ARRAY##numdim
+
+//--------------------------------
+
+#define arg_bool(name) ,name##_
+#define arg_double(name) ,name##_
+#define arg_int(name) ,name##_
+#define arg_StdString(name) ,name##_
+#define arg_ARRAY_(name) ,name##_
+#define arg_ARRAY(type, numdim) arg##_ARRAY_
+
+//---------------------------------
+
+#define dec_bool(name) \
+   LOGICAL (kind = C_BOOL) :: name;
+
+#define dec_int(name) \
+   INTEGER (kind = C_INT) :: name;
+   
+#define dec_double(name) \
+   REAL (kind = C_DOUBLE) :: name;
+
+#define dec_StdString(name) \
+   CHARACTER(kind = C_CHAR), DIMENSION(*) :: name; \
+   dec_int(name##_size)
+
+#define dec_double1(name) \
+   REAL(kind = C_DOUBLE), DIMENSION(*) :: name; \
+   dec_int(name##_extent1)
+#define dec_double2(name) dec_double1(name) dec_int(name##_extent2)
+#define dec_double3(name) dec_double2(name) dec_int(name##_extent3)
+
+#define dec_bool1(name) \
+   LOGICAL(kind = C_BOOL), DIMENSION(*) :: name; \
+   dec_int(name##_extent1)
+#define dec_bool2(name) dec_bool1(name) dec_int(name##_extent2)
+#define dec_bool3(name) dec_bool2(name) dec_int(name##_extent3)
+
+#define dec_int1(name) \
+   INTEGER(kind = C_INT), DIMENSION(*) :: name; \
+   dec_int(name##_extent1)
+#define dec_int2(name) dec_int1(name) dec_int(name##_extent2)
+#define dec_int3(name) dec_int2(name) dec_int(name##_extent3)
+
+#define dec_ARRAY(type, numdim) dec_##type##numdim
+
+//---------------------------------
+
+
+#define def_bool(name) \
+   LOGICAL(kind = 1),  OPTIONAL, INTENT(IN) :: name##_
+
+#define def_int(name) \
+   INTEGER,  OPTIONAL, INTENT(IN) :: name##_
+   
+#define def_double(name) \
+   REAL(kind=8),  OPTIONAL, INTENT(IN) :: name##_
+
+#define def_StdString(name) \
+   CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name##_
+
+
+#define def_double1(name) \
+   REAL(kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: name##_(:)
+#define def_double2(name) \
+   REAL(kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: name##_(:,:)
+#define def_double3(name) \
+   REAL(kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: name##_(:,:,:)
+
+//-
+
+#define def_bool1(name) \
+   LOGICAL(kind = 1), dimension(*), OPTIONAL, INTENT(IN) :: name##_(:)
+#define def_bool2(name) \
+   LOGICAL(kind = 1), dimension(*), OPTIONAL, INTENT(IN) :: name##_(:,:)
+#define def_bool3(name) \
+   LOGICAL(kind = 1), dimension(*), OPTIONAL, INTENT(IN) :: name##_(:,:,:)
+
+//-
+
+#define def_int1(name) \
+   INTEGER, dimension(*), OPTIONAL, INTENT(IN) :: name##_(:)
+#define def_int2(name) \
+   INTEGER, dimension(*), OPTIONAL, INTENT(IN) :: name##_(:,:)
+#define def_int3(name) \
+   INTEGER, dimension(*), OPTIONAL, INTENT(IN) :: name##_(:,:,:)
+
+#define def_ARRAY(type, numdim) def_##type##numdim
+
+//---------------------------------
+
+#define ip_simple(class, name) \
+   IF (PRESENT(name##_)) THEN; \
+      CALL xios_set_##class##_##name(class##_hdl%daddr, ftype, name##_); \
+   END IF;
+
+#define ip_bool(class, name) ip_simple(class, name)
+#define ip_int(class, name) ip_simple(class, name)
+#define ip_double(class, name) ip_simple(class, name)
+
+#define ip_StdString(class, name) \
+   IF (PRESENT(name##_)) THEN; \
+      CALL xios_set_##class##_##name(class##_hdl%daddr, ftype, name##_, len(name##_)); \
+   END IF;
+
+#define ip_ARRAY1(class, name) \
+   IF (PRESENT(name##_)) THEN; \
+      CALL xios_set_##class##_##name(class##_hdl%daddr, ftype, name##_, size(name##_, 1)); \
+   END IF;
+
+#define ip_ARRAY2(class, name) \
+   IF (PRESENT(name##_)) THEN; \
+      CALL xios_set_##class##_##name(class##_hdl%daddr, ftype, name##_, size(name##_, 1), size(name##_, 2)); \
+   END IF;
+
+#define ip_ARRAY3(class, name) \
+    IF (PRESENT(name##_)) THEN; \
+      CALL xios_set_##class##_##name(class##_hdl%daddr, ftype, name##_, size(name##_, 1), size(name##_, 3), size(name##_, 3)); \
+   END IF;
+
+#define ip_ARRAY(type, numdim) ip_ARRAY##numdim
+
+//---------------------------------
+
+#define  DECLARE_INTERFACE(class, type, name)                                           \
+   SUBROUTINE xios_set_##class##_##name(class##_hdl, ftype iarg_##type(name)) BIND(C);  \
+   USE ISO_C_BINDING;                                                                   \
+   INTEGER  (kind = C_INTPTR_T), VALUE :: class##_hdl;                                  \
+   INTEGER  (kind = C_INT), VALUE      :: ftype;                                        \
+   dec_##type(name)                                                                     \
+   END SUBROUTINE xios_set_##class##_##name;                                            \
+//   SUBROUTINE xios_get_##class##_##name(class##_hdl iarg_##type(name)) BIND(C); \
+//   USE ISO_C_BINDING;                                                           \
+//   INTEGER  (kind = C_INTPTR_T), VALUE :: class##_hdl;                          \
+//   dec_##type(name)                                                             \
+//   END SUBROUTINE xios_get_##class##_##name
+
Index: /XMLIO_V2/dev/common/src/xmlio/fortran/preprocess_f03.sh
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/fortran/preprocess_f03.sh	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/fortran/preprocess_f03.sh	(revision 219)
@@ -0,0 +1,15 @@
+#!/bin/bash
+if [[ $# != 2 ]] ; then
+   echo "Usage : ./prepocess_f03.sh <output> <input>"
+   exit
+fi
+
+if test -f $2; then
+   cpp -P -o $1.temp  $2;
+   sed 's/;/\r\n/g' <$1.temp >$1
+   rm -f $1.temp
+else
+   echo "le fichier d'entrÃ©e n'existe pas !"
+fi
+
+
Index: /XMLIO_V2/dev/common/src/xmlio/functor.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/functor.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/functor.cpp	(revision 219)
@@ -0,0 +1,53 @@
+#include "functor.hpp"
+
+namespace xmlioserver
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CFunctor::CFunctor(const StdString & id, ARRAY(double, 1) doutput)
+         : SuperClass(id), doutput(doutput)
+      { /* Ne rien faire de plus */  }
+
+      CFunctor::~CFunctor(void)
+      { /* Ne rien faire de plus */ }
+
+      //---------------------------------------------------------------
+
+      ARRAY(double, 1) CFunctor::getDataOutput(void) const
+      { 
+         return (this->doutput);
+      }
+
+      //---------------------------------------------------------------
+
+      StdString CFunctor::toString(void) const
+      {
+         ERROR("CFunctor::toString()", << "Not implemented yet !");
+         return (SuperClass::getId());
+      }
+
+      void CFunctor::fromString(const StdString & str)
+      {
+         ERROR("CFunctor::fromString(str)",
+                << "[ str = " << str << "] Not implemented yet !");
+      }
+
+      //---------------------------------------------------------------
+
+      ARRAY(double, 1) CFunctor::operator ()(const ARRAY(double, 1) dinput)
+      {
+         if (dinput->size() != this->doutput->size())
+            ERROR("CFunctor::operator ()(dinput)",
+                   << "[ input size = "  << dinput->size()
+                   << ", output size = " << this->doutput->size() << " ]"
+                   << " size of input array !=  size of output array !");
+         this->apply(dinput, this->doutput);
+         return (this->doutput);
+      }
+
+      //---------------------------------------------------------------
+
+   } // namespace func
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/functor.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/functor.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/functor.hpp	(revision 219)
@@ -0,0 +1,56 @@
+#ifndef __XMLIO_CFunctor__
+#define __XMLIO_CFunctor__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+#include "array.hpp"
+
+namespace xmlioserver
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CFunctor : public CObject
+      {
+         /// DÃ©finition de type ///
+         typedef CObject SuperClass;
+         typedef ARRAY(double, 1) DoubleArray;
+
+         public :
+
+            /// Accesseurs ///
+            DoubleArray getDataOutput(void) const;
+            /// OpÃ©rateur ///
+            DoubleArray operator ()(const DoubleArray dinput);
+
+            /// Destructeur ///
+            virtual ~CFunctor(void);
+
+         protected :
+
+            /// Traitement ///
+            virtual void apply(const DoubleArray dinput, DoubleArray doutput) = 0;
+
+            /// Autres ///
+            virtual StdString toString(void) const;
+            virtual void fromString(const StdString & str);
+
+            /// Constructeurs ///
+            CFunctor(void);                             // Not implemented.
+            CFunctor(const StdString & id, DoubleArray doutput);
+            CFunctor(const CFunctor & functor);         // Not implemented.
+            CFunctor(const CFunctor * const functor);   // Not implemented.
+
+         private :
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            DoubleArray doutput;
+            
+      }; // class CFunctor
+   } // namespace func
+} // namespace xmlioserver
+
+#include "functor_type.hpp"
+
+#endif // __XMLIO_CFunctor__
Index: /XMLIO_V2/dev/common/src/xmlio/functor/average.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/functor/average.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/functor/average.cpp	(revision 219)
@@ -0,0 +1,27 @@
+#include "average.hpp"
+
+namespace xmlioserver
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CAverage::CAverage(DoubleArray doutput)
+         : SuperClass(StdString("average"), doutput)
+      { /* Ne rien faire de plus */ }
+
+      CAverage::~CAverage(void)
+      { /* Ne rien faire de plus */ }
+
+      //---------------------------------------------------------------
+
+      void CAverage::apply(const DoubleArray         UNUSED(dinput),
+                                 DoubleArray         UNUSED(doutput))
+      {
+         ERROR("CAverage::apply(...)", << "Not implemented yet !");
+      }
+
+      //---------------------------------------------------------------
+
+   } // namespace func
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/functor/average.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/functor/average.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/functor/average.hpp	(revision 219)
@@ -0,0 +1,38 @@
+#ifndef __XMLIO_CAverage__
+#define __XMLIO_CAverage__
+
+/// xmlioserver headers ///
+#include "functor.hpp"
+
+namespace xmlioserver
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CAverage : public CFunctor
+      {
+         /// DÃ©finition de type ///
+         typedef CFunctor SuperClass;
+         typedef ARRAY(double, 1) DoubleArray;
+
+         public :
+
+            /// Constructeurs ///
+            //CAverage(void);                             // Not implemented.
+            //CAverage(const CFunData & data);
+            CAverage(DoubleArray doutput);
+            //CAverage(const CAverage & average);         // Not implemented.
+            //CAverage(const CAverage * const average);   // Not implemented.
+
+            /// Traitement ///
+            virtual void apply(const DoubleArray dinput, DoubleArray doutput);
+
+            /// Destructeur ///
+            virtual ~CAverage(void);
+
+      }; // class CAverage
+
+   } // namespace func
+} // namespace xmlioserver
+
+#endif //__XMLIO_CAverage__
Index: /XMLIO_V2/dev/common/src/xmlio/functor/functor_type.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/functor/functor_type.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/functor/functor_type.hpp	(revision 219)
@@ -0,0 +1,9 @@
+#ifndef __XMLIO_functor_type__
+#define __XMLIO_functor_type__
+
+#include "average.hpp"
+#include "instant.hpp"
+#include "once.hpp"
+
+#endif //__XMLIO_functor_type__
+
Index: /XMLIO_V2/dev/common/src/xmlio/functor/instant.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/functor/instant.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/functor/instant.cpp	(revision 219)
@@ -0,0 +1,27 @@
+#include "instant.hpp"
+
+namespace xmlioserver
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CInstant::CInstant(DoubleArray doutput)
+         : SuperClass(StdString("instant"), doutput)
+      { /* Ne rien faire de plus */ }
+
+      CInstant::~CInstant(void)
+      { /* Ne rien faire de plus */ }
+
+      //---------------------------------------------------------------
+
+      void CInstant::apply(const DoubleArray         UNUSED(dinput),
+                                 DoubleArray         UNUSED(doutput))
+      {
+         ERROR("CInstant::apply(...)", << "Not implemented yet !");
+      }
+
+      //---------------------------------------------------------------
+
+   } // namespace func
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/functor/instant.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/functor/instant.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/functor/instant.hpp	(revision 219)
@@ -0,0 +1,38 @@
+#ifndef __XMLIO_CInstant__
+#define __XMLIO_CInstant__
+
+/// xmlioserver headers ///
+#include "functor.hpp"
+
+namespace xmlioserver
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CInstant : public CFunctor
+      {
+         /// DÃ©finition de type ///
+         typedef CFunctor SuperClass;
+         typedef ARRAY(double, 1) DoubleArray;
+
+         public :
+
+            /// Constructeurs ///
+            //CInstant(void);                             // Not implemented.
+            //CInstant(const CFunData & data);
+            CInstant(DoubleArray doutput);
+            //CInstant(const CInstant & instant);         // Not implemented.
+            //CInstant(const CInstant * const instant);   // Not implemented.
+
+            /// Traitement ///
+            virtual void apply(const DoubleArray dinput, DoubleArray doutput);
+
+            /// Destructeur ///
+            virtual ~CInstant(void);
+
+      }; // class CInstant
+
+   } // namespace func
+} // namespace xmlioserver
+
+#endif //__XMLIO_CInstant__
Index: /XMLIO_V2/dev/common/src/xmlio/functor/once.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/functor/once.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/functor/once.cpp	(revision 219)
@@ -0,0 +1,28 @@
+#include "once.hpp"
+
+namespace xmlioserver
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      COnce::COnce(DoubleArray doutput)
+         : SuperClass(StdString("once"), doutput)
+      { /* Ne rien faire de plus */ }
+
+      COnce::~COnce(void)
+      { /* Ne rien faire de plus */ }
+
+      //---------------------------------------------------------------
+
+      void COnce::apply(const DoubleArray         UNUSED(dinput),
+                              DoubleArray         UNUSED(doutput))
+      {
+         ERROR("COnce::apply(...)", << "Not implemented yet !");
+      }
+
+      //---------------------------------------------------------------
+
+   } // namespace func
+} // namespace xmlioserver
+
Index: /XMLIO_V2/dev/common/src/xmlio/functor/once.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/functor/once.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/functor/once.hpp	(revision 219)
@@ -0,0 +1,38 @@
+#ifndef __XMLIO_COnce__
+#define __XMLIO_COnce__
+
+/// xmlioserver headers ///
+#include "functor.hpp"
+
+namespace xmlioserver
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class COnce : public CFunctor
+      {
+         /// DÃ©finition de type ///
+         typedef CFunctor SuperClass;
+         typedef ARRAY(double, 1) DoubleArray;
+
+         public :
+
+            /// Constructeurs ///
+            //COnce(void);                       // Not implemented.
+            COnce(DoubleArray doutput);
+            //COnce(const COnce & once);         // Not implemented.
+            //COnce(const COnce * const once);   // Not implemented.
+
+            /// Traitement ///
+            virtual void apply(const DoubleArray dinput, DoubleArray doutput);
+
+            /// Destructeur ///
+            virtual ~COnce(void);
+
+      }; // class COnce
+
+   } // namespace func
+} // namespace xmlioserver
+
+#endif //__XMLIO_COnce__
+
Index: /XMLIO_V2/dev/common/src/xmlio/group_factory.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/group_factory.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/group_factory.cpp	(revision 219)
@@ -0,0 +1,18 @@
+#include "group_factory.hpp"
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+   StdString CGroupFactory::CurrContext("");
+
+   void CGroupFactory::SetCurrentContextId(const StdString & context)
+   { 
+      CGroupFactory::CurrContext = context;
+   }
+
+   StdString & CGroupFactory::GetCurrentContextId(void)
+   { 
+      return (CGroupFactory::CurrContext);
+   }
+
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/group_factory.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/group_factory.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/group_factory.hpp	(revision 219)
@@ -0,0 +1,78 @@
+#ifndef __XMLIO_CGroupFactory__
+#define __XMLIO_CGroupFactory__
+
+/// boost headers ///
+#include <boost/shared_ptr.hpp>
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+#include "object_factory.hpp"
+#include "group_template.hpp"
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   class CGroupFactory
+   {
+      public :
+
+         /// Mutateurs ///
+         static void SetCurrentContextId(const StdString & context);
+
+         template <typename U>
+            static inline void AddGroup(boost::shared_ptr<U> pgroup,
+                                        boost::shared_ptr<U> cgroup);
+
+         template <typename U>
+            static inline void AddChild(boost::shared_ptr<U> group,
+                                        boost::shared_ptr<typename U::RelChild> child);
+
+         /// Accesseurs ///
+         static StdString & GetCurrentContextId(void);
+
+         template <typename U>
+            static inline boost::shared_ptr<U>
+               GetGroup(boost::shared_ptr<U> group, const StdString & id);
+
+         template <typename U>
+            static inline boost::shared_ptr<typename U::RelChild>
+               GetChild(boost::shared_ptr<U> group, const StdString & id);
+
+         template <typename U>
+            static inline int GetGroupNum(boost::shared_ptr<U> group);
+         template <typename U>
+            static inline int GetGroupIdNum(boost::shared_ptr<U> group);
+         template <typename U>
+            static inline int GetChildNum(boost::shared_ptr<U> group);
+         template <typename U>
+            static inline int GetChildIdNum(boost::shared_ptr<U> group);
+
+         /// Tests ///
+         template <typename U>
+            static inline bool HasGroup(boost::shared_ptr<U> group, const StdString & id);
+
+         template <typename U>
+            static inline bool HasChild(boost::shared_ptr<U> group, const StdString & id);
+
+         /// Instanciateur ///
+         template <typename U>
+            static inline boost::shared_ptr<U>
+               CreateGroup(boost::shared_ptr<U> group, const StdString & id = StdString(""));
+
+         template <typename U>
+            static inline boost::shared_ptr<typename U::RelChild>
+               CreateChild(boost::shared_ptr<U> group, const StdString & id = StdString(""));
+
+      private :
+
+         /// PropriÃ©tÃ©s statiques ///
+         static StdString CurrContext;
+
+   }; // class CGroupFactory
+} // namespace xmlioserver
+
+#include "group_factory_impl.hpp"
+#include "group_parser.hpp"
+
+#endif // __XMLIO_CGroupFactory__
Index: /XMLIO_V2/dev/common/src/xmlio/group_factory_impl.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/group_factory_impl.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/group_factory_impl.hpp	(revision 219)
@@ -0,0 +1,136 @@
+#ifndef __XMLIO_CGroupFactory_impl__
+#define __XMLIO_CGroupFactory_impl__
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   template <typename U>
+      void CGroupFactory::AddGroup(boost::shared_ptr<U> pgroup,
+                                   boost::shared_ptr<U> cgroup)
+   {
+      if (cgroup.get() == NULL || pgroup.get() == NULL )
+         ERROR("CGroupFactory::AddGroup(boost::shared_ptr<U> pgroup, boost::shared_ptr<U> cgroup)",
+               << " pgroup or cgroup NULL !");
+      if (!cgroup->hasId())
+         pgroup->groupList.insert(pgroup->groupList.end(), cgroup);
+      else
+      {
+         pgroup->groupList.insert(pgroup->groupList.end(), cgroup);
+         pgroup->groupMap.insert(std::make_pair(cgroup->getId(), cgroup));
+      }
+   }
+
+   template <typename U>
+      void CGroupFactory::AddChild(boost::shared_ptr<U> group,
+                                   boost::shared_ptr<typename U::RelChild> child)
+   {
+      if (group.get() == NULL || child.get() == NULL )
+         ERROR("CGroupFactory::AddGroup(boost::shared_ptr<U> pgroup, boost::shared_ptr<U> cgroup)",
+               << " pgroup or cgroup NULL !");
+      if (!child->hasId())
+         group->childList.insert(group->childList.end(), child);
+      else
+      {
+         group->childList.insert(group->childList.end(), child);
+         group->childMap.insert(std::make_pair(child->getId(), child));
+      }
+   }
+
+   template <typename U>
+      boost::shared_ptr<U>
+         CGroupFactory::CreateGroup(boost::shared_ptr<U> group, const StdString & id)
+   {
+      CObjectFactory::SetCurrentContextId
+      (CGroupFactory::GetCurrentContextId());
+      if (id.size() == 0)
+      {
+         boost::shared_ptr<U> value = CObjectFactory::CreateObject<U>();
+         group->groupList.insert(group->groupList.end(), value);
+         return (value);
+      }
+      else if (CGroupFactory::HasGroup(group, id))
+         return (CGroupFactory::GetGroup(group, id));
+      else
+      {
+         boost::shared_ptr<U> value = CObjectFactory::CreateObject<U>(id);
+         group->groupList.insert(group->groupList.end(), value);
+         group->groupMap.insert(std::make_pair(id, value));
+         return (value);
+      }
+   }
+
+   template <typename U>
+      boost::shared_ptr<typename U::RelChild>
+         CGroupFactory::CreateChild(boost::shared_ptr<U> group, const StdString & id)
+   {
+      CObjectFactory::SetCurrentContextId
+      (CGroupFactory::GetCurrentContextId());
+      if (id.size() == 0)
+      {
+         boost::shared_ptr<typename U::RelChild> value =
+               CObjectFactory::CreateObject<typename U::RelChild>();
+         group->childList.insert(group->childList.end(), value);
+         return (value);
+      }
+      else if (CGroupFactory::HasChild(group, id))
+         return (CGroupFactory::GetChild(group, id));
+      else
+      {
+         boost::shared_ptr<typename U::RelChild> value =
+               CObjectFactory::CreateObject<typename U::RelChild>(id);
+         group->childList.insert(group->childList.end(), value);
+         group->childMap.insert(std::make_pair(id, value));
+         return (value);
+      }
+   }
+
+   template <typename U>
+      bool CGroupFactory::HasGroup(boost::shared_ptr<U> group, const StdString & id)
+   {  return (group->groupMap.find(id) != group->groupMap.end()); }
+
+   template <typename U>
+      bool CGroupFactory::HasChild(boost::shared_ptr<U> group, const StdString & id)
+   {  return (group->childMap.find(id) != group->childMap.end()); }
+
+   template <typename U>
+      int CGroupFactory::GetGroupNum(boost::shared_ptr<U> group)
+   { return (group->groupList.size()); }
+
+   template <typename U>
+      int CGroupFactory::GetGroupIdNum(boost::shared_ptr<U> group)
+   { return (group->groupMap.size()); }
+
+   template <typename U>
+      int CGroupFactory::GetChildNum(boost::shared_ptr<U> group)
+   { return (group->childList.size()); }
+
+   template <typename U>
+      int CGroupFactory::GetChildIdNum(boost::shared_ptr<U> group)
+   { return (group->childMap.size()); }
+
+   template <typename U>
+      boost::shared_ptr<U>
+         CGroupFactory::GetGroup(boost::shared_ptr<U> group, const StdString & id)
+   {
+      if (!CGroupFactory::HasGroup<U>(group, id))
+         ERROR("CGroupFactory::GetGroup(boost::shared_ptr<U> group, const StdString & id)",
+               << "[ id = " << id << ", U = " << U::GetName() << " ] "
+               << " group is not referenced !");
+      return (group->groupMap[id]);
+   }
+
+   template <typename U>
+      boost::shared_ptr<typename U::RelChild>
+         CGroupFactory::GetChild(boost::shared_ptr<U> group, const StdString & id)
+   {
+      if (!CGroupFactory::HasChild<U>(group, id))
+         ERROR("CGroupFactory::GetChild(boost::shared_ptr<U> group, const StdString & id)",
+               << "[ id = " << id << ", U = " << U::GetName() << " ] "
+               << " child is not referenced !");
+      return (group->childMap[id]);
+   }
+
+} // namespace xmlioserver
+
+#endif // __XMLIO_CGroupFactory_impl__
Index: /XMLIO_V2/dev/common/src/xmlio/group_parser.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/group_parser.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/group_parser.hpp	(revision 219)
@@ -0,0 +1,72 @@
+#ifndef __XMLIO_GroupParser__
+#define __XMLIO_GroupParser__
+
+/// boost headers ///
+#include <boost/cast.hpp>
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node, bool withAttr)
+   {
+
+      StdString name = node.getElementName();
+      if (withAttr)
+         CGroupTemplate<U, V, W>::SuperClass::parse(node);
+
+      // PARSING POUR GESTION DES ENFANTS
+      xml::THashAttributes attributes;
+      boost::shared_ptr<V> group_ptr = (this->hasId())
+         ? CObjectFactory::GetObject<V>(this->getId())
+         : CObjectFactory::GetObject(boost::polymorphic_downcast<V*>(this));
+
+      if (!(node.goToChildElement()))
+      {
+         if (this->hasId())
+         {
+            DEBUG(<< "L'objet de type \'" << V::GetName()
+                  << "\' nommÃ© \'" << this->getId()
+                  << "\' ne contient pas d\'enfant !");
+         }
+      }
+      else
+      {
+         do { // Parcours pour traitement.
+
+            StdString name = node.getElementName();
+            attributes.clear();
+            attributes = node.getAttributes();
+
+            if (name.compare(V::GetName()) == 0)
+            {
+               if (attributes.end() == attributes.find("id"))
+                  CGroupFactory::CreateGroup(group_ptr)->parse(node);
+               else
+                  CGroupFactory::CreateGroup(group_ptr, attributes["id"])->parse(node);
+               continue;
+            }
+
+            if (name.compare(U::GetName()) == 0)
+            {
+               if (attributes.end() == attributes.find("id"))
+                  CGroupFactory::CreateChild(group_ptr)->parse(node);
+               else
+                  CGroupFactory::CreateChild(group_ptr, attributes["id"])->parse(node);
+               continue;
+            }
+
+            DEBUG(<< "Dans le contexte \'" << CObjectFactory::GetCurrentContextId()
+                  << "\', un objet de type \'" << V::GetName()
+                  << "\' ne peut contenir qu'un objet de type \'" << V::GetName()
+                  << "\' ou de type \'" << U::GetName()
+                  << "\' !");
+
+         } while (node.goToNextElement());
+         node.goToParentElement(); // Retour au parent
+      }
+   }
+
+} // namespace xmlioserver
+
+#endif // __XMLIO_GroupParser__
Index: /XMLIO_V2/dev/common/src/xmlio/group_template.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/group_template.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/group_template.hpp	(revision 219)
@@ -0,0 +1,84 @@
+#ifndef __XMLIO_CGroupTemplate__
+#define __XMLIO_CGroupTemplate__
+
+#include "declare_attribute.hpp"
+
+namespace xmlioserver
+{
+   using namespace tree;
+
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   template <class U, class V, class W>
+      class CGroupTemplate
+         : public CObjectTemplate<V>, public virtual W
+   {
+         /// Friend ///
+         friend class CGroupFactory;
+
+         /// Typedef ///
+         typedef U Child;
+         typedef V Derived, Group;
+         typedef W SuperClassAttribute;
+         typedef CObjectTemplate<V> SuperClass;
+
+      public :
+
+         /// SpÃ©cifique ///
+         DECLARE_ATTRIBUTE(StdString, group_ref)
+
+         /// Accesseurs ///
+         const xios_map<StdString,
+                           boost::shared_ptr<Group> >& getGroupMap(void) const;
+         const std::vector<boost::shared_ptr<Child> >& getChildList(void) const;
+
+         void getAllChildren(std::vector<boost::shared_ptr<Child> > & allc) const;
+         std::vector<boost::shared_ptr<Child> > getAllChildren(void) const;
+
+         /// Autres ///
+         virtual StdString toString(void) const;
+         virtual void fromString(const StdString & str);
+         
+         virtual void toBinary  (StdOStream & os) const;
+         virtual void fromBinary(StdIStream & is);
+
+         virtual void parse(xml::CXMLNode & node);
+         inline void parse(xml::CXMLNode & node, bool withAttr);
+         
+         /// Test ///
+         virtual bool hasChild(void) const;
+
+         /// Accesseurs statiques ///
+         static inline StdString GetName(void);
+         static inline StdString GetDefName(void);
+
+         /// Traitements ///
+         virtual void solveDescInheritance(const CAttributeMap * const parent = 0);
+         void solveRefInheritance(void);
+
+         /// Destructeur ///
+         virtual ~CGroupTemplate(void);
+
+      protected :
+
+         /// Constructeurs ///
+         CGroupTemplate(void);
+         CGroupTemplate(const StdString & id);
+         CGroupTemplate(const CGroupTemplate<U, V, W> & group,
+                        bool withAttrList = true, bool withId = true); // Not implemented yet.
+         CGroupTemplate(const CGroupTemplate<U, V, W> * const group);  // Not implemented yet.
+
+      private :
+
+         /// PropriÃ©tÃ©s ///
+         xios_map<StdString,
+                     boost::shared_ptr<Child> > childMap;
+         std::vector<boost::shared_ptr<Child> > childList;
+
+         xios_map<StdString,
+                     boost::shared_ptr<Group> > groupMap;
+         std::vector<boost::shared_ptr<Group> > groupList;
+
+   }; // class CGroupTemplate
+} // namespace xmlioserver
+
+#endif // __XMLIO_CGroupTemplate__
Index: /XMLIO_V2/dev/common/src/xmlio/group_template_impl.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/group_template_impl.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/group_template_impl.hpp	(revision 219)
@@ -0,0 +1,315 @@
+#ifndef __XMLIO_CGroupTemplate_impl__
+#define __XMLIO_CGroupTemplate_impl__
+
+namespace xmlioserver
+{
+   using namespace tree;
+
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   template <class U, class V, class W>
+      CGroupTemplate<U, V, W>::CGroupTemplate(void)
+         : CObjectTemplate<V>() //, V()
+         , childMap(), childList()
+         , groupMap(), groupList()
+   { /* Ne rien faire de plus */ }
+
+   template <class U, class V, class W>
+      CGroupTemplate<U, V, W>::CGroupTemplate(const StdString & id)
+         : CObjectTemplate<V>(id) //, V()
+         , childMap(), childList()
+         , groupMap(), groupList()
+   { /* Ne rien faire de plus */ }
+
+   template <class U, class V, class W>
+      CGroupTemplate<U, V, W>::~CGroupTemplate(void)
+   { /* Ne rien faire de plus */ }
+   
+   ///--------------------------------------------------------------
+   
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::toBinary(StdOStream & os) const
+   {
+      SuperClass::toBinary(os);
+      
+      const StdSize grpnb = this->groupList.size();
+      const StdSize chdnb = this->childList.size();
+      tree::ENodeType cenum = U::GetType();
+      tree::ENodeType genum = V::GetType();
+      
+      os.write (reinterpret_cast<const char*>(&grpnb) , sizeof(StdSize));
+      os.write (reinterpret_cast<const char*>(&chdnb) , sizeof(StdSize));      
+      
+      typename std::vector<boost::shared_ptr<V> >::const_iterator 
+         itg = this->groupList.begin(), endg = this->groupList.end();
+      typename std::vector<boost::shared_ptr<U> >::const_iterator 
+         itc = this->childList.begin(), endc = this->childList.end();
+            
+      for (; itg != endg; itg++)
+      { 
+         boost::shared_ptr<V> group = *itg;
+         bool hid = group->hasId();
+         
+         os.write (reinterpret_cast<const char*>(&genum), sizeof(tree::ENodeType));      
+         os.write (reinterpret_cast<const char*>(&hid), sizeof(bool));
+         
+         if (hid)
+         {
+            const StdString & id = group->getId();
+            const StdSize size   = id.size();
+               
+            os.write (reinterpret_cast<const char*>(&size), sizeof(StdSize));
+            os.write (id.data(), size * sizeof(char));         
+         }              
+         group->toBinary(os);
+      }
+            
+      for (; itc != endc; itc++)
+      { 
+         boost::shared_ptr<U> child = *itc;
+         bool hid = child->hasId();
+         
+         os.write (reinterpret_cast<const char*>(&cenum), sizeof(tree::ENodeType));
+         os.write (reinterpret_cast<const char*>(&hid), sizeof(bool));
+         
+         if (hid)
+         {
+            const StdString & id = child->getId();
+            const StdSize size   = id.size();
+               
+            os.write (reinterpret_cast<const char*>(&size), sizeof(StdSize));
+            os.write (id.data(), size * sizeof(char));         
+         }         
+         child->toBinary(os);
+      }
+      
+   }
+   
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::fromBinary(StdIStream & is)
+   {
+      SuperClass::fromBinary(is);
+      
+      boost::shared_ptr<V> group_ptr = (this->hasId())
+         ? CObjectFactory::GetObject<V>(this->getId())
+         : CObjectFactory::GetObject(boost::polymorphic_downcast<V*>(this));
+      
+      StdSize grpnb = 0;
+      StdSize chdnb = 0;
+      tree::ENodeType renum = Unknown;
+      
+      is.read (reinterpret_cast<char*>(&grpnb), sizeof(StdSize));
+      is.read (reinterpret_cast<char*>(&chdnb), sizeof(StdSize));
+      
+      for (StdSize i = 0; i < grpnb; i++)
+      {
+         bool hid = false;
+         is.read (reinterpret_cast<char*>(&renum), sizeof(tree::ENodeType));
+         is.read (reinterpret_cast<char*>(&hid), sizeof(bool));
+         
+         if (renum != V::GetType())
+            ERROR("CGroupTemplate<U, V, W>::fromBinary(StdIStream & is)",
+                  << "[ renum = " << renum << "] Bad type !");
+                        
+         if (hid)
+         {
+            StdSize size  = 0;
+            is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+            StdString id(size, ' ');
+            is.read (const_cast<char *>(id.data()), size * sizeof(char));
+            CGroupFactory::CreateGroup(group_ptr, id)->fromBinary(is);
+         }
+         else
+         {
+            CGroupFactory::CreateGroup(group_ptr)->fromBinary(is);
+         }
+      }
+      
+      for (StdSize j = 0; j < chdnb; j++)
+      {
+         bool hid = false;
+         is.read (reinterpret_cast<char*>(&renum), sizeof(tree::ENodeType));
+         is.read (reinterpret_cast<char*>(&hid), sizeof(bool));
+         
+         if (renum != U::GetType())
+            ERROR("CGroupTemplate<U, V, W>::fromBinary(StdIStream & is)",
+                  << "[ renum = " << renum << "] Bad type !");
+                  
+         if (hid)
+         {
+            StdSize size  = 0;
+            is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+            StdString id(size, ' ');
+            is.read (const_cast<char *>(id.data()), size * sizeof(char));
+            CGroupFactory::CreateChild(group_ptr, id)->fromBinary(is);            
+         }
+         else
+         {
+            CGroupFactory::CreateChild(group_ptr)->fromBinary(is);
+         }   
+      }
+   }
+
+   //--------------------------------------------------------------
+
+   template <class U, class V, class W>
+      StdString CGroupTemplate<U, V, W>::toString(void) const
+   {
+      StdOStringStream oss;
+      StdString name = (this->getId().compare(V::GetDefName()) != 0)
+                     ? V::GetName() : V::GetDefName();
+
+      oss << "<" << name << " ";
+      if (this->hasId() && (this->getId().compare(V::GetDefName()) != 0))
+         oss << " id=\"" << this->getId() << "\" ";
+         
+      if (this->hasChild())
+      {
+         oss << SuperClassAttribute::toString() << ">" << std::endl;
+         
+         typename std::vector<boost::shared_ptr<V> >::const_iterator 
+            itg = this->groupList.begin(), endg = this->groupList.end();
+         typename std::vector<boost::shared_ptr<U> >::const_iterator 
+            itc = this->childList.begin(), endc = this->childList.end();
+            
+         for (; itg != endg; itg++)
+         { 
+            boost::shared_ptr<V> group = *itg;
+            oss << *group << std::endl;
+         }
+            
+         for (; itc != endc; itc++)
+         { 
+            boost::shared_ptr<U> child = *itc;
+            oss << *child << std::endl;
+         }
+            
+         oss << "</" << name << " >";
+      }
+      else
+      {
+         oss << SuperClassAttribute::toString() << "/>";
+      }
+      return (oss.str());
+   }
+
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::fromString(const StdString & str)
+   { 
+      ERROR("CGroupTemplate<U, V, W>::toString(void)",
+            << "[ str = " << str << "] Not implemented yet !");
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      StdString CGroupTemplate<U, V, W>::GetName(void)
+   { 
+      return (U::GetName().append("_group")); 
+   }
+
+   template <class U, class V, class W>
+      StdString CGroupTemplate<U, V, W>::GetDefName(void)
+   { 
+      return (U::GetName().append("_definition")); 
+   }
+   
+   //---------------------------------------------------------------   
+
+   template <class U, class V, class W>
+      const std::vector<boost::shared_ptr<U> >&
+         CGroupTemplate<U, V, W>::getChildList(void) const
+   { 
+      return (this->childList); 
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      const xios_map<StdString, boost::shared_ptr<V> >&
+         CGroupTemplate<U, V, W>::getGroupMap(void) const
+   { 
+      return (this->groupList);
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      bool CGroupTemplate<U, V, W>::hasChild(void) const
+   { 
+      return ((groupList.size() + childList.size()) > 0); 
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node)
+   { 
+      this->parse(node, true); 
+   }
+   
+   //---------------------------------------------------------------
+   
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::solveDescInheritance(const CAttributeMap * const parent)
+   {
+      if (parent != NULL)
+         SuperClassAttribute::setAttributes(parent);
+         
+      typename std::vector<boost::shared_ptr<U> >::const_iterator 
+         itc = this->childList.begin(), endc = this->childList.end();
+      typename std::vector<boost::shared_ptr<V> >::const_iterator 
+         itg = this->groupList.begin(), endg = this->groupList.end();
+             
+      for (; itc != endc; itc++)
+      { 
+         boost::shared_ptr<U> child = *itc;
+         child->solveDescInheritance(this);
+      }
+            
+      for (; itg != endg; itg++)
+      { 
+         boost::shared_ptr<V> group = *itg;
+         group->solveRefInheritance();
+         group->solveDescInheritance(this);
+      }
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::getAllChildren(std::vector<boost::shared_ptr<U> > & allc) const
+   {
+      allc.insert (allc.end(), childList.begin(), childList.end());
+      typename std::vector<boost::shared_ptr<V> >::const_iterator 
+         itg = this->groupList.begin(), endg = this->groupList.end();
+         
+      for (; itg != endg; itg++)
+      { 
+         boost::shared_ptr<V> group = *itg;
+         group->getAllChildren(allc);
+      }
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      std::vector<boost::shared_ptr<U> > CGroupTemplate<U, V, W>::getAllChildren(void) const
+   { 
+      std::vector<boost::shared_ptr<U> > allc;
+      this->getAllChildren(allc);
+      return (allc);
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::solveRefInheritance(void)
+   { /* Ne rien faire de plus */ }
+
+   ///--------------------------------------------------------------
+
+} // namespace xmlioserver
+
+
+#endif // __XMLIO_CGroupTemplate_impl__
Index: /XMLIO_V2/dev/common/src/xmlio/iface/interface.cpp.in
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/iface/interface.cpp.in	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/iface/interface.cpp.in	(revision 219)
@@ -0,0 +1,396 @@
+#include "macro.inc"
+
+INCLUDE "../xmlioserver.hpp"
+
+INCLUDE "attribute_template_impl.hpp"
+INCLUDE "object_template_impl.hpp"
+INCLUDE "group_template_impl.hpp"
+
+INCLUDE "calendar_type.hpp"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif //__cplusplus
+
+typedef xmlioserver::tree::CAxis    caxis;
+typedef xmlioserver::tree::CField   cfield;
+typedef xmlioserver::tree::CDomain  cdomain;
+typedef xmlioserver::tree::CGrid    cgrid;
+typedef xmlioserver::tree::CFile    cfile;
+typedef xmlioserver::tree::CContext ccontext;
+
+typedef xmlioserver::tree::CAxisGroup    caxisgroup;
+typedef xmlioserver::tree::CFieldGroup   cfieldgroup;
+typedef xmlioserver::tree::CDomainGroup  cdomaingroup;
+typedef xmlioserver::tree::CGridGroup    cgridgroup;
+typedef xmlioserver::tree::CFileGroup    cfilegroup;
+typedef xmlioserver::tree::CContextGroup ccontextgroup;
+
+
+typedef long int XInt, XSize; // Integer
+typedef bool     XBool;       // Logical
+typedef void   * XPtr;        // Pointeur C non typÃÂ©
+typedef char   * XString;     // Pointeur C non typÃÂ©
+
+typedef enum
+{
+   NOTYPE = 0,
+   DTREATMENT/* UNUSED */, DATE, CALENDAR, ECONTEXT,
+   EAXIS, EDOMAIN, EFIELD, EFILE, EGRID,
+   GAXIS, GDOMAIN, GFIELD, GFILE, GGRID
+} XDType;
+
+typedef enum
+{
+   NETCDF4 = 0
+} XFileType;
+
+typedef enum
+{ D360 = 0 , ALLLEAP, NOLEAP, JULIAN, GREGORIAN } XCalendarType ;
+
+//-------------------------------------------------------------------
+
+#define DECLARE_ATTRIBUTE(type, name) \
+        DECLARE_INTERFACE(axis, type, name)
+#include "../config/axis_attribute.conf"
+
+#undef  DECLARE_ATTRIBUTE
+#define DECLARE_ATTRIBUTE(type, name) \
+        DECLARE_INTERFACE(field, type, name)
+#include "../config/field_attribute.conf"
+
+#undef  DECLARE_ATTRIBUTE
+#define DECLARE_ATTRIBUTE(type, name) \
+        DECLARE_INTERFACE(context, type, name)
+#include "../config/context_attribute.conf"
+
+#undef  DECLARE_ATTRIBUTE
+#define DECLARE_ATTRIBUTE(type, name) \
+        DECLARE_INTERFACE(domain, type, name)
+#include "../config/domain_attribute.conf"
+
+#undef  DECLARE_ATTRIBUTE
+#define DECLARE_ATTRIBUTE(type, name) \
+        DECLARE_INTERFACE(file, type, name)
+#include "../config/file_attribute.conf"
+
+#undef  DECLARE_ATTRIBUTE
+#define DECLARE_ATTRIBUTE(type, name) \
+        DECLARE_INTERFACE(grid, type, name)
+#include "../config/grid_attribute.conf"
+
+//-------------------------------------------------------------------
+
+#define CASE_ELEM(elem_enum, elem_class)                                         \
+   case (E##elem_enum): ;; { ;;                                                  \
+      *_ret = (!CObjectFactory::HasObject<C##elem_class>(__id));;                \
+            ? 0 : CObjectFactory::GetObject<C##elem_class>(__id).get(); ;;       \
+      return; ;;};;                                                              \
+   case (G##elem_enum): ;; { ;;                                                  \
+      *_ret = (!CObjectFactory::HasObject<C##elem_class##Group>(__id));;         \
+            ? 0 : CObjectFactory::GetObject<C##elem_class##Group>(__id).get(); ;;\
+      return; ;;};;
+
+//-------------------------------------------------------------------
+
+void xios_handle_create (XPtr * const _ret, XDType _dtype, const XString _id, XSize _id_len)
+{
+   MAKE_STRING(__id, _id, _id_len);
+   switch(_dtype)
+   {
+      case (ECONTEXT):
+         // Si le context n'existe pas, on retourne un handle vide/nul.
+         *_ret = (!CObjectFactory::HasObject<CContext>(__id))
+               ? 0 : CObjectFactory::GetObject<CContext>(__id).get();
+         return ;
+      CASE_ELEM(AXIS   , Axis)
+      CASE_ELEM(DOMAIN , Domain)
+      CASE_ELEM(FIELD  , Field)
+      CASE_ELEM(FILE   , File)
+      CASE_ELEM(GRID   , Grid)
+      default :
+         *_ret = 0;
+         return;
+   }
+}
+
+#undef CASE_ELEM
+
+//-------------------------------------------------------------------
+
+void xios_xml_parse_file  (const XString _filename, XSize _filename_len)
+{
+   try
+   {
+      MAKE_STRING(__filename, _filename, _filename_len)
+      CTreeManager::ParseFile(__filename);
+      //~ StdOStringStream oss;
+      //~ oss << StdString("data/def/def_client_pre.")
+      //~     << CMPIManager::GetCommRank(CMPIManager::GetCommWorld());
+      //~ CTreeManager::PrintTreeToFile(oss.str());
+   }
+   catch (CException & exc)
+   {
+      std::cerr << exc.getMessage() << std::endl;
+      exit (EXIT_FAILURE);
+   }
+}
+
+//-------------------------------------------------------------------
+
+void xios_xml_parse_string(const XString _xmlcontent, XSize _xmlcontent_len)
+{
+   try
+   {
+      MAKE_STRING(__xmlcontent, _xmlcontent, _xmlcontent_len)
+      CTreeManager::ParseString(__xmlcontent);
+      //~ StdOStringStream oss;
+      //~ oss << StdString("data/def/def_client_pre.")
+      //~     << CMPIManager::GetCommRank(CMPIManager::GetCommWorld());
+      //~ CTreeManager::PrintTreeToFile(oss.str());
+   }
+   catch (CException & exc)
+   {
+      std::cerr << exc.getMessage() << std::endl;
+      exit (EXIT_FAILURE);
+   }
+}
+
+//-------------------------------------------------------------------
+
+void xios_context_set_current (XPtr const _ctx, bool _wswap)
+{
+   boost::shared_ptr<CContext> context = CObjectFactory::GetObject<CContext> ((CContext*)_ctx);
+   CTreeManager::SetCurrentContextId(context->getId());
+}
+
+//-------------------------------------------------------------------
+
+void xios_context_create (XPtr * _ctxt, const XString _ctxt_id,
+                          XSize _ctxt_id_len, XCalendarType _calType,
+                          XInt yr, XInt mth, XInt dd,
+                          XInt hr, XInt min, XInt sec)
+{
+   try
+   {
+      MAKE_STRING(__ctxt_id, _ctxt_id, _ctxt_id_len)
+      boost::shared_ptr<CContext> context = CTreeManager::CreateContext(__ctxt_id);
+      *_ctxt = context.get();
+      switch(_calType)
+      {
+         case (D360)     : 
+            context->setCalendar(boost::shared_ptr<date::CCalendar>
+               (new date::CD360Calendar(yr, mth, dd, hr, min, sec)));
+            break;
+         case (ALLLEAP)  : 
+            context->setCalendar(boost::shared_ptr<date::CCalendar>
+               (new date::CAllLeapCalendar(yr, mth, dd, hr, min, sec)));
+            break;
+         case (NOLEAP)   : 
+            context->setCalendar(boost::shared_ptr<date::CCalendar>
+               (new date::CNoLeapCalendar(yr, mth, dd, hr, min, sec)));
+            break;
+         case (JULIAN)   :
+            context->setCalendar(boost::shared_ptr<date::CCalendar>
+               (new date::CJulianCalendar(yr, mth, dd, hr, min, sec)));
+            break;
+         case (GREGORIAN): 
+            context->setCalendar(boost::shared_ptr<date::CCalendar>
+               (new date::CGregorianCalendar(yr, mth, dd, hr, min, sec)));
+             break;
+         default:
+            std::cerr << "Le calendrier n'est pas identifiÃ©" << std::endl;
+            exit (EXIT_FAILURE);
+      }    
+   }
+   catch (CException & exc)
+   {
+      std::cerr << exc.getMessage() << std::endl;
+      exit (EXIT_FAILURE);
+   }
+}
+
+//-------------------------------------------------------------------
+
+#define CASE_ELEM0(elem_enum, elem_class, group_enum, group_class)                     \
+      case (group_enum) : ;;                                                           \
+      { ;;                                                                             \
+         group_class * _group = (group_class *) _parent;                               \
+         boost::shared_ptr<group_class> group = ;;                                     \
+            CObjectFactory::GetObject<group_class>(_group); ;;                         \
+         switch(_child_type) ;;                                                        \
+         { ;;                                                                          \
+            case (group_enum) : ;;                                                     \
+               if ((_child_id_len != -1) && ;;                                         \
+                   (CObjectFactory::HasObject<group_class>(__child_id))) ;;            \
+                  return; ;;                                                           \
+               *_child = CGroupFactory::CreateGroup(group, __child_id).get(); ;;       \
+               break; ;;                                                               \
+            case (elem_enum) : ;;                                                      \
+               if ((_child_id_len != -1) && ;;                                         \
+                   (CObjectFactory::HasObject<elem_class>(__child_id))) ;;             \
+                  return; ;;                                                           \
+               *_child = CGroupFactory::CreateChild(group, __child_id).get(); ;;       \
+               break; ;;                                                               \
+            default : ;;                                                               \
+               std::cerr << "[xml_tree_add] Type enfant invalide" << std::endl; ;;     \
+         }; ;;                                                                         \
+         return; ;;                                                                    \
+      }
+
+//-------------------------------------------------------------------
+
+void xios_xml_tree_add(const XPtr _parent, XDType _parent_type, XPtr * _child,
+                       XDType _child_type, const XString _child_id, XSize _child_id_len)
+{
+   MAKE_STRING(__child_id, _child_id, _child_id_len);
+   try
+   {
+      switch (_parent_type)
+      {
+         case (EFILE) :
+         {
+            CFile * _file = (CFile *) _parent;
+            boost::shared_ptr<CFile> file = CObjectFactory::GetObject<CFile>(_file);
+            if (!CObjectFactory::HasObject<CFieldGroup>(file->getId()))
+               file->setVirtualFieldGroup(file->getId());
+            xios_xml_tree_add (file->getVirtualFieldGroup().get(), GFIELD,
+                              _child, EFIELD, _child_id, _child_id_len);
+            return;
+         }
+         CASE_ELEM0(EAXIS  , CAxis  , GAXIS  , CAxisGroup);
+         CASE_ELEM0(EGRID  , CGrid  , GGRID  , CGridGroup);
+         CASE_ELEM0(EDOMAIN, CDomain, GDOMAIN, CDomainGroup);
+         CASE_ELEM0(EFIELD , CField , GFIELD , CFieldGroup);
+         CASE_ELEM0(EFILE  , CFile  , GFILE  , CFileGroup);
+         default :
+            std::cerr << "[xml_tree_add] Type parent invalide" << std::endl;
+            return;
+      }
+   }
+   catch (CException & exc)
+   {
+      std::cerr << exc.getMessage() << std::endl;
+      exit (EXIT_FAILURE);
+   }
+}
+
+#undef CASE_ELEM0
+
+//-------------------------------------------------------------------
+
+void xios_xml_tree_show(const XString _filename, XSize _filename_len)
+{
+   MAKE_STRING(__filename, _filename, _filename_len);
+   if (_filename_len != -1)
+      CTreeManager::PrintTreeToFile(__filename);
+   else
+      CTreeManager::PrintTreeToStream(std::clog);
+}
+
+//-------------------------------------------------------------------
+
+void xios_dtreatment_start
+   (XPtr const _context, XFileType filetype, MPIComm comm_client_server)
+{
+   try
+   {
+      CContext * __context = (CContext *) _context;
+      boost::shared_ptr<CContext> context =
+             CObjectFactory::GetObject<CContext>(__context);
+      StdOStringStream oss;
+      //~ oss << StdString("data/def/def_client_next.")
+      //~     << CMPIManager::GetCommRank(CMPIManager::GetCommWorld());
+      //~ CTreeManager::PrintTreeToFile(oss.str());
+      //~ oss.str("");
+
+      boost::shared_ptr<CDataTreatment> dt(new CDataTreatment (context));
+      context->setDataTreatment(dt);
+
+      oss << StdString("data/def/def_client_end.")
+          << CMPIManager::GetCommRank(CMPIManager::GetCommWorld());
+      CTreeManager::PrintTreeToFile(oss.str());
+      
+      if ((comm_client_server != -1))
+      {
+         MPIRequest request = 0;
+         StdOStringStream ostrs;
+         if (CMPIManager::GetCommRank(comm_client_server) == 1)
+         {
+            CTreeManager::ToBinary(ostrs);      
+            CLinearBuffer lbuffer(ostrs.str().size()+13);           
+            lbuffer.appendString(ostrs.str()); 
+            CMPIManager::SendLinearBuffer(comm_client_server, 0, lbuffer, request);
+            CMPIManager::Wait(request);  // Pas encore en mode RPC
+         }
+         else
+         {
+            CTreeManager::DomainsToBinary(ostrs);
+            CLinearBuffer lbuffer(ostrs.str().size()+13);
+            lbuffer.appendString(ostrs.str());
+            CMPIManager::SendLinearBuffer(comm_client_server, 0, lbuffer, request);
+            CMPIManager::Wait(request);  // Pas encore en mode RPC
+         }
+      }
+      else
+      {
+         dt->createDataOutput<CNc4DataOutput>();
+      }      
+   }
+   catch (CException & exc)
+   {
+      std::cerr << exc.getMessage() << std::endl;
+      exit (EXIT_FAILURE);
+   }
+}
+
+//-------------------------------------------------------------------
+
+void xios_dtreatment_end(void)
+{
+
+}
+
+//-------------------------------------------------------------------
+
+void xios_write_data(const XString _field_id, XSize _field_id_len, double * data_k8,
+                     XSize data_Xsize, XSize data_Ysize, XSize data_Zsize)
+{
+
+}
+
+//-------------------------------------------------------------------
+
+void xios_update_calendar(int step)
+{
+   try
+   {
+   }
+   catch (CException & exc)
+   {
+      std::cerr << exc.getMessage() << std::endl;
+      exit (EXIT_FAILURE);
+   }
+}
+
+//-------------------------------------------------------------------
+
+void xios_set_timestep(double ts_year, double ts_month , double ts_day,
+                       double ts_hour, double ts_minute, double ts_second)
+{
+   try
+   {
+   }
+   catch (CException & exc)
+   {
+      std::cerr << exc.getMessage() << std::endl;
+      exit (EXIT_FAILURE);
+   }
+}
+
+//-------------------------------------------------------------------
+
+#ifdef __cplusplus
+}
+#endif //__cplusplus
Index: /XMLIO_V2/dev/common/src/xmlio/iface/macro.inc
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/iface/macro.inc	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/iface/macro.inc	(revision 219)
@@ -0,0 +1,114 @@
+#define MAKE_STRING(var_name, str_arg, int_arg) ;;     \
+   StdString var_name##temp; ;;                        \
+   StdSize d, f = 0; ;;                                \
+   if (int_arg != -1) ;;                               \
+   { ;;                                                \
+      var_name##temp.append (str_arg, int_arg); ;;     \
+      d = var_name##temp.find_first_not_of(' '); ;;    \
+      f = var_name##temp.find_last_not_of (' '); ;;    \
+   } ;;                                                \
+   StdString var_name = (int_arg != -1)                \
+                     ? var_name##temp.substr(d, f-d+1) \
+                     : "" ; ;
+
+#define MAKE_ARRAY(value, valuetype, numdims, extent)            \
+   boost::shared_ptr<CArray<valuetype, numdims> > value##_val ;; \
+   (new CArray<valuetype, numdims>(boost::extents extent));   ;; \
+   std::copy(value, &(value[value##_val->num_elements()]), value##_val->data()); ;
+
+
+//-------------------------------
+
+#define iarg_bool(name)      , const bool   * name
+#define iarg_int(name)       , const int    * name
+#define iarg_double(name)    , const double * name
+#define iarg_StdString(name) , const char   * name iarg_int(name##_size)
+
+#define iarg_ARRAY1(name) name iarg_int(name##_extent1)
+#define iarg_ARRAY2(name) iarg_ARRAY1(name) iarg_int(name##_extent2)
+#define iarg_ARRAY3(name) iarg_ARRAY2(name) iarg_int(name##_extent3)
+#define iarg_ARRAY(type, numdim) , const type *  iarg_ARRAY##numdim
+
+//--------------------------------
+#define dec_bool(name)      bool   name##_val = *name;
+#define dec_int(name)       int    name##_val = *name;
+#define dec_double(name)    double name##_val = *name;
+#define dec_StdString(name) MAKE_STRING(name##_val, name, *name##_size);
+
+//-
+
+#define dec_double1(name)     \
+   dec_int(name##_extent1) ;; \
+   MAKE_ARRAY(name, double, 1, [name##_extent1##_val]);
+
+#define dec_double2(name)     \
+   dec_int(name##_extent1) ;; \
+   dec_int(name##_extent2) ;; \
+   MAKE_ARRAY(name, double, 2, [name##_extent1##_val][name##_extent2##_val]);
+
+#define dec_double3(name)     \
+   dec_int(name##_extent1) ;; \
+   dec_int(name##_extent2) ;; \
+   dec_int(name##_extent3) ;; \
+   MAKE_ARRAY(name, double, 3, [name##_extent1##_val][name##_extent2##_val])[name##_extent3##_val]);
+
+//-
+
+#define dec_int1(name)        \
+   dec_int(name##_extent1) ;; \
+   MAKE_ARRAY(name, int, 1, [name##_extent1##_val]);
+
+#define dec_int2(name)        \
+   dec_int(name##_extent1) ;; \
+   dec_int(name##_extent2) ;; \
+   MAKE_ARRAY(name, int, 2, [name##_extent1##_val][name##_extent2##_val]);
+
+#define dec_int3(name)        \
+   dec_int(name##_extent1) ;; \
+   dec_int(name##_extent2) ;; \
+   dec_int(name##_extent3) ;; \
+   MAKE_ARRAY(name, int, 3, [name##_extent1##_val][name##_extent2##_val])[name##_extent3##_val]);
+
+//-
+
+#define dec_bool1(name)       \
+   dec_int(name##_extent1) ;; \
+   MAKE_ARRAY(name, bool, 1, [name##_extent1##_val]);
+
+#define dec_bool2(name)       \
+   dec_int(name##_extent1) ;; \
+   dec_int(name##_extent2) ;; \
+   MAKE_ARRAY(name, bool, 2, [name##_extent1##_val][name##_extent2##_val]);
+
+#define dec_bool3(name)       \
+   dec_int(name##_extent1) ;; \
+   dec_int(name##_extent2) ;; \
+   dec_int(name##_extent3) ;; \
+   MAKE_ARRAY(name, bool, 3, [name##_extent1##_val][name##_extent2##_val])[name##_extent3##_val]);
+
+//-
+
+#define dec_ARRAY(type, numdim) dec_##type##numdim
+
+//--------------------------------
+
+#define DECLARE_INTERFACE(class, type, name);;                    \
+   void xios_set_##class##_##name                                 \
+      (void * class##_hdl, int ftype iarg_##type(name));;         \
+   {;;                                                            \
+      dec_##type(name) ;;                                         \
+      if (class##_hdl != NULL) ;;                                 \
+      {;;                                                         \
+         if (ftype < GAXIS);;                                     \
+         {;;                                                      \
+            c##class * class##_hdl_ = (c##class *) class##_hdl; ;;\
+            class##_hdl_->name.setValue(name##_val); ;;           \
+         };;                                                      \
+         else;;                                                   \
+         {;;                                                      \
+            c##class##group * class##_hdl_;;                      \
+              = (c##class##group *) class##_hdl; ;;               \
+            class##_hdl_->name.setValue(name##_val); ;;           \
+         };;                                                      \
+      };;                                                         \
+   };; ;;
Index: /XMLIO_V2/dev/common/src/xmlio/iface/preprocess_cpp.sh
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/iface/preprocess_cpp.sh	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/iface/preprocess_cpp.sh	(revision 219)
@@ -0,0 +1,17 @@
+#!/bin/bash
+if [[ $# != 2 ]] ; then
+   echo "Usage : ./prepocess_cpp.sh <output> <input>"
+   exit
+fi
+
+if test -f $2; then
+   cpp -x c++ -P -o $1.0.temp  $2;
+   sed 's/;;/\r\n/g' <$1.0.temp >$1.1.temp
+   sed 's/INCLUDE/#include/g' <$1.1.temp >$1.0.temp
+   sed 's/\r\n \r\n/\r\n/g' <$1.0.temp >$1
+   rm -f $1.0.temp $1.1.temp
+else
+   echo "le fichier d'entrÃ©e n'existe pas !"
+fi
+
+
Index: /XMLIO_V2/dev/common/src/xmlio/indent.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/indent.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/indent.cpp	(revision 219)
@@ -0,0 +1,53 @@
+#include "indent.hpp"
+
+/// boost headers ///
+#include <boost/algorithm/string.hpp>
+#include <boost/algorithm/string/split.hpp>
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+   unsigned int CIndent::Indent   = 0;
+   StdString    CIndent::Increm   = StdString("   ");
+   bool         CIndent::WithLine = false;
+
+   StdOStream & CIndent::NIndent(StdOStream& out)
+   {
+      static unsigned int LineNB = 1;
+      if (CIndent::WithLine) out << LineNB++ << ". ";
+      for(unsigned int i = 0; i < CIndent::Indent; out << CIndent::Increm , i++){}
+      return (out);
+   }
+
+   StdOStream & CIndent::IncIndent(StdOStream& out)
+   { CIndent::Indent++; return (CIndent::NIndent(out)); }
+
+   StdOStream & CIndent::DecEndl  (StdOStream& out)
+   { CIndent::Indent--; return (out); }
+
+   ///----------------------------------------
+
+   StdString CIndentedXml::Indented(const StdString & content)
+   {
+      StdOStringStream retvalue;
+      std::vector<StdString> str;
+      boost::split(str, content, boost::is_any_of("\n"));
+      
+      std::vector<StdString>::iterator it = str.begin(), end = str.end();
+      
+      for (; it != end; it++)
+      {
+         StdString & line = *it;
+         if (line.find("<? ") != StdString::npos ||
+             line.find(xml::CXMLNode::GetRootName()) != StdString::npos)
+            retvalue << CIndent::NIndent << line <<  std::endl;
+         else if (line.find("</") != StdString::npos)
+            retvalue << CIndent::NIndent   << line << CIndent::DecEndl << std::endl;
+         else if (line.find(" />") != StdString::npos)
+            retvalue << CIndent::IncIndent << line << CIndent::DecEndl << std::endl;
+         else
+            retvalue << CIndent::IncIndent << line <<  std::endl;
+      }
+      return (retvalue.str());
+   }
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/indent.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/indent.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/indent.hpp	(revision 219)
@@ -0,0 +1,50 @@
+#ifndef __XMLIO_CIndent__
+#define __XMLIO_CIndent__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "xml_node.hpp"
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   class CIndent
+   {
+      public :
+
+         /// MÃ©thodes statiques ///
+         static StdOStream & NIndent  (StdOStream & out);
+         static StdOStream & IncIndent(StdOStream & out);
+         static StdOStream & DecEndl  (StdOStream & out);
+
+      private :
+
+         /// PropriÃ©tÃ©s  statiques ///
+         static unsigned int Indent;
+         static StdString    Increm;
+         static bool         WithLine;
+
+   }; // class CIndent
+
+    ///--------------------------------------------------------------
+    
+   class CIndentedXml
+   {
+      public :
+
+         /// MÃ©thode statique ///
+         static StdString Indented(const StdString & content);
+
+   }; // class CIndentedXml
+
+    ///--------------------------------------------------------------
+
+} // namespace xmlioserver
+
+   /// ////////////////////// Macros ////////////////////// ///
+   
+#define NIndent   CIndent::NIndent
+#define IncIndent CIndent::IncIndent
+#define DecEndl   CIndent::DecEndl
+
+#endif // __XMLIO_CIndent__
Index: /XMLIO_V2/dev/common/src/xmlio/input/inetcdf4.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/input/inetcdf4.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/input/inetcdf4.cpp	(revision 219)
@@ -0,0 +1,791 @@
+#include "inetcdf4.hpp"
+
+#include <boost/algorithm/string.hpp>
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CINetCDF4::CINetCDF4(const StdString & filename)
+      {
+         CheckError(nc_open(filename.c_str(), NC_NOWRITE, &this->ncidp));
+      }
+
+      CINetCDF4::~CINetCDF4(void)
+      {
+          CheckError(nc_close(this->ncidp));
+      }
+
+      ///--------------------------------------------------------------
+
+      void CINetCDF4::CheckError(int status)
+      {
+         if (status != NC_NOERR)
+         {
+            StdString errormsg (nc_strerror(status)); // fuite mÃ©moire ici ?
+            ERROR("CINetCDF4::CheckError(int status)",
+                  << "[ status = " << status << " ] " << errormsg);
+         }
+      }
+
+      //---------------------------------------------------------------
+
+      int CINetCDF4::getGroup(const CVarPath * const path)
+      {
+         int retvalue = this->ncidp;
+         if (path == NULL) return (retvalue);
+         CVarPath::const_iterator it = path->begin(), end = path->end();
+         
+         for (; it != end; it++)
+         {
+            const StdString & groupid = *it;
+            CheckError(nc_inq_ncid(retvalue, const_cast<char*>(groupid.c_str()), &retvalue));
+         }       
+            
+         return (retvalue);
+      }
+
+      int CINetCDF4::getVariable(const StdString & varname,
+                                 const CVarPath * const path)
+      {
+         int varid = 0;
+         int grpid = this->getGroup(path);
+         CheckError(nc_inq_varid (grpid, varname.c_str(), &varid));
+         return (varid);
+      }
+
+      int CINetCDF4::getDimension(const StdString & dimname,
+                                  const CVarPath  * const path)
+      {
+         int dimid = 0;
+         int grpid = this->getGroup(path);
+         CheckError(nc_inq_dimid (grpid, dimname.c_str(), &dimid));
+         return (dimid);
+      }
+
+      std::pair<nc_type, StdSize> CINetCDF4::getAttribute
+                                 (const StdString & attname,
+                                  const StdString * const var,
+                                  const CVarPath  * const path)
+      {
+         std::pair<nc_type, StdSize> retvalue;
+         int grpid = this->getGroup(path);
+         int varid = (var != NULL)
+                   ? this->getVariable(*var, path) : NC_GLOBAL;
+         CheckError(nc_inq_att(grpid, varid, attname.c_str(),
+                              &retvalue.first, &retvalue.second));
+         return (retvalue);
+      }
+
+      int CINetCDF4::getUnlimitedDimension(const CVarPath  * const path)
+      {
+         int dimid = 0;
+         int grpid = this->getGroup(path);
+         CheckError(nc_inq_unlimdim (grpid, &dimid));
+         return (dimid);
+      }
+
+      StdString CINetCDF4::getUnlimitedDimensionName(const CVarPath  * const path)
+      {
+         char full_name_in[NC_MAX_NAME +1];
+         int grpid = this->getGroup(path);
+         int dimid = this->getUnlimitedDimension(path);
+         CheckError(nc_inq_dimname(grpid, dimid, full_name_in));
+
+         StdString dimname(full_name_in);
+         return (dimname);
+      }
+
+      //---------------------------------------------------------------
+      StdSize CINetCDF4::getNbVertex(const StdString & name,
+                                     const CVarPath  * const path)
+      {
+
+         if (this->isRectilinear(name, path) ||
+             this->isCurvilinear(name, path))
+         {
+            if (this->is3Dim(name, path)) return (8);
+            else return (4);
+         }
+         if (this->isUnstructured(name, path))
+         {
+            StdString bound = this->getBoundsId
+                     (this->getCoordinatesIdList(name, path).back(), path);
+            StdString dim = this->getDimensionsList(&bound, path).back();
+            return (this->getDimensions(&bound, path)[dim]);
+         }
+         return ((size_t)(-1));
+      }
+
+      //---------------------------------------------------------------
+
+      std::list<StdString> CINetCDF4::getGroups(const CVarPath * const path)
+      {
+         StdSize strlen = 0;
+         char full_name_in[NC_MAX_NAME +1];
+         int nbgroup = 0, *groupid = NULL;
+         int grpid = this->getGroup(path);
+         std::list<StdString> retvalue;
+
+         CheckError(nc_inq_grps(grpid, &nbgroup, NULL));
+         groupid = new int[nbgroup]();
+         CheckError(nc_inq_grps(grpid, NULL, groupid));
+
+         for (int i = 0; i < nbgroup; i++)
+         {
+            CheckError(nc_inq_grpname_full(groupid[i], &strlen, full_name_in));
+            StdString groupname(full_name_in, strlen);
+            retvalue.push_back(groupname);
+         }
+
+         delete [] groupid;
+         return (retvalue);
+      }
+
+      std::list<StdString> CINetCDF4::getVariables(const CVarPath * const path)
+      {
+         char full_name_in[NC_MAX_NAME +1];
+         int nbvar = 0, *varid = NULL;
+         int grpid = this->getGroup(path);
+         std::list<StdString> retvalue;
+
+         CheckError(nc_inq_varids(grpid, &nbvar, NULL));
+         varid = new int[nbvar]();
+         CheckError(nc_inq_varids(grpid, NULL, varid));
+
+         for (int i = 0; i < nbvar; i++)
+         {
+            CheckError(nc_inq_varname(grpid, varid[i], full_name_in));
+            StdString varname(full_name_in);
+            retvalue.push_back(varname);
+         }
+
+         delete [] varid;
+         return (retvalue);
+      }
+
+      StdSize CINetCDF4::getNbOfTimestep(const CVarPath * const path)
+      {
+         return (this->getDimensions(NULL, path)[this->getUnlimitedDimensionName(path)]);
+      }
+
+      std::set<StdString> CINetCDF4::getBoundVariables(const CVarPath * const path)
+      {
+         std::set<StdString> retvalue;         
+         std::list<StdString> variables = this->getVariables(path);
+         std::list<StdString>::const_iterator it = variables.begin(), end = variables.end();
+         for (; it != end; it++)
+         {
+            const StdString & var = *it;
+            if (this->hasBounds(var, path))
+               retvalue.insert(retvalue.end(), this->getBoundsId(var, path));
+         }
+         return (retvalue);
+      }
+
+      std::set<StdString> CINetCDF4::getCoordVariables(const CVarPath * const path)
+      {
+         std::set<StdString> retvalue;
+         std::list<StdString> variables = this->getVariables(path);
+         std::list<StdString>::const_iterator it = variables.begin(), end = variables.end();
+         for (; it != end; it++)
+         {
+            const StdString & var = *it;
+            std::list<StdString> coords = this->getCoordinatesIdList(var, path);
+            std::list<StdString>::const_iterator it = coords.begin(), end = coords.end();
+            for (; it != end; it++)
+            {
+               const StdString & coord = *it;
+               if (this->hasVariable(coord, path))
+                  retvalue.insert(retvalue.end(), coord);
+            }
+         }
+         return (retvalue);
+      }
+
+      std::list<StdString> CINetCDF4::getDimensionsList
+                  (const StdString * const var, const CVarPath  * const path)
+      {
+         char full_name_in[NC_MAX_NAME +1];
+         int nbdim = 0, *dimid = NULL;
+         int grpid = this->getGroup(path);
+         int varid = (var != NULL)
+                   ? this->getVariable(*var, path) : NC_GLOBAL;
+         std::list<StdString> retvalue;
+
+         if (var != NULL)
+         {
+            CheckError(nc_inq_varndims(grpid, varid, &nbdim));
+            dimid = new int[nbdim]();
+            CheckError(nc_inq_vardimid(grpid, varid, dimid));
+         }
+         else
+         {
+            CheckError(nc_inq_dimids(grpid, &nbdim, NULL, 1));
+            dimid = new int[nbdim]();
+            CheckError(nc_inq_dimids(grpid, NULL, dimid, 1));
+         }
+
+         for (int i = 0; i < nbdim; i++)
+         {
+            CheckError(nc_inq_dimname(grpid, dimid[i], full_name_in));
+            StdString dimname(full_name_in);
+            retvalue.push_back(dimname);
+         }
+         delete [] dimid;
+
+         return (retvalue);
+      }
+
+      std::map<StdString, StdSize> CINetCDF4::getDimensions
+                  (const StdString * const var, const CVarPath  * const path)
+      {
+         StdSize size = 0;
+         char full_name_in[NC_MAX_NAME +1];
+         int nbdim = 0, *dimid = NULL;
+         int grpid = this->getGroup(path);
+         int varid = (var != NULL)
+                   ? this->getVariable(*var, path) : NC_GLOBAL;
+         std::map<StdString, StdSize> retvalue;
+
+         if (var != NULL)
+         {
+            CheckError(nc_inq_varndims(grpid, varid, &nbdim));
+            dimid = new int[nbdim]();
+            CheckError(nc_inq_vardimid(grpid, varid, dimid));
+         }
+         else
+         {
+            CheckError(nc_inq_dimids(grpid, &nbdim, NULL, 1));
+            dimid = new int[nbdim]();
+            CheckError(nc_inq_dimids(grpid, NULL, dimid, 1));
+         }
+
+         for (int i = 0; i < nbdim; i++)
+         {
+            CheckError(nc_inq_dimname(grpid, dimid[i], full_name_in));
+            CheckError(nc_inq_dimlen (grpid, dimid[i], &size));
+
+            StdString dimname(full_name_in);
+            retvalue.insert(retvalue.end(), std::make_pair(dimname, size));
+         }
+         delete [] dimid;
+
+         return (retvalue);
+      }
+
+      std::list<StdString> CINetCDF4::getAttributes
+               (const StdString * const var, const CVarPath  * const path )
+      {
+         int nbatt = 0;
+         char full_name_in[NC_MAX_NAME +1];
+         std::list<StdString> retvalue;
+         int grpid = this->getGroup(path);
+         int varid = (var != NULL)
+                   ? this->getVariable(*var, path) : NC_GLOBAL;
+
+         if (var != NULL)
+            CheckError(nc_inq_varnatts (grpid, varid, &nbatt));
+         else
+            CheckError(nc_inq_natts(grpid, &nbatt));
+
+         for (int i = 0; i < nbatt; i++)
+         {
+            CheckError(nc_inq_attname(grpid, varid, i, full_name_in));
+            StdString attname(full_name_in);
+            retvalue.push_back(attname);
+         }
+         return (retvalue);
+      }
+
+      int CINetCDF4::getAttributeId(const StdString & name,
+                                    const StdString * const var,
+                                    const CVarPath  * const path)
+      {
+         int retvalue = 0;
+         std::list<StdString> atts = this->getAttributes(var, path);
+         std::list<StdString>::const_iterator it = atts.begin(), end = atts.end();
+         for (; it != end; it++)
+         {
+            const StdString & attname = *it;
+            if (attname.compare(name) == 0)
+               return (retvalue);
+            retvalue++;
+         }
+         return (-1);
+      }
+
+      //---------------------------------------------------------------
+
+      bool CINetCDF4::hasMissingValue(const StdString & name,
+                                      const CVarPath  * const path)
+      {
+         return (this->hasAttribute("missing_value", &name, path) ||
+                 this->hasAttribute("_FillValue", &name, path));
+      }
+
+      bool CINetCDF4::hasAttribute(const StdString & name,
+                                   const StdString * const var ,
+                                   const CVarPath  * const path)
+      {
+         std::list<StdString> atts = this->getAttributes(var, path);
+         std::list<StdString>::const_iterator it = atts.begin(), end = atts.end();
+         for (; it != end; it++)
+         {
+            const StdString & attname = *it;
+            if (attname.compare(name) == 0) return (true);
+         }
+         return (false);
+      }
+
+      bool CINetCDF4::hasVariable(const StdString & name,
+                                  const CVarPath  * const path)
+      {
+         std::list<StdString> variables = this->getVariables(path);
+         std::list<StdString>::const_iterator it = variables.begin(), end = variables.end();
+         for (; it != end; it++)
+         {
+            const StdString & varname = *it;
+            if (varname.compare(name) == 0) return (true);
+         }
+         return (false);
+      }
+
+      bool CINetCDF4::hasCoordinates(const StdString & name,
+                                     const CVarPath  * const path)
+      {
+         return (this->hasAttribute("coordinates", &name, path));
+      }
+
+      bool CINetCDF4::hasBounds(const StdString & name,
+                                const CVarPath  * const path)
+      {
+         return (this->hasAttribute("bounds", &name, path));
+      }
+
+      bool CINetCDF4::hasTemporalDim(const CVarPath  * const path)
+      {
+         return (this->getUnlimitedDimension(path) != -1);
+      }
+
+      //---------------------------------------------------------------
+
+#define GET_ATTRIBUTE_VALUE(type, func_ext, type_enum)                     \
+      template <>                                                          \
+         std::vector<type> CINetCDF4::getAttributeValue                    \
+            (const StdString & name, const StdString * const var,          \
+                                     const CVarPath  * const path)         \
+      {                                                                    \
+         int grpid = this->getGroup(path);                                 \
+         int varid = (var != NULL)                                         \
+                   ? this->getVariable(*var, path) : NC_GLOBAL;            \
+         std::pair<nc_type , StdSize> attinfos =                           \
+                     this->getAttribute(name, var, path);                  \
+         std::vector<type> retvalue(attinfos.second);                      \
+         if (attinfos.first != type_enum)                                  \
+            ERROR("CINetCDF4::getAttributeValue<double>(name, var, path",  \
+                  << "[ name : "          << name                          \
+                  << ", type requested :" << attinfos.first                \
+                  << ", type stored : "   << type_enum      << "]"         \
+                  << " Invalid type !");                                   \
+         CheckError(nc_get_att_##func_ext                                  \
+                        (grpid, varid, name.c_str(), &(retvalue[0])));     \
+         return (retvalue);                                                \
+      }
+
+      GET_ATTRIBUTE_VALUE(double, double, NC_DOUBLE)
+      GET_ATTRIBUTE_VALUE(float , float , NC_FLOAT)
+      GET_ATTRIBUTE_VALUE(int   , int   , NC_INT)
+      GET_ATTRIBUTE_VALUE(char  , text  , NC_CHAR)
+
+      template <>
+         StdString CINetCDF4::getAttributeValue
+            (const StdString & name, const StdString * const var,
+                                     const CVarPath  * const path)
+      {
+         std::vector<char> chart = this->getAttributeValue
+                        <std::vector<char> >(name, var, path);
+         StdString retvalue(&(chart[0]), chart.size());
+         return (retvalue);
+      }
+
+      template <>
+         int CINetCDF4::getMissingValue(const StdString & name,
+                                        const CVarPath  * const path)
+      {
+         if (this->hasAttribute("missing_value", &name, path))
+            return (this->getAttributeValue<std::vector<int> >("missing_value", &name, path)[0]);
+         if (this->hasAttribute("_FillValue", &name, path))
+            return (this->getAttributeValue<std::vector<int> >("_FillValue", &name, path)[0]);
+         return (0);
+      }
+
+      template <>
+         double CINetCDF4::getMissingValue(const StdString & name,
+                                           const CVarPath  * const path)
+      {
+         if (this->hasAttribute("missing_value", &name, path))
+            return (this->getAttributeValue<std::vector<double> >("missing_value", &name, path)[0]);
+         if (this->hasAttribute("_FillValue", &name, path))
+            return (this->getAttributeValue<std::vector<double> >("_FillValue", &name, path)[0]);
+         return (0);
+      }
+
+      template <>
+         float CINetCDF4::getMissingValue(const StdString & name,
+                                          const CVarPath  * const path)
+      {
+         if (this->hasAttribute("missing_value", &name, path))
+            return (this->getAttributeValue<std::vector<float> >("missing_value", &name, path)[0]);
+         if (this->hasAttribute("_FillValue", &name, path))
+            return (this->getAttributeValue<std::vector<float> >("_FillValue", &name, path)[0]);
+         return (0);
+      }
+      
+      //---------------------------------------------------------------
+      
+      std::list<StdString> CINetCDF4::getCoordinatesIdList
+         (const StdString & name, const CVarPath  * const path)
+      {
+         std::list<StdString> retvalue;
+         StdString value = this->getCoordinatesId(name, path);
+         
+         boost::split(retvalue, value, boost::is_any_of(" "));
+         
+         std::list<StdString>::iterator it = retvalue.begin(), end = retvalue.end();
+         for (; it != end; it++)
+         {
+            StdString & coord = *it;
+            coord.assign(coord.data());
+         }
+         return (retvalue);
+      }
+
+      StdString CINetCDF4::getCoordinatesId
+         (const StdString & name, const CVarPath  * const path)
+      {
+         StdString retvalue;
+         if (this->hasAttribute("coordinates", &name, path))
+         {
+            return (this->getAttributeValue<StdString>("coordinates", &name, path));
+         }
+         else
+         {
+            std::list<StdString> dims = this->getDimensionsList(&name, path);
+            std::list<StdString>::const_iterator it = dims.begin(), end = dims.end();
+            for (; it != end; it++)
+            {
+               const StdString & value = *it;               
+               retvalue.append(value).push_back(' ');
+            }
+            retvalue.erase (retvalue.end()-1) ;
+         }
+
+         return (retvalue);
+      }
+
+      StdString CINetCDF4::getBoundsId(const StdString & name,
+                                       const CVarPath  * const path)
+      {
+         StdString retvalue;
+         if (this->hasAttribute("bounds", &name, path))
+            return (this->getAttributeValue<StdString>("bounds", &name, path));
+         return (retvalue);
+      }
+
+      //---------------------------------------------------------------
+
+      bool CINetCDF4::isBound(const StdString & name,
+                              const CVarPath  * const path)
+      {
+         std::set<StdString> bounds = this->getBoundVariables(path);
+         return (bounds.find(name) != bounds.end());
+      }
+
+      bool CINetCDF4::isCoordinate(const StdString & name,
+                                   const CVarPath  * const path)
+      {
+         std::set<StdString> coords = this->getCoordVariables(path);
+         return (coords.find(name) != coords.end());
+      }
+
+      bool CINetCDF4::isRectilinear(const StdString & name, const CVarPath  * const path)
+      {
+         std::list<StdString> coords = this->getCoordinatesIdList(name, path);
+         std::list<StdString>::const_iterator it = coords.begin(), end = coords.end();
+         for (; it != end; it++)
+         {
+            const StdString & coord = *it;
+            if (this->hasVariable(coord, path) && !this->isTemporal(coord, path))
+            {
+               std::map<StdString, StdSize> dimvar = this->getDimensions(&coord, path);
+               if ((dimvar.size() == 1) && (dimvar.find(coord) != dimvar.end()))
+                  continue;
+               else
+                  return (false);
+            }
+         }
+         return (true);
+      }
+
+      bool CINetCDF4::isCurvilinear(const StdString & name, const CVarPath  * const path)
+      {
+         if (this->isRectilinear(name, path) ||
+            !this->hasCoordinates(name, path))
+            return (false);
+
+         std::list<StdString> coords = this->getCoordinatesIdList(name, path);
+         std::list<StdString>::const_iterator it = coords.begin(), end = coords.end();
+         for (; it != end; it++)
+         {
+            const StdString & coord = *it;
+            if (this->hasVariable(coord, path))
+            {
+               std::map<StdString, StdSize> dimvar = this->getDimensions(&coord, path);
+               if (dimvar.size() != 2) return (false);
+            }
+            else return (false);
+         }
+         return (true);
+      }
+
+      bool CINetCDF4::isUnstructured(const StdString & name, const CVarPath  * const path)
+      {
+         if (this->isRectilinear(name, path)    ||
+             this->isCurvilinear(name, path)    ||
+             !this->hasCoordinates(name, path))
+             return (false);
+
+         StdString dimname = this->getDimensionsList(&name, path).back();
+
+         std::list<StdString> coords = this->getCoordinatesIdList(name, path);
+         std::list<StdString>::const_iterator it = coords.begin(), end = coords.end();
+         for (; it != end; it++)
+         {
+            const StdString & coord = *it;
+            if (this->hasVariable(coord, path))
+            {
+               std::map<StdString, StdSize> dimvar = this->getDimensions(&coord, path);
+               if ((dimvar.size() == 1) &&
+                   (dimvar.find(dimname) != dimvar.end()))
+                  continue;
+               else
+                  return (false);
+            }
+            else return (false);
+         }
+
+         return (true);
+      }
+
+      bool CINetCDF4::isUnknown(const StdString & name, const CVarPath * const path)
+      {
+         return !(this->isRectilinear(name, path) ||
+                  this->isCurvilinear(name, path) ||
+                  this->isUnstructured(name, path));
+      }
+
+      bool CINetCDF4::isTemporal(const StdString & name, const CVarPath  * const path)
+      {
+         if (!this->hasTemporalDim(path)) return (false);
+         std::map<StdString, StdSize> dims = this->getDimensions(&name, path);
+         if (dims.find(this->getUnlimitedDimensionName(path)) != dims.end())
+            return (true);
+         return (false);
+      }
+
+      bool CINetCDF4::is3Dim(const StdString & name, const CVarPath  * const path)
+      {
+         int i = 0;
+         std::list<StdString> coords = this->getCoordinatesIdList(name, path);
+         std::list<StdString>::const_iterator it = coords.begin(), end = coords.end();
+         for (; it != end; it++)
+         {
+            const StdString & coord = *it;
+            if (this->hasVariable(coord, path))
+            {
+               if (this->isTemporal(coord, path))
+                  continue;
+               i++;
+            }
+            else
+            {
+               if (coord.compare(this->getUnlimitedDimensionName()) == 0)
+                  continue;
+               i++;
+            }
+         }
+         return (i == 3);
+      }
+
+      bool CINetCDF4::isCellGrid(const StdString & name, const CVarPath  * const path)
+      {
+         if (this->isCoordinate(name, path))
+         {
+            return (this->hasBounds(name, path));
+         }
+         else
+         {
+            std::list<StdString> coords = this->getCoordinatesIdList(name, path);
+            std::list<StdString>::const_iterator it = coords.begin(), end = coords.end();
+            for (; it != end; it++)
+            {
+               const StdString & coord = *it;
+               if (this->hasVariable(coord, path))
+               {
+                  if (this->isTemporal(coord, path))
+                     continue;
+                  if (this->isCellGrid(coord, path))
+                     continue;
+                  return (false);
+               }
+               else
+               {
+                  if (coord.compare(this->getUnlimitedDimensionName()) == 0)
+                     continue;
+                  return (false);
+               }
+            }
+         }
+
+         return (true);
+      }
+
+      //---------------------------------------------------------------
+
+      std::list<StdString> CINetCDF4::getDataVariables(bool _is3D,       bool _isRecti,
+                                                       bool _isCurvi,    bool _isUnstr,
+                                                       bool _isCellData, bool _isTemporal,
+                                                       const CVarPath * const path)
+      {
+         std::list<StdString> retvalue;
+         std::list<StdString> allvars  = this->getVariables(path);
+         std::set<StdString> allcoords = this->getCoordVariables(path);
+
+         std::list<StdString>::const_iterator it = allvars.begin(), end = allvars.end();
+         for (; it != end; it++)
+         {
+            const StdString & var = *it;
+            if (this->isCoordinate(var, path)) continue;
+
+            if (!_isRecti && this->isRectilinear(var, path) ) continue;
+            if (!_isCurvi && this->isCurvilinear(var, path) ) continue;
+            if (!_isUnstr && this->isUnstructured(var, path)) continue;
+
+            if (!_isTemporal && this->isTemporal(var, path)) continue;
+            if (!_is3D       && this->is3Dim(var, path)    ) continue;
+            if (!_isCellData && this->isCellGrid(var, path)) continue;
+
+            if (this->isUnknown(var, path)) continue;
+
+            retvalue.push_back(var);
+         }
+         return (retvalue);
+      }
+
+      //---------------------------------------------------------------
+
+      void CINetCDF4::getDataInfo(const StdString & var, const CVarPath  * const path, StdSize record,
+                                  std::vector<StdSize> & start, std::vector<StdSize> & count,
+                                  StdSize & array_size)
+      {
+         std::list<StdString> dimlist        = this->getDimensionsList(&var, path);
+         std::map<StdString, StdSize> dimmap = this->getDimensions(&var, path);
+         std::list<StdString>::iterator it   = dimlist.begin();
+         if (this->isTemporal(var, path))
+         {
+            if (record != UNLIMITED_DIM)
+               start.push_back(record);
+            else
+               start.push_back(0);
+            count.push_back(1);
+            it++;
+         }
+         for (; it != dimlist.end(); it++)
+         {
+            start.push_back(0);
+            count.push_back(dimmap[*it]);
+            array_size *= dimmap[*it];
+         }
+      }
+
+      template <>
+         void CINetCDF4::getData(ARRAY(int, 1) data, const StdString & var,
+                                 const CVarPath  * const path, StdSize record)
+      {
+
+         std::vector<StdSize> start, count;
+         int grpid = this->getGroup(path);
+         int varid = this->getVariable(var, path);
+         StdSize array_size = 1;
+         this->getDataInfo(var, path, record, start, count, array_size);
+         data->resize(boost::extents[array_size]);
+         CheckError(nc_get_vara_int (grpid, varid, &(start[0]), &(count[0]), data->data()));
+      }
+
+      template <>
+         void CINetCDF4::getData(ARRAY(double, 1) data, const StdString & var,
+                                 const CVarPath  * const path, StdSize record)
+      {
+         std::vector<StdSize> start, count;
+         int grpid = this->getGroup(path);
+         int varid = this->getVariable(var, path);
+         StdSize array_size = 1;
+         this->getDataInfo(var, path, record, start, count, array_size);
+         data->resize(boost::extents[array_size]);
+         CheckError(nc_get_vara_double (grpid, varid, &(start[0]), &(count[0]), data->data()));
+      }
+
+      template <>
+         void CINetCDF4::getData(ARRAY(float, 1) data, const StdString & var,
+                                 const CVarPath  * const path, StdSize record)
+      {
+         std::vector<StdSize> start, count;
+         int grpid = this->getGroup(path);
+         int varid = this->getVariable(var, path);
+         StdSize array_size = 1;
+         this->getDataInfo(var, path, record, start, count, array_size);
+         data->resize(boost::extents[array_size]);
+         CheckError(nc_get_vara_float (grpid, varid, &(start[0]), &(count[0]), data->data()));
+      }
+
+      //---------------------------------------------------------------
+      StdString CINetCDF4::getLonCoordName(const StdString & varname,
+                                           const CVarPath  * const path)
+      {
+         std::list<StdString> clist =
+            this->getCoordinatesIdList(varname, path);
+         if (this->hasCoordinates(varname, path))
+            return (*clist.begin());
+         else
+            return (*clist.rbegin());
+      }
+
+      StdString CINetCDF4::getLatCoordName(const StdString & varname,
+                                           const CVarPath  * const path)
+      {
+         std::list<StdString> clist =
+            this->getCoordinatesIdList(varname, path);
+         if (this->hasCoordinates(varname, path))
+            return (*(++clist.begin()));
+         else
+            return (*(++clist.rbegin()));
+      }
+
+      StdString CINetCDF4::getVertCoordName(const StdString & varname,
+                                            const CVarPath  * const path)
+      {
+         if (!this->is3Dim(varname, path)) return ("");
+         std::list<StdString> clist =
+            this->getCoordinatesIdList(varname, path);
+         if (this->hasCoordinates(varname, path))
+            return (*(++(++clist.begin())));
+         else
+            return (*(++(++clist.rbegin())));
+      }
+
+      ///--------------------------------------------------------------
+
+   } // namespace io
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/input/inetcdf4.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/input/inetcdf4.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/input/inetcdf4.hpp	(revision 219)
@@ -0,0 +1,239 @@
+#ifndef __XMLIO_INETCDF4__
+#define __XMLIO_INETCDF4__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+#include "array.hpp"
+
+#include <mpi.h>
+#define MPI_INCLUDED
+#include <netcdf.h>
+
+#ifndef UNLIMITED_DIM
+   #define UNLIMITED_DIM (size_t)(-1)
+#endif  //UNLIMITED_DIM
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      typedef std::vector<StdString> CVarPath;
+
+      class CINetCDF4
+      {
+         public :
+
+            /// Constructeurs ///
+            CINetCDF4(void);                             // Not implemented.
+            CINetCDF4(const StdString & filename);
+            CINetCDF4(const CINetCDF4 & inetcdf4);       // Not implemented.
+            CINetCDF4(const CINetCDF4 * const inetcdf4); // Not implemented.
+
+         //-------------------------------------------------------------
+
+            /// Accesseurs ///
+            StdSize getNbOfTimestep(const CVarPath  * const path = NULL);
+
+            StdString getUnlimitedDimensionName(const CVarPath  * const path = NULL);
+
+            StdString getCoordinatesId(const StdString & name,
+                                       const CVarPath  * const path = NULL);
+
+            StdString getBoundsId(const StdString & name,
+                                  const CVarPath  * const path = NULL);
+
+            StdString getLonCoordName(const StdString & varname,
+                                      const CVarPath  * const path = NULL);
+            StdString getLatCoordName(const StdString & varname,
+                                       const CVarPath  * const path = NULL);
+            StdString getVertCoordName(const StdString & varname,
+                                       const CVarPath  * const path = NULL);
+
+            std::set<StdString> getCoordVariables(const CVarPath * const path = NULL);
+            std::set<StdString> getBoundVariables(const CVarPath * const path = NULL);
+
+            std::list<StdString> getGroups   (const CVarPath * const path = NULL);
+            std::list<StdString> getVariables(const CVarPath * const path = NULL);
+
+            std::list<StdString> getDataVariables(bool _is3D       = true,
+                                                  bool _isRecti    = true,
+                                                  bool _isCurvi    = true,
+                                                  bool _isUnstr    = true,
+                                                  bool _isCellData = true,
+                                                  bool _isTemporal = true,
+                                                  const CVarPath * const path = NULL);
+
+            std::list<StdString> getAttributes
+                                (const StdString * const var  = NULL,
+                                 const CVarPath  * const path = NULL);
+
+            std::list<StdString> getDimensionsList
+                                (const StdString * const var  = NULL,
+                                 const CVarPath  * const path = NULL);
+
+            std::list<StdString> getCoordinatesIdList(const StdString & name,
+                                                      const CVarPath  * const path = NULL);
+
+            std::map<StdString, StdSize> getDimensions (const StdString * const var  = NULL,
+                                 			const CVarPath  * const path = NULL);
+
+            StdSize getNbVertex(const StdString & name,
+                                const CVarPath  * const path = NULL);
+         //-------------------------------------------------------------
+
+            template <class T>
+               T getMissingValue(const StdString & name,
+                                 const CVarPath  * const path = NULL);
+
+            template <class T>
+               T getAttributeValue(const StdString & name,
+                                   const StdString * const var  = NULL,
+                                   const CVarPath  * const path = NULL);
+
+            template <class T>
+               void getData(ARRAY(T, 1) data,
+                            const StdString & var,
+                            const CVarPath  * const path = NULL,
+                            StdSize record   = UNLIMITED_DIM);
+
+         //-------------------------------------------------------------
+
+            /// Tests ///
+            bool hasMissingValue(const StdString & name,
+                                 const CVarPath  * const path = NULL);
+
+            bool hasAttribute(const StdString & name,
+                              const StdString * const var  = NULL,
+                              const CVarPath  * const path = NULL);
+
+            bool hasVariable(const StdString & name,
+                             const CVarPath  * const path = NULL);
+
+            bool hasCoordinates(const StdString & name,
+                                const CVarPath  * const path = NULL);
+
+            bool hasTemporalDim(const CVarPath  * const path = NULL);
+
+            bool hasBounds(const StdString & name,
+                           const CVarPath  * const path = NULL);
+
+         //-------------------------------------------------------------
+
+            bool isBound(const StdString & name,
+                         const CVarPath  * const path = NULL);
+            bool isCoordinate(const StdString & name,
+                              const CVarPath  * const path = NULL);
+            bool isRectilinear(const StdString & name,
+                               const CVarPath  * const path = NULL);
+            bool isCurvilinear(const StdString & name,
+                               const CVarPath  * const path = NULL);
+            bool isUnknown(const StdString & name,
+                               const CVarPath  * const path = NULL);
+            bool isUnstructured(const StdString & name,
+                                const CVarPath  * const path = NULL);
+
+            bool isTemporal(const StdString & name,
+                            const CVarPath  * const path = NULL);
+            bool is3Dim(const StdString & name,
+                        const CVarPath  * const path = NULL);
+            bool isCellGrid(const StdString & name,
+                            const CVarPath  * const path = NULL);
+
+         //-------------------------------------------------------------
+
+            /// Destructeur ///
+            virtual ~CINetCDF4(void);
+
+         protected :
+
+         //-------------------------------------------------------------
+
+            /// Accesseurs ///
+            int getGroup   (const CVarPath * const path = NULL);
+            int getVariable(const StdString & varname,
+                            const CVarPath * const path = NULL);
+            int getDimension(const StdString & dimname,
+                             const CVarPath  * const path = NULL);
+            int getUnlimitedDimension(const CVarPath  * const path = NULL);
+            int getAttributeId(const StdString & name,
+                               const StdString * const var  = NULL,
+                               const CVarPath  * const path = NULL);
+
+            std::pair<nc_type , StdSize> getAttribute(const StdString & attname,
+                                                      const StdString * const var  = NULL,
+                                                      const CVarPath  * const path = NULL);
+
+         //-------------------------------------------------------------
+
+            void getDataInfo(const StdString & var, const CVarPath  * const path, StdSize record,
+                             std::vector<StdSize> & start, std::vector<StdSize> & count,
+                             StdSize & array_size);
+
+         private :
+
+            /// VÃ©rification des erreurs NetCDF ///
+            static void CheckError(int status);
+
+            int ncidp; // Identifiant de fichier netcdf.
+
+      }; // class CINetCDF4
+
+      ///--------------------------------------------------------------
+      template <>
+         StdString CINetCDF4::getAttributeValue
+            (const StdString & name, const StdString * const var,
+                                     const CVarPath  * const path);
+
+      template <>
+         std::vector<double> CINetCDF4::getAttributeValue
+            (const StdString & name, const StdString * const var,
+                                     const CVarPath  * const path);
+
+      template <>
+         std::vector<float> CINetCDF4::getAttributeValue
+            (const StdString & name, const StdString * const var,
+                                     const CVarPath  * const path);
+
+      template <>
+         std::vector<int>  CINetCDF4::getAttributeValue
+            (const StdString & name, const StdString * const var,
+                                     const CVarPath  * const path);
+
+      template <>
+         std::vector<char>  CINetCDF4::getAttributeValue
+            (const StdString & name, const StdString * const var,
+                                     const CVarPath  * const path);
+
+      //---------------------------------------------------------------
+      template <>
+         int CINetCDF4::getMissingValue
+            (const StdString & name, const CVarPath  * const path);
+
+      template <>
+         double CINetCDF4::getMissingValue
+            (const StdString & name, const CVarPath  * const path);
+
+      template <>
+         float CINetCDF4::getMissingValue
+            (const StdString & name, const CVarPath  * const path);
+
+      //---------------------------------------------------------------
+      template <>
+         void CINetCDF4::getData(ARRAY(int, 1) data, const StdString & var,
+                                 const CVarPath  * const path, StdSize record);
+
+      template <>
+         void CINetCDF4::getData(ARRAY(double, 1) data, const StdString & var,
+                                 const CVarPath  * const path, StdSize record);
+
+      template <>
+         void CINetCDF4::getData(ARRAY(float, 1) data, const StdString & var,
+                                 const CVarPath  * const path, StdSize record);
+      ///--------------------------------------------------------------
+
+   } // namespace io
+} // namespace xmlioserver
+
+#endif //__XMLIO_INETCDF4__
Index: /XMLIO_V2/dev/common/src/xmlio/input/nc4_data_input.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/input/nc4_data_input.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/input/nc4_data_input.cpp	(revision 219)
@@ -0,0 +1,15 @@
+#include "nc4_data_input.hpp"
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CNc4DataInput::CNc4DataInput(void)
+      { /* ne rien faire de plus */ }
+
+      CNc4DataInput::~CNc4DataInput(void)
+      { /* ne rien faire de plus */ }
+
+   } // namespace io
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/input/nc4_data_input.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/input/nc4_data_input.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/input/nc4_data_input.hpp	(revision 219)
@@ -0,0 +1,31 @@
+#ifndef __XMLIO_NC4_DATA_INPUT__
+#define __XMLIO_NC4_DATA_INPUT__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "inetcdf4.hpp"
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+      class CNc4DataInput
+      {
+         public :
+
+            /// Constructeurs ///
+            CNc4DataInput(void);
+            CNc4DataInput(const CNc4DataInput & datainput);       // Not implemented.
+            CNc4DataInput(const CNc4DataInput * const datainput); // Not implemented.
+
+            /// Destructeur ///
+            virtual ~CNc4DataInput(void);
+
+      }; // class CNc4DataInput
+
+   } // namespace io
+} // namespace xmlioserver
+
+#endif //__XMLIO_NC4_DATA_INPUT__
Index: /XMLIO_V2/dev/common/src/xmlio/linear_buffer.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/linear_buffer.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/linear_buffer.cpp	(revision 219)
@@ -0,0 +1,300 @@
+#include "linear_buffer.hpp"
+
+#include "linear_buffer_impl.hpp"
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CLinearBuffer::CLinearBuffer(char * data, StdSize size)
+         : SuperClass(data, size), bdata(), p_write(size)
+      { this->computeBufferData(); }
+
+      CLinearBuffer::CLinearBuffer(StdSize size)
+         : SuperClass(size), bdata(), p_write(0)
+      { /* Ne rien faire de plus */ }
+      
+      CLinearBuffer::CLinearBuffer(const CLinearBuffer & lbuffer)
+         : SuperClass(lbuffer), bdata(lbuffer.bdata), p_write(lbuffer.p_write)
+      { /* Ne rien faire de plus */ }
+      
+      CLinearBuffer::CLinearBuffer(const CLinearBuffer * const lbuffer)
+         : SuperClass(lbuffer), bdata(lbuffer->bdata), p_write(lbuffer->p_write)      
+      { /* Ne rien faire de plus */ }
+      
+      CLinearBuffer::~CLinearBuffer(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      long int * CLinearBuffer::NULL_ARG = NULL;
+
+      //---------------------------------------------------------------
+
+      void CLinearBuffer::clear(void)
+      { 
+         this->bdata.clear();
+         //SuperClass::fillData('\0', SuperClass::getSize(), 0);
+         this->p_write = 0;
+      }
+      
+      //---------------------------------------------------------------
+      
+      StdSize CLinearBuffer::getUsedSize(void) const
+      { 
+         return (this->p_write); 
+      }
+      
+      //---------------------------------------------------------------
+      
+      StdSize CLinearBuffer::getUnusedSize(void) const
+      {
+          return (SuperClass::getSize() - this->getUsedSize()); 
+      }
+
+      //---------------------------------------------------------------
+
+#define CLinearBufferGetter(type, Type) \
+   type CLinearBuffer::get##Type(StdSize position) const     \
+   {                                                         \
+      if (position >= bdata.size())                          \
+         ERROR("CLinearBuffer::get"#Type"(position)",        \
+               << " invalid position !");                    \
+      return (SuperClass::get##Type(this->bdata[position])); \
+   }
+
+      CLinearBufferGetter(char     , Char)
+      CLinearBufferGetter(bool     , Bool)
+      CLinearBufferGetter(float    , Float)
+      CLinearBufferGetter(double   , Double)
+      CLinearBufferGetter(long int , Int)
+
+#undef CLinearBufferGetter
+
+      //---------------------------------------------------------------
+
+#define CLinearBufferArrayGetter(type, Type) \
+   ARRAY(type, 1) CLinearBuffer::get##Type##Array(StdSize position) const \
+   {                                                                      \
+      if (position >= bdata.size())                                       \
+         ERROR("CLinearBuffer::get"#Type"Array(position)",                \
+               << " invalid position !");                                 \
+      return (SuperClass::get##Type##Array(this->bdata[position]));       \
+   }
+
+      CLinearBufferArrayGetter(char     , Char)
+      CLinearBufferArrayGetter(bool     , Bool)
+      CLinearBufferArrayGetter(float    , Float)
+      CLinearBufferArrayGetter(double   , Double)
+      CLinearBufferArrayGetter(long int , Int)
+
+#undef CLinearBufferArrayGetter
+
+      StdString CLinearBuffer::getString(StdSize position) const
+      { return (SuperClass::getString(this->bdata[position])); }
+
+      //---------------------------------------------------------------
+
+#define CLinearBufferSetter(type, Type)                        \
+      void  CLinearBuffer::append##Type(type value)            \
+      {                                                        \
+         this->bdata.push_back(this->p_write);                 \
+         SuperClass::set##Type(value, this->p_write);          \
+         this->p_write += SuperClass::getRequestedSize(value); \
+      }
+
+      CLinearBufferSetter(char     , Char)
+      CLinearBufferSetter(bool     , Bool)
+      CLinearBufferSetter(float    , Float)
+      CLinearBufferSetter(double   , Double)
+      CLinearBufferSetter(long int , Int)
+
+#undef CLinearBufferSetter
+
+      //---------------------------------------------------------------
+
+#define CLinearBufferArraySetter(type, Type) \
+      void  CLinearBuffer::append##Type##Array(ARRAY(type, 1) value) \
+      {                                                              \
+         this->bdata.push_back(this->p_write);                       \
+         SuperClass::set##Type##Array(value, this->p_write);         \
+         this->p_write += SuperClass::getRequestedSize(value);       \
+      }
+
+      CLinearBufferArraySetter(char     , Char)
+      CLinearBufferArraySetter(bool     , Bool)
+      CLinearBufferArraySetter(float    , Float)
+      CLinearBufferArraySetter(double   , Double)
+      CLinearBufferArraySetter(long int , Int)
+
+#undef CLinearBufferArrayAppend
+
+      void CLinearBuffer::appendString(const StdString & value)
+      {
+         ARRAY_CREATE(arr, char, 1, [value.size()]);
+         std::copy(value.data(), &(value.data()[value.size()]), arr->data());
+         this->appendCharArray(arr);
+      }
+
+      //---------------------------------------------------------------
+
+      StdSize CLinearBuffer::getNumberOfStoredData(void) const
+      { 
+         return (this->bdata.size()); 
+      }
+      
+      //---------------------------------------------------------------
+      
+      std::vector<StdSize> CLinearBuffer::getPositionsOfStoredData(void) const
+      {
+         std::vector<StdSize> retvalue;
+         std::vector<StdSize>::const_iterator it = this->bdata.begin(), end = this->bdata.end();
+         for (;it != end; it++)
+         {
+            StdSize pos = *it;
+            CBufferData bufdata;
+            SuperClass::getBufferData(bufdata, pos);
+            retvalue.push_back(bufdata.position);
+         }
+
+         return (retvalue);
+      }
+      
+      //---------------------------------------------------------------
+      
+      std::vector<StdSize> CLinearBuffer::getSizesOfStoredData(void) const
+      {
+         std::vector<StdSize> retvalue;
+         std::vector<StdSize>::const_iterator it = this->bdata.begin(), end = this->bdata.end();
+         for (;it != end; it++)
+         {
+            StdSize pos = *it;
+            CBufferData bufdata;
+            SuperClass::getBufferData(bufdata, pos);
+            retvalue.push_back(bufdata.size);
+         }
+         return (retvalue);
+      }
+      
+      //---------------------------------------------------------------
+      
+      std::vector<std::pair<CBuffer::CBufferDataType, bool> >
+         CLinearBuffer::getTypesOfStoredData(void) const
+      {
+         std::vector<std::pair<CBufferDataType, bool> > retvalue;
+         std::vector<StdSize>::const_iterator it = this->bdata.begin(), end = this->bdata.end();
+         for (;it != end; it++)
+         {
+            StdSize pos = *it;
+            CBufferData bufdata;
+            SuperClass::getBufferData(bufdata, pos);
+            retvalue.push_back(std::make_pair(bufdata.type, bufdata.isArray));
+         }
+
+         return (retvalue);
+      }
+
+      //---------------------------------------------------------------
+
+      void CLinearBuffer::computeBufferData(void)
+      {
+
+         CBufferData bufdata; this->clear();
+         StdSize total_size = SuperClass::getSize();
+         int i = 0;
+         while ((1000 >= i++) && (p_write != total_size))
+         {
+            bdata.push_back(this->p_write);
+            SuperClass::updateBufferData(this->p_write);
+            SuperClass::getBufferData(bufdata, this->p_write);
+            this->p_write = (bufdata.size + bufdata.position);
+         }
+      }
+
+      //---------------------------------------------------------------
+
+      void CLinearBuffer::appendRequestInfos(const long int & managerId,
+                                             const long int & methodId,
+                                             const long int & nbargs)
+      {
+         this->appendInt(managerId);
+         this->appendInt(methodId);
+         this->appendInt(nbargs);
+      }
+
+      void CLinearBuffer::getRequestInfos(StdSize position,
+                           long int & managerId, long int & methodId, long int & nbargs)
+      {
+         managerId = this->getInt(position);
+         methodId  = this->getInt(position+1);
+         nbargs    = this->getInt(position+2);
+      }
+
+
+      //---------------------------------------------------------------
+
+      void CLinearBuffer::printToTextFile (const StdString & filename)
+      {
+         StdOFStream ofs(filename.c_str());
+         this->printToTextStream(ofs);
+         ofs.close();
+      }
+
+      void CLinearBuffer::printToTextStream (StdOStream & ostr)
+      { // A amÃ©liorer ....
+         StdSize position = 0;
+         typedef std::pair<CBufferDataType, bool> pairBufBool;
+         std::vector<pairBufBool> vect = this->getTypesOfStoredData();
+         ostr << "|";
+         
+         std::vector<pairBufBool>::const_iterator it = vect.begin(), end = vect.end();
+         for (;it != end; it++)
+         {
+            pairBufBool elm = *it;
+            ostr << "|";
+            if (!elm.second)
+            {
+               switch (elm.first)
+               {
+                  case (TBOOL8):    ostr << this->getBool(position);
+                     break;
+                  case (TINT32):    ostr << this->getInt(position);
+                     break;
+                  case (TCHAR8):    ostr << this->getChar(position);
+                     break;
+                  case (TFLOAT32):  ostr << this->getFloat(position);
+                     break;
+                  case (TDOUBLE64): ostr << this->getDouble(position);
+                     break;
+                  default :
+                     return;
+               }
+            }
+            else
+            {
+               switch (elm.first)
+               {
+                  case (TBOOL8):    ostr << this->getBoolArray(position);
+                     break;
+                  case (TINT32):    ostr << this->getIntArray(position);
+                     break;
+                  case (TCHAR8):    ostr << this->getCharArray(position);
+                     break;
+                  case (TFLOAT32):  ostr << this->getFloatArray(position);
+                     break;
+                  case (TDOUBLE64): ostr << this->getDoubleArray(position);
+                     break;
+                  default :
+                     return;
+               }
+            }
+            position++;
+         }
+      }
+
+      ///--------------------------------------------------------------
+
+   } // namespace tree
+} // namespace xmlioserver
+
Index: /XMLIO_V2/dev/common/src/xmlio/linear_buffer.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/linear_buffer.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/linear_buffer.hpp	(revision 219)
@@ -0,0 +1,133 @@
+#ifndef __XMLIO_CLinearBuffer__
+#define __XMLIO_CLinearBuffer__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "buffer.hpp"
+
+#define _NULL_ARG xmlioserver::comm::CLinearBuffer::NULL_ARG
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CLinearBuffer
+         : public CBuffer
+      {
+            /// DÃ©finition de type ///
+            typedef CBuffer SuperClass;
+
+         public /* static */ :
+
+            static long int * NULL_ARG;
+            friend class CMPIManager;
+
+         public :
+
+            /// Construteurs ///
+
+            explicit CLinearBuffer(StdSize size = BUFFER_CLIENT_SIZE);
+            CLinearBuffer(char * data, StdSize size);
+            CLinearBuffer(const CLinearBuffer & lbuffer);
+            CLinearBuffer(const CLinearBuffer * const lbuffer);
+
+            /// Accesseurs ///
+            StdSize getUsedSize(void) const;
+            StdSize getUnusedSize(void) const;
+
+            StdSize getNumberOfStoredData(void) const;
+            std::vector<StdSize> getPositionsOfStoredData(void) const;
+            std::vector<StdSize> getSizesOfStoredData(void) const;
+            std::vector<std::pair<CBufferDataType, bool> > getTypesOfStoredData(void) const;
+
+         //--------------------------------------------------------------
+            char     getChar  (StdSize position) const;
+            bool     getBool  (StdSize position) const;
+            float    getFloat (StdSize position) const;
+            double   getDouble(StdSize position) const;
+            long int getInt   (StdSize position) const;
+
+            StdString getString(StdSize position) const;
+
+            ARRAY(char,     1) getCharArray  (StdSize position) const;
+            ARRAY(bool,     1) getBoolArray  (StdSize position) const;
+            ARRAY(float,    1) getFloatArray (StdSize position) const;
+            ARRAY(double,   1) getDoubleArray(StdSize position) const;
+            ARRAY(long int, 1) getIntArray   (StdSize position) const;
+
+         //--------------------------------------------------------------
+
+            void getRequestInfos(StdSize position,
+                     long int & managerId, long int & methodId, long int & nbargs);
+
+         //--------------------------------------------------------------
+            /// Mutateurs ///
+            void appendChar  (char     value) ;
+            void appendBool  (bool     value) ;
+            void appendFloat (float    value) ;
+            void appendDouble(double   value) ;
+            void appendInt   (long int value) ;
+
+            void appendString(const StdString & value) ;
+
+            void appendCharArray  (ARRAY(char,     1) value) ;
+            void appendBoolArray  (ARRAY(bool,     1) value) ;
+            void appendFloatArray (ARRAY(float,    1) value) ;
+            void appendDoubleArray(ARRAY(double,   1) value) ;
+            void appendIntArray   (ARRAY(long int, 1) value) ;
+
+         //--------------------------------------------------------------
+
+            void appendRequestInfos(const long int & managerId,
+                                    const long int & methodId,
+                                    const long int & nbargs);
+
+         //--------------------------------------------------------------
+            virtual void clear(void);
+
+            /// Test ///
+            template <typename A1, typename A2, typename A3, typename A4>
+               inline StdSize getRequestedSize(A1 * arg1 = NULL_ARG,
+                                               A2 * arg2 = NULL_ARG,
+                                               A3 * arg3 = NULL_ARG,
+                                               A4 * arg4 = NULL_ARG) const;
+
+            /// Sortie fichier ascii ///
+            virtual void printToTextFile (const StdString & filename);
+            virtual void printToTextStream (StdOStream & ostr);
+
+            /// Destructeur ///
+            virtual ~CLinearBuffer(void);
+
+         protected :
+
+            /// Accesseurs protÃ©gÃ©s ///
+            template <class T>
+               inline void getLData(T & data, StdSize position) const;
+            template <class T>
+               inline void getLDataArray(ARRAY(T, 1) data, StdSize position) const;
+
+            /// Mutateurs protÃ©gÃ©s ///
+            template <class T>
+               inline void appendLData(const T & data);
+            template <class T>
+               inline void appendLDataArray(ARRAY(T, 1) data);
+
+         private :
+
+            /// Traitement ///
+            void computeBufferData(void);
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            std::vector<StdSize> bdata;
+            StdSize p_write;
+
+      }; // class CLinearBuffer
+
+      ///----------------------------------------------------------------
+
+   } // namespace comm
+} // namespace xmlioserver
+
+#endif // __XMLIO_CLinearBuffer__
Index: /XMLIO_V2/dev/common/src/xmlio/linear_buffer_impl.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/linear_buffer_impl.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/linear_buffer_impl.hpp	(revision 219)
@@ -0,0 +1,69 @@
+#ifndef __XMLIO_CLinearBuffer_impl__
+#define __XMLIO_CLinearBuffer_impl__
+
+#include "buffer_impl.hpp"
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////// DÃ©finitions (inline) /////////////////// ///
+
+      template <class T>
+         void CLinearBuffer::getLData(T & data, StdSize position) const
+      {
+         if (position >= bdata.size())
+            ERROR("CLinearBuffer::getData(position)",
+                  << " invalid position !");
+         SuperClass::getData(data, this->bdata[position]);
+      }
+
+      template <class T>
+          void CLinearBuffer::getLDataArray(ARRAY(T, 1) data, StdSize position) const
+      {
+         if (position >= bdata.size())
+            ERROR("CLinearBuffer::getDataArray(position)",
+                  << " invalid position !");
+         SuperClass::getDataArray(data, this->bdata[position]);
+      }
+
+      //---------------------------------------------------------------
+
+      template <class T>
+         void CLinearBuffer::appendLData(const T & data)
+      {
+         this->bdata.push_back(this->p_write);
+         SuperClass::setData(data, this->p_write);
+         this->p_write += SuperClass::getRequestedSize(data);
+      }
+
+      template <class T>
+         void CLinearBuffer::appendLDataArray(ARRAY(T, 1) data)
+      {
+         this->bdata.push_back(this->p_write);
+         SuperClass::setDataArray(data, this->p_write);
+         this->p_write += SuperClass::getRequestedSize(data);
+      }
+      //---------------------------------------------------------------
+
+      template <typename A1, typename A2, typename A3, typename A4>
+         StdSize CLinearBuffer::getRequestedSize
+          ( A1 * arg1, A2 * arg2, A3 * arg3, A4 * arg4) const
+      {
+         StdSize retvalue = 0;
+         long int nbarg   = 0;
+         retvalue += 3 * SuperClass::getRequestedSize(nbarg);
+
+         if (arg1 != NULL) retvalue += SuperClass::getRequestedSize(*arg1);
+         if (arg2 != NULL) retvalue += SuperClass::getRequestedSize(*arg2);
+         if (arg3 != NULL) retvalue += SuperClass::getRequestedSize(*arg3);
+         if (arg4 != NULL) retvalue += SuperClass::getRequestedSize(*arg4);
+         return (retvalue);
+      }
+
+      ///----------------------------------------------------------------
+
+   } // namespace comm
+} // namespace xmlioserver
+
+#endif // __XMLIO_CLinearBuffer_impl__
Index: /XMLIO_V2/dev/common/src/xmlio/main_server.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/main_server.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/main_server.cpp	(revision 219)
@@ -0,0 +1,36 @@
+// XmlIOServer
+#include "xmlioserver.hpp"
+
+#include "attribute_template_impl.hpp"
+#include "group_template_impl.hpp"
+
+#include "client.hpp"
+#include "server.hpp"
+
+#include "fake.hpp"
+
+// Point d'entrÃ©e du programme principal
+
+int main (int argc, char ** argv, char ** UNUSED (env))
+{
+   try
+   {
+      //comm::CMPIManager::Initialise(&argc, &argv); // < seulement en mode connectÃ©
+      //comm::CMPIManager::Finalize();               // < seulement en mode connectÃ©
+
+      CXIOSManager::Initialise (CXIOSManager::CLIENT_SERVER, &argc, &argv);
+      CXIOSManager::AddClient ("nemo"    , 4, 2, &nemo_fake_entry);
+      //CXIOSManager::AddClient("orchidee", 1, 1, &orchidee_fake_entry);
+      //CXIOSManager::AddClient("lmdz"    , 4, 2, &lmdz_fake_entry);
+      CXIOSManager::RunClientServer (comm::CMPIManager::GetCommWorld ());
+      CXIOSManager::Finalize ();
+   }
+   catch (CException & exc)
+   {
+      std::cerr << exc.getMessage () << std::endl;
+      CMPIManager::Finalize ();
+      return (EXIT_FAILURE);
+   }
+   return (EXIT_SUCCESS);
+}
+
Index: /XMLIO_V2/dev/common/src/xmlio/manager/mpi_manager.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/manager/mpi_manager.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/manager/mpi_manager.cpp	(revision 219)
@@ -0,0 +1,247 @@
+#include "mpi_manager.hpp"
+
+#include "impi_interface.hpp"
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      void CMPIManager::Initialise(int * UNUSED(argc), char *** UNUSED(argv))
+      {
+         int error = 0;
+         bool flag = false;
+
+         mpi_initialized(&flag, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::Initialise(arc, argv)", << " MPI Error !");
+         if (!flag)
+         {
+            mpi_init(&error);
+            if (error != mpi_success)
+               ERROR("CMPIManager::Initialise(arc, argv)", << " MPI Error !");
+         }
+      }
+
+      void CMPIManager::Finalize(void)
+      {
+         int error = 0;
+         mpi_finalize(&error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::Initialise(arc, argv)", << " MPI Error !");
+      }
+
+      ///--------------------------------------------------------------
+
+      int CMPIManager::GetCommRank(MPIComm comm)
+      {
+         int rank = 0, error = 0;
+         mpi_comm_rank(&comm, &rank, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::GetCommRank(comm)", << " MPI Error !");
+         return (rank);
+      }
+
+      int CMPIManager::GetCommSize(MPIComm comm)
+      {
+         int size = 0, error = 0;
+         mpi_comm_size(&comm, &size, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::GetCommSize(comm)", << " MPI Error !");
+         return (size);
+      }
+
+      MPIComm CMPIManager::GetCommWorld(void)
+      { 
+         return (mpi_comm_world); 
+      }
+
+      bool CMPIManager::IsMaster(MPIComm comm)
+      { 
+         return (CMPIManager::GetCommRank(comm) == 0); 
+      }
+
+      bool CMPIManager::IsRank(MPIComm comm, int rank)
+      { 
+         return (CMPIManager::GetCommRank(comm) == rank); 
+      }
+
+      MPIComm CMPIManager::CreateComm(MPIGroup group, MPIComm pcomm)
+      {
+         MPIComm  commu = 0;
+         int error = 0;
+         mpi_comm_create(&pcomm, &group, &commu, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::CreateComm(group, pcomm)", << " MPI Error !");
+         return (commu);
+      }
+
+      //---------------------------------------------------------------
+
+      void CMPIManager::Barrier(MPIComm comm)
+      {
+         int error = 0;
+         mpi_barrier(&comm, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::Barrier(comm)", << " MPI Error !");
+      }
+
+      //---------------------------------------------------------------
+
+      MPIGroup CMPIManager::GetGroupWorld(void)
+      {
+         MPIGroup group = 0;
+         int error = 0;
+         MPIComm  commu = CMPIManager::GetCommWorld();
+         mpi_comm_group(&commu, &group, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::GetGroupWorld()", << " MPI Error !");
+         return (group);
+      }
+
+      MPIGroup CMPIManager::CreateSubGroup(MPIGroup pgroup, const std::vector<int> & ranks)
+      {
+         MPIGroup group = 0;
+         int size = ranks.size();
+         int error = 0;
+         mpi_group_incl(&pgroup, &size, &(ranks[0]), &group, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::CreateSubGroup(pgroup, ranks)", << " MPI Error !");
+         return (group);
+      }
+
+      MPIGroup CMPIManager::CreateSubGroup(MPIGroup pgroup, int min_rank, int max_rank, int intval)
+      {
+         std::vector<int> ranks;
+         for (int i = min_rank; i <= max_rank; i += intval)
+            ranks.push_back(i);
+         return (CMPIManager::CreateSubGroup(pgroup, ranks));
+      }
+
+      //---------------------------------------------------------------
+
+      void CMPIManager::AllocMem(void * data, StdSize size)
+      {
+         if (MPI_Alloc_mem(sizeof(char) * size, MPI_INFO_NULL, data) != MPI_SUCCESS)
+            ERROR("CMPIManager::AllocMem(data, size)", << " MPI Error !");
+      }
+
+      void CMPIManager::FreeMem(void * data)
+      { 
+         MPI_Free_mem(data);
+      }
+
+      //--------------------------------------------------------------
+
+      void CMPIManager::Send (MPIComm comm, int dest_rank, char * data,
+                              StdSize size, MPIRequest & request)
+      {
+         MPIDataType type = mpi_char;
+         int nsize = size;
+         int tag = 0, error = 0;
+         mpi_issend(data, &nsize, &type, &dest_rank, &tag, &comm, &request, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::Send (comm, dest_rank, data, size, request)", << " MPI Error !");
+      }
+
+      void CMPIManager::Wait (MPIRequest & request)
+      {
+         MPIStatus status = new int[mpi_status_size]();
+         int error = 0;
+         mpi_wait(&request, status, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::Wait (request)", << " MPI Error !");
+         delete [] status;
+      }
+
+      bool CMPIManager::Test (MPIRequest & request)
+      {
+         MPIStatus status = new int[mpi_status_size]();
+         bool flag = false;
+         int error = 0;
+         mpi_test(&request, &flag, status, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::Test (request)", << " MPI Error !");
+         delete [] status;
+         return (flag);
+      }
+
+      bool CMPIManager::HasReceivedData(MPIComm comm, int src_rank)
+      {
+         MPIStatus status = new int[mpi_status_size]();
+         bool flag = false;
+         int error = 0, tag = mpi_any_tag;
+         mpi_iprobe(&src_rank, &tag, &comm, &flag, status, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::hasReceivedData (comm, rank)", << " MPI Error !");
+         delete [] status;
+         return (flag);
+      }
+
+      StdSize CMPIManager::GetReceivedDataSize(MPIComm comm, int src_rank)
+      {
+         MPIDataType type = mpi_char;
+         MPIStatus status = new int[mpi_status_size]();
+         bool flag = false;
+         int error = 0, size = 0, tag = mpi_any_tag;
+
+         mpi_iprobe(&src_rank, &tag, &comm, &flag, status, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::getReceivedDataSize (comm, rank)", << " MPI Error !");
+         if (flag == false) return (0);        
+         mpi_get_count(status, &type, &size, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::getReceivedDataSize (comm, rank)", << " MPI Error !");
+         delete [] status;
+         return (size);
+      }
+
+      void CMPIManager::Receive(MPIComm comm, int src_rank, char * data)
+      {
+         MPIRequest req = 0;
+         MPIDataType type = mpi_char;
+         int error = 0, tag = mpi_any_tag;
+         int size = CMPIManager::GetReceivedDataSize(comm, src_rank);
+
+         mpi_irecv(data, &size, &type, &src_rank, &tag, &comm, &req, &error);
+         if (error != mpi_success)
+            ERROR("CMPIManager::Receive (comm, src_rank, data)", << " MPI Error !");
+         CMPIManager::Wait (req); // Temporaire
+      }
+
+      //--------------------------------------------------------------
+
+      void CMPIManager::SendLinearBuffer
+         (MPIComm comm, int dest_rank, CLinearBuffer & buff, MPIRequest & request)
+      {
+         CMPIManager::Send(comm, dest_rank, buff, buff.getUsedSize(), request);
+         buff.clear();
+      }
+
+      void CMPIManager::ReceiveLinearBuffer(MPIComm comm, int src_rank, CLinearBuffer & buff)
+      {
+         CMPIManager::Receive(comm, src_rank, buff);
+         buff.computeBufferData();
+      }
+
+      boost::shared_ptr<CLinearBuffer> CMPIManager::ReceiveLinearBuffer(MPIComm comm, int src_rank)
+      {
+         boost::shared_ptr<CLinearBuffer> buff_ptr
+            (new CLinearBuffer(CMPIManager::GetReceivedDataSize(comm, src_rank)));
+         CMPIManager::ReceiveLinearBuffer(comm, src_rank, *buff_ptr);
+         return (buff_ptr);
+      }
+
+      void CMPIManager::ReceiveCircularBuffer(MPIComm comm, int src_rank, CCircularBuffer & buff)
+      {
+         StdSize data_size  = CMPIManager::GetReceivedDataSize(comm, src_rank);
+         StdSize data_begin = buff.prepareNextDataPosition(data_size);
+         CMPIManager::Receive(comm, src_rank, buff.getData(data_begin));
+         buff.updateNbRequests(data_begin, data_begin + data_size);
+      }
+
+      ///--------------------------------------------------------------
+
+   } // namespace comm
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/manager/mpi_manager.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/manager/mpi_manager.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/manager/mpi_manager.hpp	(revision 219)
@@ -0,0 +1,76 @@
+#ifndef __XMLIO_CMPIManager__
+#define __XMLIO_CMPIManager__
+
+/// MPI headers ///
+#include <mpi.h>
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+#include "buffer.hpp"
+#include "circular_buffer.hpp"
+#include "linear_buffer.hpp"
+
+namespace xmlioserver
+{
+   namespace comm
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      typedef MPI_Fint     MPIComm;
+      typedef MPI_Fint    MPIGroup;
+      typedef MPI_Fint  MPIRequest;
+      typedef MPI_Fint  *MPIStatus;
+      typedef MPI_Fint MPIDataType;
+
+      class CMPIManager
+      {
+         public :
+
+            /// Initialisation & Finalisation ///
+            static void Initialise(int * argc, char *** argv);
+            static void Finalize(void);
+
+            /// Communicateurs ///
+            static int GetCommRank(MPIComm comm = CMPIManager::GetCommWorld());
+            static int GetCommSize(MPIComm comm = CMPIManager::GetCommWorld());
+            static MPIComm CreateComm(MPIGroup group, MPIComm pcomm = CMPIManager::GetCommWorld());
+            static MPIComm GetCommWorld(void);
+
+            /// Autre ///
+            static void Barrier(MPIComm comm = CMPIManager::GetCommWorld());
+
+            /// Groupes ///
+            static MPIGroup GetGroupWorld(void);
+            static MPIGroup CreateSubGroup(MPIGroup pgroup, const std::vector<int> & ranks);
+            static MPIGroup CreateSubGroup(MPIGroup pgroup, int min_rank, int max_rank, int intval = 1);
+
+            /// Tests ///
+            static bool IsMaster(MPIComm comm = CMPIManager::GetCommWorld());
+            static bool IsRank(MPIComm comm, int rank);
+
+            /// Communication simple///
+            static void Send (MPIComm comm, int dest_rank, char * data, StdSize size, MPIRequest & request);
+            static void Wait (MPIRequest & request);
+            static bool Test (MPIRequest & request);
+
+            static bool HasReceivedData(MPIComm comm, int src_rank);
+            static StdSize GetReceivedDataSize(MPIComm comm, int src_rank);
+            static void Receive(MPIComm comm, int src_rank, char * data);
+
+            /// Communication 'complexe' ///
+            static void SendLinearBuffer(MPIComm comm, int dest_rank, CLinearBuffer & buff, MPIRequest & request);
+            static void ReceiveLinearBuffer(MPIComm comm, int src_rank, CLinearBuffer & buff);
+            static boost::shared_ptr<CLinearBuffer> ReceiveLinearBuffer(MPIComm comm, int src_rank);
+            static void ReceiveCircularBuffer(MPIComm comm, int src_rank, CCircularBuffer & buff);
+
+            /// MÃ©moire (non fonctionnel ....)///
+            static void AllocMem(void * data, StdSize size);
+            static void FreeMem(void * data);
+
+      }; // class CMPIManager
+
+   } // namespace comm
+} // namespace xmlioserver
+
+#endif // __XMLIO_CMPIManager__
+
Index: /XMLIO_V2/dev/common/src/xmlio/manager/tree_manager.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/manager/tree_manager.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/manager/tree_manager.cpp	(revision 219)
@@ -0,0 +1,394 @@
+#include "tree_manager.hpp"
+
+#include "attribute_template_impl.hpp"
+#include "object_template_impl.hpp"
+#include "group_template_impl.hpp"
+
+namespace xmlioserver
+{
+   namespace tree
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      void CTreeManager::SetCurrentContextId(const StdString & id)
+      {
+         CObjectFactory::SetCurrentContextId(id);
+         CGroupFactory::SetCurrentContextId(id);
+      }
+
+      boost::shared_ptr<CContext> CTreeManager::CreateContext(const StdString & id)
+      {
+         boost::shared_ptr<CContextGroup> group_context = CContext::GetContextGroup();
+         CTreeManager::SetCurrentContextId(id);
+         bool hasctxt = CObjectFactory::HasObject<CContext>(id);
+         
+         boost::shared_ptr<tree::CContext> context =
+               CObjectFactory::CreateObject<tree::CContext>(id);
+         if (!hasctxt) CGroupFactory::AddChild(group_context, context);
+
+#define DECLARE_NODE(Name_, name_) \
+   CObjectFactory::CreateObject<C##Name_##Definition>(C##Name_##Definition::GetDefName());
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "../config/node_type.conf"
+
+         return (context);
+   }
+
+      //--------------------------------------------------------------
+      void CTreeManager::PrintTreeToFile(const StdString & path)
+      {
+         StdOFStream ofs(path.c_str());
+         CTreeManager::PrintTreeToStream(ofs);
+         ofs.close();
+      }
+
+      void CTreeManager::PrintTreeToString(StdString & content)
+      {
+         StdOStringStream ostrstream;
+         tree::CContext::ShowTree(ostrstream);
+         content.assign(CIndentedXml::Indented(ostrstream.str()));
+      }
+
+      void CTreeManager::PrintTreeToStream(StdOStream & out)
+      {
+         StdOStringStream ostrstream;
+         tree::CContext::ShowTree(ostrstream);
+         out << CIndentedXml::Indented(ostrstream.str());
+      }
+
+      //--------------------------------------------------------------
+
+      void CTreeManager::ParseFile(const StdString & filename)
+      { 
+         xml::CXMLParser::ParseFile(filename); 
+      }
+
+      void CTreeManager::ParseString(const StdString & xmlContent)
+      { 
+         xml::CXMLParser::ParseString(xmlContent); 
+      }
+
+      void CTreeManager::ParseStream(StdIStream & stream)
+      { 
+         xml::CXMLParser::ParseStream(stream); 
+      }
+      
+      //--------------------------------------------------------------
+      
+      void CTreeManager::ToBinary(StdOStream & os)
+      {
+         StdString currentContextId =
+            CObjectFactory::GetCurrentContextId();
+         std::vector<boost::shared_ptr<CContext> > def_vector =
+            CContext::GetContextGroup()->getChildList();
+            
+         const StdSize size = def_vector.size();         
+         const ENodeType cenum = CContext::GetType();
+         const ENodeType genum = CContextGroup::GetType();
+         
+         os.write (reinterpret_cast<const char*>(&genum) , sizeof(ENodeType)); 
+         os.write (reinterpret_cast<const char*>(&size) , sizeof(StdSize));
+         
+         for (StdSize i = 0; i < size; i++)
+         {
+            boost::shared_ptr<CContext> context = def_vector[i];         
+            CTreeManager::SetCurrentContextId(context->getId());                
+            const bool hid = context->hasId(); // Toujours vrai
+            
+            os.write (reinterpret_cast<const char*>(&cenum), sizeof(ENodeType));      
+            os.write (reinterpret_cast<const char*>(&hid), sizeof(bool));
+            
+            if (hid)
+            {
+               const StdString & id = context->getId();
+               const StdSize size   = id.size();
+                  
+               os.write (reinterpret_cast<const char*>(&size), sizeof(StdSize));
+               os.write (id.data(), size * sizeof(char));         
+            } 
+            
+            context->toBinary(os);
+         }
+         CTreeManager::SetCurrentContextId(currentContextId);          
+      }
+      
+      void CTreeManager::FromBinary(StdIStream & is)
+      {
+         StdSize ctxtnb = 0;
+         ENodeType renum = Unknown;
+         
+         boost::shared_ptr<CContextGroup> group_context =
+                           CContext::GetContextGroup();
+                           
+         is.read (reinterpret_cast<char*>(&renum), sizeof(StdSize));   
+         is.read (reinterpret_cast<char*>(&ctxtnb), sizeof(ENodeType));
+
+         if (renum != CContextGroup::GetType())
+            ERROR("CTreeManager::FromBinary(StdIStream & is)",
+                  << "[ renum = " << renum << "] Bad type !");
+
+         for (StdSize i = 0; i < ctxtnb; i++)
+         {
+            bool hid = false;
+            is.read (reinterpret_cast<char*>(&renum), sizeof(tree::ENodeType));
+            is.read (reinterpret_cast<char*>(&hid), sizeof(bool));
+            
+            if (renum != CContext::GetType())
+               ERROR("CTreeManager::FromBinary(StdIStream & is)",
+                     << "[ renum = " << renum << "] Bad type !");
+                           
+            if (hid)
+            {
+               StdSize size  = 0;
+               is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+               StdString id(size, ' ');
+               is.read (const_cast<char *>(id.data()), size * sizeof(char));
+               
+               CTreeManager::SetCurrentContextId(id);               
+               bool hasctxt = CObjectFactory::HasObject<CContext>(id);
+               
+               boost::shared_ptr<CContext> context =
+                  CObjectFactory::CreateObject<CContext>(id);
+                  
+               if (!hasctxt)
+                  CGroupFactory::AddChild(group_context, context);
+               context->fromBinary(is);
+            }
+         }
+      }
+      
+      void CTreeManager::FromBinary(StdString & str)
+      {
+         StdIStringStream istrs(str);
+         CTreeManager::FromBinary(istrs);
+      }
+            
+
+      //--------------------------------------------------------------
+      
+      void CTreeManager::DomainsToBinary  (StdOStream & os)
+      {
+         StdString currentContextId =
+            CObjectFactory::GetCurrentContextId();
+         std::vector<boost::shared_ptr<CContext> > def_vector =
+            CContext::GetContextGroup()->getChildList();
+            
+         const StdSize size = def_vector.size();         
+         const ENodeType cenum = CContext::GetType();
+         const ENodeType genum = CContextGroup::GetType();
+         const ENodeType denum = CDomain::GetType();
+         const ENodeType ienum = CGrid::GetType();
+         
+         os.write (reinterpret_cast<const char*>(&genum) , sizeof(ENodeType)); 
+         os.write (reinterpret_cast<const char*>(&size) , sizeof(StdSize));
+         
+         for (StdSize i = 0; i < size; i++)
+         {
+            boost::shared_ptr<CContext> context = def_vector[i];         
+            CTreeManager::SetCurrentContextId(context->getId());                
+            const bool hid = context->hasId(); // Toujours vrai
+            
+            os.write (reinterpret_cast<const char*>(&cenum), sizeof(ENodeType));      
+            os.write (reinterpret_cast<const char*>(&hid), sizeof(bool));
+            
+            if (hid)
+            {
+               const StdString & id = context->getId();
+               const StdSize size   = id.size();
+                  
+               os.write (reinterpret_cast<const char*>(&size), sizeof(StdSize));
+               os.write (id.data(), size * sizeof(char));         
+            } 
+            
+            std::vector<boost::shared_ptr<CDomain> > & alldomain = 
+               CDomain::GetAllVectobject(context->getId());
+            std::vector<boost::shared_ptr<CGrid> > & allgrid = 
+               CGrid::GetAllVectobject(context->getId());
+               
+            const StdSize alldomain_size = alldomain.size(); 
+            const StdSize allgrid_size   = allgrid.size();
+            
+            os.write (reinterpret_cast<const char*>(&alldomain_size), sizeof(StdSize));
+            os.write (reinterpret_cast<const char*>(&allgrid_size), sizeof(StdSize));
+            
+            // Ãcriture successive des informations binaires de domaine.
+            for (StdSize j = 0; j < alldomain_size; j++)
+            {
+               boost::shared_ptr<CDomain> domain = alldomain[j];
+               bool hid = domain->hasId();
+               
+               os.write (reinterpret_cast<const char*>(&denum), sizeof(ENodeType)); 
+               os.write (reinterpret_cast<const char*>(&hid), sizeof(bool));
+               
+               if (hid)
+               {
+                  const StdString & id = domain->getId();
+                  const StdSize idsize   = id.size();
+                     
+                  os.write (reinterpret_cast<const char*>(&idsize), sizeof(StdSize));
+                  os.write (id.data(), idsize * sizeof(char));         
+               }         
+               domain->toBinary(os);               
+            }
+            
+            // Ãcriture successive des informations binaires de grille.
+            for (StdSize j = 0; j < allgrid_size; j++)
+            {
+               boost::shared_ptr<CGrid> grid = allgrid[j];
+               bool hid = grid->hasId();
+               
+               os.write (reinterpret_cast<const char*>(&ienum), sizeof(ENodeType)); 
+               os.write (reinterpret_cast<const char*>(&hid), sizeof(bool));
+               
+               if (hid)
+               {
+                  const StdString & id = grid->getId();
+                  const StdSize idsize   = id.size();
+                     
+                  os.write (reinterpret_cast<const char*>(&idsize), sizeof(StdSize));
+                  os.write (id.data(), idsize * sizeof(char));         
+               }         
+               grid->toBinary(os);               
+            }
+         }
+         CTreeManager::SetCurrentContextId(currentContextId); 
+         
+      }
+      
+      void CTreeManager::DomainsFromBinary(StdIStream & is)
+      {
+         StdSize ctxtnb = 0;
+         ENodeType renum = Unknown;
+         
+         boost::shared_ptr<CContextGroup> group_context =
+                           CContext::GetContextGroup();
+         std::vector<boost::shared_ptr<CContext> > def_vector =
+            CContext::GetContextGroup()->getChildList();
+            
+         const StdSize size = def_vector.size();  
+                  
+         is.read (reinterpret_cast<char*>(&renum), sizeof(StdSize));   
+         is.read (reinterpret_cast<char*>(&ctxtnb), sizeof(ENodeType));
+
+         if (renum != CContextGroup::GetType())
+            ERROR("CTreeManager::DomainsFromBinary(StdIStream & is)",
+                  << "[ renum = " << renum << "] Bad type !");
+                  
+         if (size != ctxtnb)
+            ERROR("CTreeManager::DomainsFromBinary(StdIStream & is)",
+                  << "[ size = " << size << "] Bad context group size !");
+                  
+         for (StdSize i = 0; i < ctxtnb; i++)
+         {
+            boost::shared_ptr<CContext> context = def_vector[i];
+            bool hid = false;
+            is.read (reinterpret_cast<char*>(&renum), sizeof(ENodeType));
+            is.read (reinterpret_cast<char*>(&hid), sizeof(bool));
+            
+            if (renum != CContext::GetType())
+               ERROR("CTreeManager::DomainsFromBinary(StdIStream & is)",
+                     << "[ renum = " << renum << "] Bad type !");
+                           
+            if (hid)
+            {
+               StdSize size  = 0;
+               is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+               StdString id(size, ' ');
+               is.read (const_cast<char *>(id.data()), size * sizeof(char));
+               
+               CTreeManager::SetCurrentContextId(id);
+            }
+            
+            std::vector<boost::shared_ptr<CDomain> > & alldomain = 
+               CDomain::GetAllVectobject(context->getId());
+            std::vector<boost::shared_ptr<CGrid> > & allgrid = 
+               CGrid::GetAllVectobject(context->getId());
+               
+            const StdSize allgrid_size = allgrid.size();
+            const StdSize alldomain_size = alldomain.size(); 
+            
+            StdSize read_alldomain_size = 0; 
+            StdSize read_allgrid_size = 0; 
+            
+            is.read (reinterpret_cast<char*>(&read_alldomain_size), sizeof(StdSize));
+            is.read (reinterpret_cast<char*>(&read_allgrid_size), sizeof(StdSize));
+            
+            if (alldomain_size != read_alldomain_size)
+               ERROR("CTreeManager::DomainsFromBinary(StdIStream & is)",
+                     << "[ read_alldomain_size = " << read_alldomain_size 
+                     << "] Bad domain group size !");
+                     
+            if (alldomain_size != read_alldomain_size)
+               ERROR("CTreeManager::DomainsFromBinary(StdIStream & is)",
+                     << "[ read_allgrid_size = " << read_allgrid_size 
+                     << "] Bad grid group size !");
+                     
+            // Lecture successive des informations binaires de domaine.
+            for (StdSize j = 0; j < alldomain_size; j++)
+            {
+               boost::shared_ptr<CDomain> domain = alldomain[j];
+               bool hid = domain->hasId();
+               ENodeType rrenum = Unknown;
+               
+               is.read (reinterpret_cast<char*>(&rrenum), sizeof(ENodeType));
+               is.read (reinterpret_cast<char*>(&hid), sizeof(bool));
+               
+               if (rrenum != CDomain::GetType())
+                  ERROR("CTreeManager::DomainsFromBinary(StdIStream & is)",
+                        << "[ rrenum = " << rrenum << "] Bad type !");
+
+               if (hid)
+               {
+                  StdSize size  = 0;
+                  is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+                  StdString id(size, ' ');
+                  is.read (const_cast<char *>(id.data()), size * sizeof(char));
+                  
+                  if (domain->getId().compare(id) != 0)
+                     ERROR("CTreeManager::DomainsFromBinary(StdIStream & is)",
+                           << "[ id = " << id << "] Bad id !"); 
+               }
+               domain->fromBinary(is);
+            }
+            
+            // Lecture successive des informations binaires de grille.
+            for (StdSize j = 0; j < allgrid_size; j++)
+            {
+               boost::shared_ptr<CGrid> grid = allgrid[j];
+               bool hid = grid->hasId();
+               ENodeType rrenum = Unknown;
+               
+               is.read (reinterpret_cast<char*>(&rrenum), sizeof(ENodeType));
+               is.read (reinterpret_cast<char*>(&hid), sizeof(bool));
+               
+               if (rrenum != CGrid::GetType())
+                  ERROR("CTreeManager::DomainsFromBinary(StdIStream & is)",
+                        << "[ rrenum = " << rrenum << "] Bad type !");
+
+               if (hid)
+               {
+                  StdSize size  = 0;
+                  is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+                  StdString id(size, ' ');
+                  is.read (const_cast<char *>(id.data()), size * sizeof(char));
+                  
+                  if (grid->getId().compare(id) != 0)
+                     ERROR("CTreeManager::DomainsFromBinary(StdIStream & is)",
+                           << "[ id = " << id << "] Bad id !"); 
+               }
+               grid->fromBinary(is);
+            }
+            
+         }
+      }
+      
+      void CTreeManager::DomainsFromBinary(StdString & str)
+      {
+         StdIStringStream istrs(str);
+         CTreeManager::DomainsFromBinary(istrs);
+      }
+
+      ///-------------------------------------------------------------
+
+   } // namespace tree
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/manager/tree_manager.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/manager/tree_manager.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/manager/tree_manager.hpp	(revision 219)
@@ -0,0 +1,56 @@
+#ifndef __XMLIO_CTreeManager__
+#define __XMLIO_CTreeManager__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "node_type.hpp"
+#include "xml_parser.hpp"
+#include "indent.hpp"
+
+#undef  DECLARE_ATTRIBUTE
+#define DECLARE_ATTRIBUTE(type, name)  , type * name = NULL
+
+namespace xmlioserver
+{
+   namespace tree
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CTreeManager
+      {
+         public :
+
+            /// Mutateurs ///
+            static void SetCurrentContextId(const StdString & id);
+            static boost::shared_ptr<CContext> CreateContext(const StdString & id = StdString(""));
+            
+            template<typename ObjType, typename AttType> // Pas encore implÃ©mentÃ©
+               static void SetAttribute(ObjType & obj, const StdString & attname, const AttType & attvalue);
+            template<typename ObjType, typename AttType> // Pas encore implÃ©mentÃ©
+               static void SetAttribute(const StdString & objname, const StdString & attname, const AttType & attvalue);
+
+            /// Sortie ///
+            static void PrintTreeToFile(const StdString & path);
+            static void PrintTreeToString(StdString & content);
+            static void PrintTreeToStream(StdOStream & out);
+
+            /// Parsing ///
+            static void ParseFile  (const StdString & filename);
+            static void ParseString(const StdString & xmlContent);
+            static void ParseStream(StdIStream & stream);
+            
+            /// Binaire ///
+            static void ToBinary  (StdOStream & os);
+            static void FromBinary(StdIStream & is);
+            static void FromBinary(StdString & str);
+            
+            static void DomainsToBinary  (StdOStream & os);
+            static void DomainsFromBinary(StdIStream & is);
+            static void DomainsFromBinary(StdString & str);
+
+      }; // class CTreeManager
+
+   } // namespace tree
+} // namespace xmlioserver
+
+#endif // __XMLIO_CTreeManager__
+
Index: /XMLIO_V2/dev/common/src/xmlio/manager/xios_manager.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/manager/xios_manager.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/manager/xios_manager.cpp	(revision 219)
@@ -0,0 +1,387 @@
+#include "xios_manager.hpp"
+
+#include "tree_manager.hpp"
+#include "data_treatment.hpp"
+#include "nc4_data_output.hpp"
+#include "attribute_template_impl.hpp"
+
+namespace xmlioserver
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      
+      void CXIOSManager::Initialise(XIOSType type, int * argc, char *** argv)
+      {
+         CXIOSManager::Type = type;
+         if (type != CLIENT)
+         {
+            // Initialisation de la biliothÃšque MPI si nÃ©cessaire
+            comm::CMPIManager::Initialise(argc, argv);
+            ExeName = StdString((*argv)[0]);
+            for (int i = 1; i < *argc; i++)
+               ExeOptions.push_back(StdString((*argv)[i]));
+         }
+      }
+
+      void CXIOSManager::Finalize(void)
+      {
+         if (CXIOSManager::Type != CLIENT)
+         {
+            // Finalisation de la biliothÃšque MPI si nÃ©cessaire
+            comm::CMPIManager::Finalize();
+         }
+      }
+
+      ///-------------------------------------------------------------
+
+      StdString CXIOSManager::ExeName("unknown");
+      std::vector<StdString> CXIOSManager::ExeOptions;
+
+      CXIOSManager::XIOSType   CXIOSManager::Type    = CLIENT;
+      CXIOSManager::XIOSStatus CXIOSManager::Status  = LOC_UNUSED;
+
+      StdString     CXIOSManager::ClientName("unknown name");
+      comm::MPIComm CXIOSManager::Comm_Client_Server = -1;
+      comm::MPIComm CXIOSManager::Comm_Server = -1;
+
+      xios_map<StdString, CXIOSManager::XIOSClient> CXIOSManager::Clients;
+
+      ///--------------------------------------------------------------
+      
+      void CXIOSManager::RunServer
+         (StdString clientName, comm::MPIComm comm_client_server, comm::MPIComm comm_server)
+      {
+         using namespace comm;
+         
+         // Reconstruction de l'arborescence d'objet Ã  l'aide des donnÃ©es envoyÃ©es par chacun des
+         // clients associÃ©s Ã  ce serveur.
+         std::vector<boost::shared_ptr<CLinearBuffer> > clientBuffer;
+         for (int i = 1; i < CMPIManager::GetCommSize(comm_client_server); i++)
+         {
+            while (!CMPIManager::HasReceivedData(comm_client_server, i)){}
+            clientBuffer.push_back(CMPIManager::ReceiveLinearBuffer(comm_client_server, i));
+         }
+         
+         // La quasi-totalitÃ© de l'arborescence est obtenue depuis les informations
+         // fournies par le client 1 du sous-groupe.
+         StdString main_data_tree = clientBuffer[0]->getString(0);        
+         tree::CTreeManager::FromBinary(main_data_tree);
+         
+         // Obtention des sous-domaines clients.
+         for (StdSize j = 1; j < clientBuffer.size(); j++)
+         {
+            main_data_tree = clientBuffer[j]->getString(0);
+            tree::CTreeManager::DomainsFromBinary(main_data_tree);
+         }
+
+         {  // Traitement de tous les contextes
+            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();
+
+            for (; it != end; it++)
+            {
+               boost::shared_ptr<CContext> context = *it;
+               boost::shared_ptr<data::CDataTreatment> dt(new data::CDataTreatment (context));
+               context->setDataTreatment(dt);
+               dt->createDataOutput<io::CNc4DataOutput>();
+            }
+            CTreeManager::SetCurrentContextId(currentContextId);
+         }
+        
+         StdOStringStream oss;
+         oss << StdString("data/def/def_server_end.")
+             << CMPIManager::GetCommRank(CMPIManager::GetCommWorld());
+         CTreeManager::PrintTreeToFile(oss.str());      
+ 
+      }
+      
+      //--------------------------------------------------------------
+      
+      void CXIOSManager::ShowInformation_CS(comm::MPIComm comm_client_server)
+      {
+         using namespace comm;
+         typedef std::pair<StdString, XIOSClient> StdPairStrClient;
+         if (CMPIManager::IsMaster(comm_client_server))
+         {
+            std::cout << " *************************************** " << std::endl
+                      << " *     XmlIOServer (Client/Server)     * " << std::endl
+                      << " *************************************** " << std::endl;
+            std::cout << " > Nombre de processus : "
+                      << CMPIManager::GetCommSize(comm_client_server) << std::endl;
+            std::cout << " > Nombre de processus utilisÃ©s : "
+                      << (CXIOSManager::GetNbClient() + CXIOSManager::GetNbServer()) << std::endl;
+            std::cout << " > Nombre de clients : "
+                      << CXIOSManager::GetNbClient() << std::endl;
+            std::cout << " > Nombre de serveurs : "
+                      << CXIOSManager::GetNbServer() << std::endl;
+
+            xios_map<StdString, XIOSClient>::iterator
+               iit  = CXIOSManager::Clients.begin(),
+               eend = CXIOSManager::Clients.end();
+
+            for (;iit != eend; iit++)
+            {
+               const StdPairStrClient & elem = *iit;
+               std::cout << " - " << elem.first
+                         << " > nombre de clients : "             
+                         << elem.second.nbClient
+                         << " , nombre de clients par serveur : " 
+                         << elem.second.nbClientPServer
+                         << " , nombre de serveurs : "            
+                         << elem.second.nbClient/elem.second.nbClientPServer
+                         << std::endl;
+            }
+
+            std::cout << " *************************************** " << std::endl;
+         }
+
+         comm::CMPIManager::Barrier();
+         
+      }
+      
+      //--------------------------------------------------------------
+      
+      void CXIOSManager::RunClientServer(comm::MPIComm comm_client_server)
+      {
+         using namespace comm;
+         typedef std::pair<StdString, XIOSClient> StdPairStrClient;
+         
+         CXIOSManager::ShowInformation_CS(comm_client_server);
+         
+         xios_map<StdString, XIOSClient>::iterator
+               iit  = CXIOSManager::Clients.begin(),
+               eend = CXIOSManager::Clients.end();
+         
+         StdSize start = 0, end   = 0;
+         
+         bool isClient = true, isIncl = false, isIncl_ = false;
+         MPIComm comm_client = 0, comm_client_grp = 0; comm_client_server = 0;
+
+         for (;iit != eend; iit++)
+         {
+            const StdPairStrClient & elem = *iit;
+
+            std::vector<int> clieindex, servindex ;
+            StdSize   currentRank      = CMPIManager::GetCommRank();
+            StdString clientName       = elem.first;
+            StdSize   nbClient         = elem.second.nbClient;
+            StdSize   nbClientPServer  = elem.second.nbClientPServer;
+            StdSize   nbServer         = (elem.second.nbClient)/(elem.second.nbClientPServer);
+
+            for (StdSize i = 0; i<nbServer; i++)
+            {
+               end = start + nbClientPServer;
+               MPIComm comm_  =  CMPIManager::CreateComm
+                  (CMPIManager::CreateSubGroup(CMPIManager::GetGroupWorld(), start, end));
+               MPIComm comm__ =  CMPIManager::CreateComm
+                  (CMPIManager::CreateSubGroup(CMPIManager::GetGroupWorld(), start+1, end));
+                  
+               servindex.push_back(start);
+               for (StdSize j = start+1; j <= end; j++)
+                  clieindex.push_back(j);
+                                
+               if ((currentRank >= start) && (currentRank <= end))
+               {
+                  comm_client_server = comm_;
+                  comm_client_grp    = comm__;
+                  isIncl = true;
+                  CXIOSManager::ClientName = clientName;
+                  CXIOSManager::Status = LOC_CLIENT;
+               }
+               if (currentRank == start)
+               {
+                  isClient = false; isIncl_  = true;
+                  CXIOSManager::Comm_Client_Server = comm_;
+                  CXIOSManager::Status = LOC_SERVER;
+               }               
+               if (clieindex.size() == nbClient)
+               {
+                  MPIComm comm___ = CMPIManager::CreateComm
+                  (CMPIManager::CreateSubGroup(CMPIManager::GetGroupWorld(), clieindex));
+                  if (isIncl) comm_client = comm___;
+                  clieindex.clear();
+                  isIncl = false;
+               }
+               
+               start = start + nbClientPServer + 1;
+            }
+            MPIComm comm____ = CMPIManager::CreateComm
+               (CMPIManager::CreateSubGroup(CMPIManager::GetGroupWorld(), servindex));
+            if (isIncl_) CXIOSManager::Comm_Server = comm____;               
+            servindex.clear();
+            isIncl_ = false;            
+         }
+         
+         if (isClient && (CXIOSManager::Clients.find(CXIOSManager::ClientName) !=
+                          CXIOSManager::Clients.end()))
+         {
+            CXIOSManager::Clients[CXIOSManager::ClientName].entry
+               (comm_client, comm_client_grp, comm_client_server);
+         }
+         else if(CXIOSManager::Clients.find(CXIOSManager::ClientName) !=
+                 CXIOSManager::Clients.end())
+         {
+            CXIOSManager::RunServer(CXIOSManager::ClientName, 
+                                    CXIOSManager::Comm_Client_Server,
+                                    CXIOSManager::Comm_Server);
+         }
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CXIOSManager::RunClient(comm::MPIComm comm_client)
+      {
+         CXIOSManager::Status  = LOC_CLIENT_SERVER;
+         (CXIOSManager::Clients.begin()->second.entry)(comm_client, comm_client, comm_client);
+      }
+
+      //---------------------------------------------------------------
+
+      void CXIOSManager::AddClient(StdString clientName, StdSize nbClient, StdSize nbClientPServer,
+                                   void (*entry_point)(comm::MPIComm, comm::MPIComm, comm::MPIComm))
+      {
+         StdSize nbprocess  = comm::CMPIManager::GetCommSize(comm::CMPIManager::GetCommWorld());
+         StdSize nbprocess_used = CXIOSManager::GetNbClient() + CXIOSManager::GetNbServer();
+
+         if (nbClient < nbClientPServer)
+            ERROR("CXIOSManager::AddClient(...)", 
+                  << "nbClient < nbClientPServer");
+                  
+         if ((nbClient % nbClientPServer) != 0)
+            ERROR("CXIOSManager::AddClient(...)",
+                  << " (nbClient % nbClientPServer) != 0 !");
+                  
+         if ((nbprocess-nbprocess_used) < (nbClient + nbClient/nbClientPServer))
+            ERROR("CXIOSManager::AddClient(...)",
+                  << " Pas assez de processus disponibles !");
+                  
+         if (CXIOSManager::Clients.find(clientName) != CXIOSManager::Clients.end())
+            ERROR("CXIOSManager::AddClient(...)",
+                  << " Un client portant le mÃªme nom existe dÃ©jÃ  !");
+
+         XIOSClient client = {nbClient, nbClientPServer, entry_point };
+         CXIOSManager::Clients[clientName] = client;
+      }
+
+      //---------------------------------------------------------------
+
+      StdSize CXIOSManager::GetNbClient(void)
+      {
+         switch (CXIOSManager::Type)
+         {
+            case (CLIENT_SERVER):
+            {
+               StdSize retvalue = 0;
+               typedef std::pair<StdString, XIOSClient> StdPairStrClient;
+               xios_map<StdString, XIOSClient>::iterator
+                  iit  = CXIOSManager::Clients.begin(),
+                  eend = CXIOSManager::Clients.end();
+
+               for (;iit != eend; iit++)
+               {
+                  const StdPairStrClient & elem = *iit;
+                  retvalue += CXIOSManager::GetNbLocClient(elem.first);
+               }
+               
+               return (retvalue);
+            }
+            case (CLIENT):
+               return (comm::CMPIManager::GetCommSize(CXIOSManager::Comm_Server));
+            case (SERVER):
+               return (comm::CMPIManager::GetCommSize(CXIOSManager::Comm_Client_Server) - 1);
+            default:
+               return (0);
+         }
+      }
+      
+      //---------------------------------------------------------------
+
+      StdSize CXIOSManager::GetNbLocClient(const StdString & clientName)
+      {
+         switch (CXIOSManager::Type)
+         {
+            case (CLIENT_SERVER):
+               return (CXIOSManager::Clients[clientName].nbClient);
+            case (CLIENT):
+            case (SERVER):
+               return (CXIOSManager::GetNbClient());
+            default:
+               return (0);
+         }
+      }
+
+      //---------------------------------------------------------------
+
+      StdSize CXIOSManager::GetNbServer(void)
+      {
+         switch (CXIOSManager::Type)
+         {
+            case (CLIENT_SERVER):
+            {
+               StdSize retvalue = 0;
+               typedef std::pair<StdString, XIOSClient> StdPairStrClient;              
+
+               xios_map<StdString, XIOSClient>::iterator
+                  iit  = CXIOSManager::Clients.begin(),
+                  eend = CXIOSManager::Clients.end();
+
+               for (;iit != eend; iit++)
+               {
+                  const StdPairStrClient & elem = *iit;
+                  retvalue += CXIOSManager::GetNbLocServer(elem.first);
+               }                  
+                  
+               return (retvalue);
+            }
+            case (CLIENT):
+               return (comm::CMPIManager::GetCommSize(CXIOSManager::Comm_Server));
+            case (SERVER):
+               return (1);
+            default:
+               return (0);
+         }
+      }
+
+      //---------------------------------------------------------------
+
+      StdSize CXIOSManager::GetNbLocServer(const StdString & clientName)
+      {
+         switch (CXIOSManager::Type)
+         {
+            case (CLIENT_SERVER):
+               return (CXIOSManager::Clients[clientName].nbClient /
+                       CXIOSManager::Clients[clientName].nbClientPServer);
+            case (CLIENT):
+            case (SERVER):
+               return (CXIOSManager::GetNbServer());
+            default:
+               return (0);
+         }
+      }
+      
+      //---------------------------------------------------------------
+      
+      CXIOSManager::XIOSType   CXIOSManager::GetType(void)
+      {
+         return (CXIOSManager::Type);
+      }
+      
+      //---------------------------------------------------------------
+      
+      CXIOSManager::XIOSStatus CXIOSManager::GetStatus(void)
+      {
+         return (CXIOSManager::Status);
+      }
+      
+      //---------------------------------------------------------------
+      
+      StdString  CXIOSManager::GetClientName(void)
+      {
+         return (CXIOSManager::ClientName);
+      }
+
+      ///--------------------------------------------------------------
+
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/manager/xios_manager.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/manager/xios_manager.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/manager/xios_manager.hpp	(revision 219)
@@ -0,0 +1,83 @@
+#ifndef __XMLIO_CXMLIOManager__
+#define __XMLIO_CXMLIOManager__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+#include "mpi_manager.hpp"
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   class CXIOSManager
+   {
+      public :
+
+         /// DÃ©finition de type ///
+         typedef enum _xios_type
+         { CLIENT_SERVER = 0 , CLIENT, SERVER } XIOSType;
+         
+         typedef enum _xios_status
+         { LOC_UNUSED = 0, LOC_CLIENT, LOC_SERVER, LOC_CLIENT_SERVER }  XIOSStatus;
+
+         typedef struct
+         {
+            StdSize nbClient;
+            StdSize nbClientPServer;
+            void (*entry)(comm::MPIComm, comm::MPIComm, comm::MPIComm) ;
+         } XIOSClient;
+         
+      public:
+
+         /// Initialisation et finalisation de la bibliothÃšque ///
+         static void Initialise(XIOSType type = CLIENT,
+                                int    * argc = NULL  ,
+                                char *** argv = NULL  );
+         static void Finalize(void);
+
+         /// Ajout de client en mode CLIENT_SERVER et CLIENT///
+         static void AddClient(StdString clientName, StdSize nbClient, StdSize nbClientPServer,
+                               void (*entry_point)(comm::MPIComm, comm::MPIComm, comm::MPIComm));
+
+         /// Lancement des serveurs et/ou des clients ///
+         static void RunServer(StdString clientName,
+                               comm::MPIComm comm_client_server, comm::MPIComm comm_server);
+         static void RunClient(comm::MPIComm comm_client =
+                               comm::CMPIManager::GetCommWorld());
+         static void RunClientServer(comm::MPIComm comm_client_server =
+                                     comm::CMPIManager::GetCommWorld());
+
+      public :
+
+         /// Accesseurs statiques ///
+         static XIOSType   GetType(void);
+         static XIOSStatus GetStatus(void);
+         static StdString  GetClientName(void);
+         
+      protected :
+         
+         static StdSize GetNbClient(void);
+         static StdSize GetNbLocClient(const StdString & clientName = CXIOSManager::ClientName);
+
+         static StdSize GetNbServer(void);
+         static StdSize GetNbLocServer(const StdString & clientName = CXIOSManager::ClientName);
+         
+      private :
+      
+         /// Information ///
+         static void ShowInformation_CS(comm::MPIComm comm_client_server);
+
+         /// Variables statiques privÃ©es ///
+         static StdString ExeName;
+         static std::vector<StdString> ExeOptions;
+
+         static XIOSType   Type;
+         static XIOSStatus Status;
+         static StdString  ClientName;
+         static comm::MPIComm Comm_Client_Server, Comm_Server;
+         static xios_map<StdString, XIOSClient> Clients;
+
+   }; // class CXIOSManager
+} // namespace xmlioserver
+
+#endif //__XMLIO_CXMLIOManager__
Index: /XMLIO_V2/dev/common/src/xmlio/node/axis.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/axis.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/axis.cpp	(revision 219)
@@ -0,0 +1,65 @@
+#include "axis.hpp"
+
+#include "attribute_template_impl.hpp"
+#include "object_template_impl.hpp"
+#include "group_template_impl.hpp"
+
+namespace xmlioserver {
+namespace tree {
+   
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   CAxis::CAxis(void)
+      : CObjectTemplate<CAxis>()
+      , CAxisAttributes(), isChecked(false), relFiles()
+   { /* Ne rien faire de plus */ }
+
+   CAxis::CAxis(const StdString & id)
+      : CObjectTemplate<CAxis>(id)
+      , CAxisAttributes(), isChecked(false), relFiles()
+   { /* Ne rien faire de plus */ }
+
+   CAxis::~CAxis(void)
+   { /* Ne rien faire de plus */ }
+
+   ///---------------------------------------------------------------
+
+   const std::set<StdString> & CAxis::getRelFiles(void) const
+   {
+      return (this->relFiles);
+   }
+
+   bool CAxis::IsWritten(const StdString & filename) const
+   {
+      return (this->relFiles.find(filename) != this->relFiles.end());
+   }
+
+   void CAxis::addRelFile(const StdString & filename)
+   {
+      this->relFiles.insert(filename);
+   }
+
+   //----------------------------------------------------------------
+
+   StdString CAxis::GetName(void)   { return (StdString("axis")); }
+   StdString CAxis::GetDefName(void){ return (CAxis::GetName()); }
+   ENodeType CAxis::GetType(void)   { return (eAxis); }
+
+   //----------------------------------------------------------------
+
+   void CAxis::checkAttributes(void)
+   {
+      if (this->isChecked) return;
+      StdSize size = this->size.getValue();
+      StdSize true_size = zvalue.getValue()->num_elements();
+      if (size != true_size)
+         ERROR("CAxis::checkAttributes(void)",
+               << "Le tableau \'zvalue\' a une taille diffÃ©rente de celle indiquÃ©e dans l'attribut \'size\'")
+
+      this->isChecked = true;
+   }
+
+   ///---------------------------------------------------------------
+
+} // namespace tree
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/node/axis.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/axis.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/axis.hpp	(revision 219)
@@ -0,0 +1,86 @@
+#ifndef __XMLIO_CAxis__
+#define __XMLIO_CAxis__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "group_factory.hpp"
+
+#include "declare_group.hpp"
+
+namespace xmlioserver {
+namespace tree {
+   
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+   class CAxisGroup;
+   class CAxisAttributes;
+   class CAxis;
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CAxisAttribute
+   BEGIN_DECLARE_ATTRIBUTE_MAP(CAxis)
+   #include "axis_attribute.conf"
+   END_DECLARE_ATTRIBUTE_MAP(CAxis)
+
+   ///--------------------------------------------------------------
+
+   class CAxis
+      : public CObjectTemplate<CAxis>
+      , public CAxisAttributes
+   {
+         /// typedef ///
+         typedef CObjectTemplate<CAxis>   SuperClass;
+         typedef CAxisAttributes SuperClassAttribute;
+
+      public :
+
+         typedef CAxisAttributes RelAttributes;
+         typedef CAxisGroup      RelGroup;
+
+         /// Constructeurs ///
+         CAxis(void);
+         explicit CAxis(const StdString & id);
+         CAxis(const CAxis & axis);       // Not implemented yet.
+         CAxis(const CAxis * const axis); // Not implemented yet.
+
+         /// Accesseurs ///
+         const std::set<StdString> & getRelFiles(void) const;
+
+         /// Test ///
+         bool IsWritten(const StdString & filename) const;
+
+         /// Mutateur ///
+         void addRelFile(const StdString & filename);
+
+         /// VÃ©rifications ///
+         void checkAttributes(void);
+
+         /// Destructeur ///
+         virtual ~CAxis(void);
+
+         /// Accesseurs statiques ///
+         static StdString GetName(void);
+         static StdString GetDefName(void);
+         
+         static ENodeType GetType(void);
+
+      private :
+
+         bool isChecked;
+         std::set<StdString> relFiles;
+
+
+   }; // class CAxis
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CAxisGroup and CAxisDefinition
+   DECLARE_GROUP(CAxis);
+
+   ///--------------------------------------------------------------
+
+} // namespace tree
+} // namespace xmlioserver
+
+#endif // __XMLIO_CAxis__
Index: /XMLIO_V2/dev/common/src/xmlio/node/context.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/context.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/context.cpp	(revision 219)
@@ -0,0 +1,290 @@
+#include "context.hpp"
+
+#include "tree_manager.hpp"
+
+#include "attribute_template_impl.hpp"
+#include "object_template_impl.hpp"
+#include "group_template_impl.hpp"
+
+#include "calendar_type.hpp"
+
+#include "data_treatment.hpp"
+
+namespace xmlioserver {
+namespace tree {
+   
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   CContext::CContext(void)
+      : CObjectTemplate<CContext>(), CContextAttributes()
+      , calendar()
+   { /* Ne rien faire de plus */ }
+
+   CContext::CContext(const StdString & id)
+      : CObjectTemplate<CContext>(id), CContextAttributes()
+      , calendar()
+   { /* 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::setDataTreatment(boost::shared_ptr<data::CDataTreatment> ndatat)
+   {
+      this->datat = ndatat;
+   }
+
+   //----------------------------------------------------------------
+   boost::shared_ptr<data::CDataTreatment> CContext::getDataTreatment(void) const
+   {
+      return (this->datat);
+   }
+
+   //----------------------------------------------------------------
+
+   boost::shared_ptr<date::CCalendar> CContext::getCalendar(void) const
+   {
+      return (this->calendar);
+   }
+   
+   //----------------------------------------------------------------
+   
+   void CContext::setCalendar(boost::shared_ptr<date::CCalendar> newCalendar)
+   {
+      this->calendar = newCalendar;
+      calendar_type.setValue(this->calendar->getId());
+      start_date.setValue(this->calendar->getInitDate().toString());
+   }
+   
+   //----------------------------------------------------------------
+
+   void CContext::solveCalendar(void)
+   {
+      if (this->calendar.get() != NULL) return;
+      if (calendar_type.isEmpty() || start_date.isEmpty())
+         ERROR(" CContext::solveCalendar(void)",
+               << "[ context id = " << this->getId() << " ] "
+               << "Impossible de dÃ©finir un calendrier (un attribut est manquant).");
+
+#define DECLARE_CALENDAR(MType  , mtype)                        \
+   if (calendar_type.getValue().compare(#mtype) == 0)           \
+   {                                                            \
+      this->calendar =  boost::shared_ptr<date::CCalendar>      \
+         (new date::C##MType##Calendar(start_date.getValue())); \
+      return;                                                   \
+   }
+#include "calendar_type.conf"
+
+      ERROR("CContext::solveCalendar(void)",
+            << "[ calendar_type = " << calendar_type.getValue() << " ] "
+            << "Le calendrier n'est pas dÃ©finie dans le code !");
+   }
+   
+   //----------------------------------------------------------------
+
+   void CContext::parse(xml::CXMLNode & node)
+   {
+      CContext::SuperClass::parse(node);
+
+      // PARSING POUR GESTION DES ENFANTS
+      xml::THashAttributes attributes;
+
+      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 name = node.getElementName();
+            attributes.clear();
+            attributes = node.getAttributes();
+
+            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)
+   {
+      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++)
+      {
+         boost::shared_ptr<CContext> context = *it;         
+         CTreeManager::SetCurrentContextId(context->getId());         
+         out << *context << std::endl;
+      }
+      
+      out << "</" << xml::CXMLNode::GetRootName() << " >" << std::endl;
+      CTreeManager::SetCurrentContextId(currentContextId);  
+   }
+   
+   //----------------------------------------------------------------
+   
+   void CContext::toBinary(StdOStream & os) const
+   {
+      SuperClass::toBinary(os);
+       
+#define DECLARE_NODE(Name_, name_)                                         \
+   {                                                                       \
+      ENodeType renum = C##Name_##Definition::GetType();                   \
+      bool val = CObjectFactory::HasObject<C##Name_##Definition>           \
+                     (C##Name_##Definition::GetDefName());                 \
+      os.write (reinterpret_cast<const char*>(&renum), sizeof(ENodeType)); \
+      os.write (reinterpret_cast<const char*>(&val), sizeof(bool));        \
+      if (val) CObjectFactory::GetObject<C##Name_##Definition>             \
+                     (C##Name_##Definition::GetDefName())->toBinary(os);   \
+   }   
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
+   }
+   
+   //----------------------------------------------------------------
+   
+   void CContext::fromBinary(StdIStream & is)
+   {
+      SuperClass::fromBinary(is);
+#define DECLARE_NODE(Name_, name_)                                         \
+   {                                                                       \
+      bool val = false;                                                    \
+      ENodeType renum = Unknown;                                           \
+      is.read (reinterpret_cast<char*>(&renum), sizeof(ENodeType));        \
+      is.read (reinterpret_cast<char*>(&val), sizeof(bool));               \
+      if (renum != C##Name_##Definition::GetType())                        \
+         ERROR("CContext::fromBinary(StdIStream & is)",                    \
+               << "[ renum = " << renum << "] Bad type !");                \
+      if (val) CObjectFactory::CreateObject<C##Name_##Definition>          \
+                  (C##Name_##Definition::GetDefName()) -> fromBinary(is);  \
+   }   
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
+      
+   }
+   
+   
+   //----------------------------------------------------------------
+
+   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 (
+#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();
+      }
+   }
+
+   //----------------------------------------------------------------
+
+   void CContext::CleanTree(void)
+   {
+#define DECLARE_NODE(Name_, name_) C##Name_##Group::ClearAllAttributes();
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
+   }
+   ///---------------------------------------------------------------
+
+} // namespace tree
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/node/context.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/context.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/context.hpp	(revision 219)
@@ -0,0 +1,119 @@
+#ifndef __XMLIO_CContext__
+#define __XMLIO_CContext__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "node_type.hpp"
+#include "calendar.hpp"
+
+#include "declare_group.hpp"
+
+namespace xmlioserver {
+namespace data {
+    class CDataTreatment;
+} // namespace tree
+} // namespace xmlioserver
+
+namespace xmlioserver {
+namespace tree {
+   
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   class CContextGroup;
+   class CContextAttributes;
+   class CContext;
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CFileAttribute
+   BEGIN_DECLARE_ATTRIBUTE_MAP(CContext)
+#  include "context_attribute.conf"
+   END_DECLARE_ATTRIBUTE_MAP(CContext)
+
+   ///--------------------------------------------------------------
+
+   class CContext
+      : public CObjectTemplate<CContext>
+      , public CContextAttributes
+   {
+         /// typedef ///
+         typedef CObjectTemplate<CContext>   SuperClass;
+         typedef CContextAttributes SuperClassAttribute;
+
+      public :
+
+         typedef CContextAttributes RelAttributes;
+         typedef CContext           RelGroup;
+
+         //---------------------------------------------------------
+
+      public :
+
+         /// Constructeurs ///
+         CContext(void);
+         explicit CContext(const StdString & id);
+         CContext(const CContext & context);       // Not implemented yet.
+         CContext(const CContext * const context); // Not implemented yet.
+
+         /// Destructeur ///
+         virtual ~CContext(void);
+
+         //---------------------------------------------------------
+
+      public :
+      
+         /// Mutateurs ///
+         void setCalendar(boost::shared_ptr<date::CCalendar> newCalendar);
+         void setDataTreatment(boost::shared_ptr<data::CDataTreatment> datat);
+      
+         /// Accesseurs ///
+         boost::shared_ptr<date::CCalendar>      getCalendar(void) const;
+         boost::shared_ptr<data::CDataTreatment> getDataTreatment(void) const;
+
+         /// Accesseurs statiques ///
+         static StdString GetName(void);
+         static StdString GetDefName(void);         
+         static ENodeType GetType(void);         
+
+         static boost::shared_ptr<CContextGroup> GetContextGroup(void);
+
+      public :
+
+         /// Traitements ///
+         virtual void solveDescInheritance(const CAttributeMap * const parent = 0);
+         void solveFieldRefInheritance(void);
+         void solveCalendar(void);
+
+         /// Autres mÃ©thodes statiques ///
+         static void ShowTree(StdOStream & out = std::clog);
+         static void CleanTree(void);
+
+         /// Test ///
+         virtual bool hasChild(void) const;
+         
+      public :
+      
+         /// Autres ///
+         virtual void parse(xml::CXMLNode & node);
+
+         virtual StdString toString(void) const;
+         virtual void toBinary  (StdOStream & os) const;
+         virtual void fromBinary(StdIStream & is);
+         
+      private :
+      
+         boost::shared_ptr<date::CCalendar>      calendar;
+         boost::shared_ptr<data::CDataTreatment> datat;
+
+   }; // class CContext
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CContextGroup and CContextDefinition
+   DECLARE_GROUP(CContext);
+
+   ///--------------------------------------------------------------
+
+} // namespace tree
+} // namespace xmlioserver
+
+#endif // __XMLIO_CContext__
Index: /XMLIO_V2/dev/common/src/xmlio/node/domain.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/domain.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/domain.cpp	(revision 219)
@@ -0,0 +1,644 @@
+#include "domain.hpp"
+
+#include "attribute_template_impl.hpp"
+#include "object_template_impl.hpp"
+#include "group_template_impl.hpp"
+
+#include "mpi_manager.hpp"
+
+#include <algorithm>
+
+namespace xmlioserver {
+namespace tree {
+   
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   CDomain::CDomain(void)
+      : CObjectTemplate<CDomain>(), CDomainAttributes()
+      , isChecked(false), local_mask(new CArray<int, 2>(boost::extents[0][0])), relFiles()
+      , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub()
+      , lonvalue_sub(), latvalue_sub()
+   { /* Ne rien faire de plus */ }
+
+   CDomain::CDomain(const StdString & id)
+      : CObjectTemplate<CDomain>(id), CDomainAttributes()
+      , isChecked(false), local_mask(new CArray<int, 2>(boost::extents[0][0])), relFiles()
+      , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub()
+      , lonvalue_sub(), latvalue_sub()
+   { /* Ne rien faire de plus */ }
+
+   CDomain::~CDomain(void)
+   { 
+      this->local_mask.reset();
+      for (StdSize i = 0; i < this->lonvalue_sub.size(); i++)
+      {
+         this->lonvalue_sub[i].reset();
+         this->latvalue_sub[i].reset();
+      }     
+   }
+
+   ///---------------------------------------------------------------
+
+   const std::set<StdString> & CDomain::getRelFiles(void) const
+   {
+      return (this->relFiles);
+   }
+
+   //----------------------------------------------------------------
+   
+   bool CDomain::hasZoom(void) const
+   {
+      return ((this->zoom_ni.getValue() != this->ni_glo.getValue()) && 
+              (this->zoom_nj.getValue() != this->nj_glo.getValue()));
+   }
+   
+   //----------------------------------------------------------------
+   
+   bool CDomain::isEmpty(void) const
+   {
+      return ((this->zoom_ni_loc.getValue() == 0) || 
+              (this->zoom_nj_loc.getValue() == 0));
+   }
+
+   //----------------------------------------------------------------
+
+   bool CDomain::IsWritten(const StdString & filename) const
+   {
+      return (this->relFiles.find(filename) != this->relFiles.end());
+   }
+
+   //----------------------------------------------------------------
+
+   void CDomain::addRelFile(const StdString & filename)
+   {
+      this->relFiles.insert(filename);
+   }
+
+   //----------------------------------------------------------------
+
+   void CDomain::fromBinary(StdIStream & is)
+   {
+      SuperClass::fromBinary(is);
+      
+      this->ibegin_sub.push_back(this->ibegin.getValue());
+      this->jbegin_sub.push_back(this->jbegin.getValue());
+      this->iend_sub.push_back(this->iend.getValue());
+      this->jend_sub.push_back(this->jend.getValue()); 
+      
+      this->latvalue_sub.push_back(this->latvalue.getValue());
+      this->lonvalue_sub.push_back(this->lonvalue.getValue());   
+      
+#define CLEAR_ATT(name_)\
+      SuperClassAttribute::operator[](#name_)->clear()
+
+         CLEAR_ATT(mask);
+         CLEAR_ATT(data_n_index);
+         CLEAR_ATT(data_i_index);
+         CLEAR_ATT(data_j_index);
+         
+         CLEAR_ATT(data_ni);
+         CLEAR_ATT(data_nj);
+         CLEAR_ATT(data_ibegin);
+         CLEAR_ATT(data_jbegin);
+         
+         CLEAR_ATT(ni);
+         CLEAR_ATT(nj);
+         
+#undef CLEAR_ATT
+
+      this->ibegin.setValue(*std::min_element(this->ibegin_sub.begin(),this->ibegin_sub.end()));
+      this->jbegin.setValue(*std::min_element(this->jbegin_sub.begin(),this->jbegin_sub.end()));
+      this->iend.setValue(*std::max_element(this->iend_sub.begin(),this->iend_sub.end()));
+      this->jend.setValue(*std::max_element(this->jend_sub.begin(),this->jend_sub.end()));
+   }
+
+   //----------------------------------------------------------------
+
+   StdString CDomain::GetName(void)   { return (StdString("domain")); }
+   StdString CDomain::GetDefName(void){ return (CDomain::GetName()); }
+   ENodeType CDomain::GetType(void)   { return (eDomain); }
+
+   //----------------------------------------------------------------
+
+   void CDomain::checkGlobalDomain(void)
+   {
+      if ((ni_glo.isEmpty() || ni_glo.getValue() <= 0 ) ||
+          (ni_glo.isEmpty() || nj_glo.getValue() <= 0 ))
+         ERROR("CDomain::checkAttributes(void)",
+               << "[ Id = " << this->getId() << " ] "
+               << "Le domaine global est mal dÃ©fini,"
+               << " vÃ©rifiez les valeurs de \'ni_glo\' et \'nj_glo\' !") ;
+   }
+
+   //----------------------------------------------------------------
+
+   void CDomain::checkLocalIDomain(void)
+   {
+      if (!ni.isEmpty() && !ibegin.isEmpty() && iend.isEmpty())
+         iend.setValue(ibegin.getValue() + ni.getValue() - 1) ;
+
+      else if (!ni.isEmpty() && !iend.isEmpty()   && ibegin.isEmpty())
+         ibegin.setValue( - ni.getValue() + iend.getValue() + 1) ;
+
+      else if (!ibegin.isEmpty() && !iend.isEmpty() && ni.isEmpty())
+         ni.setValue(iend.getValue() - ibegin.getValue() + 1) ;
+
+      else if (!ibegin.isEmpty() && !iend.isEmpty() &&
+               !ni.isEmpty() && (iend.getValue() != ibegin.getValue() + ni.getValue() - 1))
+      {
+         ERROR("CDomain::checkAttributes(void)",
+               << "Le domaine est mal dÃ©fini,"
+               << " iend est diffÃ©rent de (ibegin + ni - 1) !") ;
+      }
+      else
+      {
+         ERROR("CDomain::checkAttributes(void)",
+               << "Le domaine est mal dÃ©fini,"
+               << " deux valeurs au moins parmis iend, ibegin, ni doivent Ãªtre dÃ©finies !") ;
+      }
+
+
+      if (ni.getValue() < 0 || ibegin.getValue() > iend.getValue() ||
+          ibegin.getValue() < 1 || iend.getValue() > ni_glo.getValue())
+         ERROR("CDomain::checkAttributes(void)",
+               << "[ Id = " << this->getId() << " ] "
+               << "Domaine local mal dÃ©fini,"
+               << " vÃ©rifiez les valeurs ni, ni_glo, ibegin, iend") ;
+
+   }
+
+   //----------------------------------------------------------------
+
+   void CDomain::checkLocalJDomain(void)
+   {
+      if (!nj.isEmpty() && !jbegin.isEmpty() && jend.isEmpty())
+         jend.setValue(jbegin.getValue() + nj.getValue() - 1) ;
+
+      else if (!nj.isEmpty() && !jend.isEmpty() && jbegin.isEmpty())
+         jbegin.setValue( - nj.getValue() + jend.getValue() + 1) ;
+
+      else if (!jbegin.isEmpty() && !jend.isEmpty() && nj.isEmpty())
+         nj.setValue(jend.getValue() - jbegin.getValue() + 1) ;
+
+      else if (!jbegin.isEmpty() && !jend.isEmpty() && !nj.isEmpty() &&
+               (jend.getValue() != jbegin.getValue() + nj.getValue() - 1))
+      {
+         ERROR("CDomain::checkAttributes(void)",
+               << "Le domaine est mal dÃ©fini,"
+               << " iend est diffÃ©rent de (jbegin + nj - 1) !") ;
+      }
+      else
+      {
+         ERROR("CDomain::checkAttributes(void)",
+               << "Le domaine est mal dÃ©fini,"
+               << " deux valeurs au moins parmis jend, jbegin, nj doivent Ãªtre dÃ©finies !") ;
+      }
+
+      if (nj.getValue() < 0 || jbegin.getValue() > jend.getValue() ||
+          jbegin.getValue() < 1 || jend.getValue() > nj_glo.getValue())
+         ERROR("CDomain::checkAttributes(void)",
+               << "Domaine local mal dÃ©fini,"
+               << " vÃ©rifiez les valeurs nj, nj_glo, jbegin, jend") ;
+   }
+
+   //----------------------------------------------------------------
+
+   void CDomain::checkMask(void)
+   {
+      using namespace std;
+      
+      int ibegin_mask = 0,
+          jbegin_mask = 0,
+          iend_mask = iend.getValue() - ibegin.getValue(),
+          jend_mask = jend.getValue() - jbegin.getValue();
+      
+      if (!zoom_ibegin.isEmpty())
+      {
+         int zoom_iend = zoom_ibegin.getValue() + zoom_ni.getValue() - 1;
+         int zoom_jend = zoom_jbegin.getValue() + zoom_nj.getValue() - 1;
+         
+         ibegin_mask = max (ibegin.getValue(), zoom_ibegin.getValue());
+         jbegin_mask = max (jbegin.getValue(), zoom_jbegin.getValue());
+         iend_mask   = min (iend.getValue(), zoom_iend);
+         jend_mask   = min (jend.getValue(), zoom_jend);
+                 
+         ibegin_mask -= ibegin.getValue();
+         jbegin_mask -= jbegin.getValue();
+         iend_mask   -= ibegin.getValue();
+         jend_mask   -= jbegin.getValue();
+      }
+      
+      //~ std::cout << "-------------------" << std::endl
+                //~ << "zoom : " << std::boolalpha << this->hasZoom() << std::endl
+                //~ << "size : " << ni.getValue()  << " X " << nj.getValue()   << std::endl
+                //~ << "it : " << ibegin.getValue() << ", " << iend.getValue() << std::endl
+                //~ << "jt : " << jbegin.getValue() << ", " << jend.getValue() << std::endl
+                //~ << "im : " << ibegin_mask << ", " << iend_mask << std::endl
+                //~ << "jm : " << jbegin_mask << ", " << jend_mask << std::endl
+                //~ << "-------------------" << std::endl;
+
+      if (!mask.isEmpty())
+      {
+         ARRAY(bool, 2) mask_ = mask.getValue();
+         unsigned int niu = ni.getValue(), nju = nj.getValue();
+         if ((mask_->shape()[0] != niu) ||
+             (mask_->shape()[1] != nju))
+            ERROR("CDomain::checkAttributes(void)",
+                  <<"Le masque n'a pas la mÃªme taille que le domaine local") ;
+                  
+         for (int i = 0; i < ni.getValue(); i++)
+         {
+            for (int j = 0; j < nj.getValue(); j++)
+            {
+               if (i < ibegin_mask && i > iend_mask &&
+                   j < jbegin_mask && j > jend_mask )
+                     (*mask_)[i][j] = false;
+            }
+         }
+      }
+      else // (!mask.hasValue())
+      { // Si aucun masque n'est dÃ©fini,
+        // on en crÃ©e un nouveau qui valide l'intÃ©gralitÃ© du domaine.
+         ARRAY_CREATE(__arr, bool, 2, [ni.getValue()][nj.getValue()]);
+         for (int i = 0; i < ni.getValue(); i++)
+         {
+            for (int j = 0; j < nj.getValue(); j++)
+            {
+               if (i >= ibegin_mask && i <= iend_mask &&
+                   j >= jbegin_mask && j <= jend_mask )
+                     (*__arr)[i][j] = true;
+               else  (*__arr)[i][j] = false;
+            }
+         }
+               
+         mask.setValue(__arr);
+         __arr.reset();
+      }
+   }
+
+
+   //----------------------------------------------------------------
+
+   void CDomain::checkDomainData(void)
+   {     
+      if (!data_dim.isEmpty() &&
+         !(data_dim.getValue() == 1 || data_dim.getValue() == 2))
+      {
+         ERROR("CDomain::checkAttributes(void)",
+               << "Dimension des donnÃ©es non comptatible (doit Ãªtre 1 ou 2) !") ;
+      }
+      else if (data_dim.isEmpty())
+      {
+         ERROR("CDomain::checkAttributes(void)",
+               << "Dimension des donnÃ©es non dÃ©finie !") ;
+      }
+
+      if (data_ibegin.isEmpty())
+         data_ibegin.setValue(0) ;
+      if (data_jbegin.isEmpty() && (data_dim.getValue() == 2))
+         data_jbegin.setValue(0) ;
+
+      if (!data_ni.isEmpty() && (data_ni.getValue() <= 0))
+      {
+         ERROR("CDomain::checkAttributes(void)",
+               << "Dimension des donnÃ©es nÃ©gative (data_ni).") ;
+      }
+      else if (data_ni.isEmpty())
+      {
+         data_ni.setValue((data_dim.getValue() == 1)
+                           ? (ni.getValue() * nj.getValue())
+                           : ni.getValue());
+      }
+
+      if (data_dim.getValue() == 2)
+      {
+         if (!data_nj.isEmpty() && (data_nj.getValue() <= 0) )
+         {
+            ERROR("CDomain::checkAttributes(void)",
+                  << "Dimension des donnÃ©es nÃ©gative (data_nj).") ;
+         }
+         else if (data_nj.isEmpty())
+            data_nj.setValue(nj.getValue()) ;
+      }
+
+   }
+
+   //----------------------------------------------------------------
+
+   void CDomain::checkCompression(void)
+   {
+      if (!data_i_index.isEmpty())
+      {
+         int ssize = data_i_index.getValue()->size();
+         if (!data_n_index.isEmpty() &&
+            (data_n_index.getValue() != ssize))
+         {
+            ERROR("CDomain::checkAttributes(void)",
+                  <<"Dimension data_i_index incompatible avec data_n_index.") ;
+         }
+         else if (data_n_index.isEmpty())
+            data_n_index.setValue(ssize) ;
+
+         if (data_dim.getValue() == 2)
+         {
+            if (!data_j_index.isEmpty() &&
+               (data_j_index.getValue()->size() != data_i_index.getValue()->size()))
+            {
+               ERROR("CDomain::checkAttributes(void)",
+                     <<"Dimension data_j_index incompatible avec data_i_index.") ;
+            }
+            else if (data_j_index.isEmpty())
+            {
+               ERROR("CDomain::checkAttributes(void)",
+                     <<"La donnÃ©e data_j_index doit Ãªtre renseignÃ©e !") ;
+            }
+         }
+      }
+      else
+      {
+         if (!data_n_index.isEmpty() ||
+            ((data_dim.getValue() == 2) && (!data_j_index.isEmpty())))
+            ERROR("CDomain::checkAttributes(void)", << "data_i_index non dÃ©fini") ;
+      }
+
+      if (data_n_index.isEmpty())
+      { // -> bloc re-vÃ©rifiÃ© OK
+         if (data_dim.getValue() == 1)
+         {
+            const int dni = data_ni.getValue();
+            ARRAY_CREATE(__arri, int, 1, [dni]);
+            data_n_index.setValue(dni);
+            for (int i = 0; i < dni; i++)
+               (*__arri)[i] = i+1 ;
+            data_i_index.setValue(__arri) ;
+         }
+         else   // (data_dim == 2)
+         {
+            const int dni = data_ni.getValue() * data_nj.getValue();
+            
+            ARRAY_CREATE(__arri, int, 1, [dni]);
+            ARRAY_CREATE(__arrj, int, 1, [dni]);               
+            data_n_index.setValue(dni);
+            
+            for(int count = 0, i = 0; i  < data_ni.getValue(); i++)
+            {
+               for(int j = 0; j < data_nj.getValue(); j++, count++)
+               {
+                  (*__arri)[count] = i+1 ;
+                  (*__arrj)[count] = j+1 ;
+               }
+            }
+            data_i_index.setValue(__arri) ;
+            data_j_index.setValue(__arrj) ;            
+            __arri.reset();
+            __arrj.reset();
+         }
+      }
+   }
+
+   //----------------------------------------------------------------
+   
+   void CDomain::completeLonLat(void)
+   {
+      ARRAY_CREATE(lonvalue_temp, double, 1, [0]);
+      ARRAY_CREATE(latvalue_temp, double, 1, [0]);
+      
+      const int ibegin_serv  = ibegin.getValue(),
+                jbegin_serv  = jbegin.getValue(),
+                zoom_ni_serv = zoom_ni_loc.getValue(),
+                zoom_nj_serv = zoom_nj_loc.getValue();
+                      
+      /*std::cout << "Rang du serveur :" << comm::CMPIManager::GetCommRank()   << std::endl
+                << "Begin serv : "     << ibegin_serv << ", " << jbegin_serv <<  std::endl
+                << "End serv : "       << iend_serv   << ", " << jend_serv   <<  std::endl
+                << "Zoom_loc begin : " << zoom_ibegin_loc << ", " << zoom_jbegin_loc <<  std::endl
+                << "Zoom_loc size : "  << zoom_ni_loc << ", " << zoom_nj_loc <<  std::endl;*/
+      
+      
+      ARRAY(double, 1) lonvalue_ = this->lonvalue.getValue(),
+                       latvalue_ = this->latvalue.getValue();
+                       
+      if (this->data_dim.getValue() == 2)
+      {
+         StdSize dm = zoom_ni_serv * zoom_nj_serv;
+         StdSize dn = this->ni.getValue() * this->nj.getValue();
+         
+         lonvalue_->resize(boost::extents[dn]);
+         latvalue_->resize(boost::extents[dn]);
+         lonvalue_temp->resize(boost::extents[dm]);
+         latvalue_temp->resize(boost::extents[dm]);
+         
+         for (StdSize k = 0; k < lonvalue_sub.size(); k++)
+         {
+            int l = 0;
+            ARRAY(double, 1) lonvalue_loc = this->lonvalue_sub[k],
+                             latvalue_loc = this->latvalue_sub[k];
+            const int ibegin_loc = ibegin_sub[k], iend_loc = iend_sub[k],
+                      jbegin_loc = jbegin_sub[k], jend_loc = jend_sub[k];
+                      
+            for (int i = ibegin_loc - ibegin_serv; i < (iend_loc - ibegin_serv + 1); i++)
+            {
+               for (int j = jbegin_loc - jbegin_serv; j < (jend_loc - jbegin_serv + 1); j++)
+               {
+                  (*lonvalue_)[i + j * this->ni.getValue()] = (*lonvalue_loc)[l];              
+                  (*latvalue_)[i + j * this->ni.getValue()] = (*latvalue_loc)[l++];
+               }
+            }
+         }
+         this->lonvalue.setValue(lonvalue_temp);
+         this->latvalue.setValue(latvalue_temp);
+      }
+      else
+      {
+         lonvalue_->resize(boost::extents[this->ni.getValue()]);
+         latvalue_->resize(boost::extents[this->nj.getValue()]);
+         lonvalue_temp->resize(boost::extents[zoom_ni_serv]);
+         latvalue_temp->resize(boost::extents[zoom_nj_serv]);
+         
+         for (StdSize k = 0; k < lonvalue_sub.size(); k++)
+         {
+            int l = 0;
+            ARRAY(double, 1) lonvalue_loc = this->lonvalue_sub[k],
+                             latvalue_loc = this->latvalue_sub[k];
+            const int ibegin_loc = ibegin_sub[k], iend_loc = iend_sub[k],
+                      jbegin_loc = jbegin_sub[k], jend_loc = jend_sub[k];
+                      
+            for (int i = ibegin_loc - ibegin_serv; i < (iend_loc - ibegin_loc + 1); i++)
+               (*lonvalue_)[i] = (*lonvalue_loc)[l++];
+               
+            for (int j = jbegin_loc - jbegin_serv; j < (jend_loc - jbegin_loc + 1); j++)
+               (*latvalue_)[j] = (*latvalue_loc)[l++];
+         }       
+         this->lonvalue.setValue(lonvalue_temp);
+         this->latvalue.setValue(latvalue_temp);
+      }
+   }
+
+   //----------------------------------------------------------------
+
+   void CDomain::checkZoom(void)
+   {
+      // RÃ©solution et vÃ©rification des donnÃ©es globales de zoom.
+      if (!this->zoom_ni.isEmpty() || !this->zoom_nj.isEmpty() ||
+          !this->zoom_ibegin.isEmpty() || !this->zoom_jbegin.isEmpty())
+      {
+         if (this->zoom_ni.isEmpty()     && this->zoom_nj.isEmpty() &&
+             this->zoom_ibegin.isEmpty() && this->zoom_jbegin.isEmpty())
+         {
+            ERROR("CDomain::checkZoom(void)",
+                  <<"Les attributs dÃ©finissant un zoom doivent tous Ãªtre dÃ©finis") ;
+         }
+         else
+         {
+            int zoom_iend = zoom_ibegin.getValue() + zoom_ni.getValue() - 1;
+            int zoom_jend = zoom_jbegin.getValue() + zoom_nj.getValue() - 1;
+                
+            if (zoom_ibegin.getValue() < 1  || zoom_jbegin.getValue() < 1 ||
+                zoom_iend > ni_glo.getValue() || zoom_jend > nj_glo.getValue())
+               ERROR("CDomain::checkZoom(void)",
+                     << "Zoom mal dÃ©fini,"
+                     << " vÃ©rifiez les valeurs zoom_ni, zoom_nj, zoom_ibegin, zoom_ibegin") ;
+         }
+      }
+      else
+      {
+         this->zoom_ni.setValue(this->ni_glo.getValue()); 
+         this->zoom_nj.setValue(this->nj_glo.getValue());
+         this->zoom_ibegin.setValue(1);
+         this->zoom_jbegin.setValue(1);
+      }
+      // RÃ©solution des donnÃ©es locales de zoom.
+      {
+         int zoom_iend = zoom_ibegin.getValue() + zoom_ni.getValue() - 1;
+         int zoom_jend = zoom_jbegin.getValue() + zoom_nj.getValue() - 1;
+         
+         if ((zoom_ibegin.getValue() > iend.getValue()) || 
+             (zoom_iend < ibegin.getValue()))
+         {
+            zoom_ni_loc.setValue(0);
+            zoom_ibegin_loc.setValue(-1);
+         }
+         else
+         {
+            int zoom_ibegin_loc_ = (zoom_ibegin.getValue() > ibegin.getValue()) 
+                                 ? zoom_ibegin.getValue()
+                                 : ibegin.getValue();
+            int zoom_iend_loc_  = (zoom_iend < iend.getValue()) 
+                                 ? zoom_iend
+                                 : iend.getValue();
+            int zoom_ni_loc_ = zoom_iend_loc_ - zoom_ibegin_loc_ + 1;
+            
+            zoom_ni_loc.setValue(zoom_ni_loc_);
+            zoom_ibegin_loc.setValue(zoom_ibegin_loc_-ibegin.getValue()+1);
+         }
+         
+         if ((zoom_jbegin.getValue() > jend.getValue()) || 
+             (zoom_jend < jbegin.getValue()))
+         {
+            zoom_nj_loc.setValue(0);
+            zoom_jbegin_loc.setValue(-1);
+         }
+         else
+         {
+            int zoom_jbegin_loc_ = (zoom_jbegin.getValue() > jbegin.getValue()) 
+                                 ? zoom_jbegin.getValue()
+                                 : jbegin.getValue();
+            int zoom_jend_loc_  = (zoom_jend < jend.getValue()) 
+                                 ? zoom_jend
+                                 : jend.getValue();
+            int zoom_nj_loc_ = zoom_jend_loc_ - zoom_jbegin_loc_ + 1;
+            
+            zoom_nj_loc.setValue(zoom_nj_loc_);
+            zoom_jbegin_loc.setValue(zoom_jbegin_loc_-jbegin.getValue()+1);
+         }
+      }
+   }
+
+   //----------------------------------------------------------------
+
+   void CDomain::checkAttributes(void)
+   {
+      if (this->isChecked) return;
+
+      this->checkGlobalDomain();
+      this->checkLocalIDomain();
+      this->checkLocalJDomain();
+      
+      this->checkZoom();
+
+      if (this->latvalue_sub.size() == 0)
+      { // CÃŽtÃ© client uniquement
+         this->checkMask();
+         this->checkDomainData();
+         this->checkCompression();
+      }
+      else
+      { // CÃŽtÃ© serveur uniquement
+         if (!this->isEmpty())
+            this->completeLonLat();
+      }
+      this->completeMask();
+
+      this->isChecked = true;
+   }
+   
+   //----------------------------------------------------------------
+   
+   void CDomain::completeMask(void)
+   {
+      this->local_mask->resize(boost::extents[zoom_ni_loc.getValue()][zoom_nj_loc.getValue()]);
+   }
+
+   //----------------------------------------------------------------
+
+   ARRAY(int, 2) CDomain::getLocalMask(void) const
+   {
+      return (this->local_mask);
+   }
+   
+   //----------------------------------------------------------------
+   
+   const std::vector<int> & CDomain::getIBeginSub(void) const
+   {
+      return (this->ibegin_sub);
+   }
+   
+   //----------------------------------------------------------------
+   
+   const std::vector<int> & CDomain::getIEndSub(void) const
+   {
+      return (this->iend_sub);
+   }
+   
+   //----------------------------------------------------------------
+   
+   const std::vector<int> & CDomain::getJBeginSub(void) const
+   {
+      return (this->jbegin_sub);
+   }
+   
+   //----------------------------------------------------------------
+   
+   const std::vector<int> & CDomain::getJEndSub(void) const
+   {
+      return (this->iend_sub);
+   }
+   
+   //----------------------------------------------------------------
+   
+   const std::vector<ARRAY(double, 1)> & CDomain::getLonValueSub(void) const
+   {
+      return (this->lonvalue_sub);
+   }
+   
+   //----------------------------------------------------------------
+   
+   const std::vector<ARRAY(double, 1)> & CDomain::getLatValueSub(void) const
+   {
+      return (this->latvalue_sub);
+   }   
+   
+   ///---------------------------------------------------------------
+
+} // namespace tree
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/node/domain.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/domain.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/domain.hpp	(revision 219)
@@ -0,0 +1,125 @@
+#ifndef __XMLIO_CDomain__
+#define __XMLIO_CDomain__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "group_factory.hpp"
+
+#include "declare_group.hpp"
+
+namespace xmlioserver {
+namespace tree {
+   
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+   class CDomainGroup;
+   class CDomainAttributes;
+   class CDomain;
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CDomainAttribute
+   BEGIN_DECLARE_ATTRIBUTE_MAP(CDomain)
+#  include "domain_attribute.conf"
+   END_DECLARE_ATTRIBUTE_MAP(CDomain)
+
+   ///--------------------------------------------------------------
+
+   class CDomain
+      : public CObjectTemplate<CDomain>
+      , public CDomainAttributes
+   {
+         /// typedef ///
+         typedef CObjectTemplate<CDomain>   SuperClass;
+         typedef CDomainAttributes SuperClassAttribute;
+
+      public :
+
+         typedef CDomainAttributes RelAttributes;
+         typedef CDomainGroup      RelGroup;
+
+         /// Constructeurs ///
+         CDomain(void);
+         explicit CDomain(const StdString & id);
+         CDomain(const CDomain & domain);       // Not implemented yet.
+         CDomain(const CDomain * const domain); // Not implemented yet.
+
+         /// VÃ©rifications ///
+         void checkAttributes(void);
+
+      private :
+
+         void checkGlobalDomain(void);
+
+         void checkLocalIDomain(void);
+         void checkLocalJDomain(void);
+
+         void checkMask(void);
+         void checkDomainData(void);
+         void checkCompression(void);
+         
+         void checkZoom(void);
+
+         void completeMask(void);
+
+      public :
+      
+         /// Autres ///
+         virtual void fromBinary(StdIStream & is);
+
+         /// Accesseurs ///
+         ARRAY(int, 2) getLocalMask(void) const;
+         
+         const std::set<StdString> & getRelFiles(void) const;
+
+         const std::vector<int> & getIBeginSub(void) const;
+         const std::vector<int> & getIEndSub(void) const;
+         const std::vector<int> & getJBeginSub(void) const;
+         const std::vector<int> & getJEndSub(void) const;
+         
+         const std::vector<ARRAY(double, 1)> & getLonValueSub(void) const;
+         const std::vector<ARRAY(double, 1)> & getLatValueSub(void) const;
+
+         /// Test ///
+         bool IsWritten(const StdString & filename) const;
+         bool hasZoom(void) const;
+         bool isEmpty(void) const;
+         
+      public :
+      
+         /// Mutateur ///
+         void addRelFile(const StdString & filename);
+         void completeLonLat(void);
+         
+         /// Destructeur ///
+         virtual ~CDomain(void);
+
+         /// Accesseurs statiques ///
+         static StdString GetName(void);
+         static StdString GetDefName(void);
+         
+         static ENodeType GetType(void);
+
+       private :
+
+         /// ProriÃ©tÃ©s protÃ©gÃ©es ///
+         bool isChecked;
+         ARRAY(int, 2) local_mask;
+         std::set<StdString> relFiles;
+
+         std::vector<int> ibegin_sub, iend_sub, jbegin_sub, jend_sub;
+         std::vector<ARRAY(double, 1)> lonvalue_sub, latvalue_sub;
+
+   }; // class CDomain
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CDomainGroup and CDomainDefinition
+   DECLARE_GROUP(CDomain);
+
+   ///--------------------------------------------------------------
+
+} // namespace tree
+} // namespace xmlioserver
+
+#endif // __XMLIO_CDomain__
Index: /XMLIO_V2/dev/common/src/xmlio/node/field.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/field.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/field.cpp	(revision 219)
@@ -0,0 +1,377 @@
+#include "field.hpp"
+
+#include "attribute_template_impl.hpp"
+#include "object_template_impl.hpp"
+#include "group_template_impl.hpp"
+
+#include "node_type.hpp"
+#include "calendar_util.hpp"
+#include "xios_manager.hpp"
+
+namespace xmlioserver{
+namespace tree {
+   
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   CField::CField(void)
+      : CObjectTemplate<CField>(), CFieldAttributes()
+      , refObject(), baseRefObject()
+      , grid(), file()
+      , freq_operation(), freq_write()
+      , last_Write(), last_operation()
+      , foperation()
+      , data()
+   { /* Ne rien faire de plus */ }
+
+   CField::CField(const StdString & id)
+      : CObjectTemplate<CField>(id), CFieldAttributes()
+      , refObject(), baseRefObject()
+      , grid(), file()
+      , freq_operation(), freq_write()
+      , last_Write(), last_operation()
+      , foperation()
+      , data()
+   { /* Ne rien faire de plus */ }
+
+   CField::~CField(void)
+   {
+      this->grid.reset() ;
+      this->file.reset() ;
+      this->foperation.reset() ;
+      this->data.reset() ;
+   }
+
+   //----------------------------------------------------------------
+
+   bool CField::updateDataServer
+      (const date::CDate & currDate, const std::deque<ARRAY(double, 1)> storedClient)
+   {
+      if ((*last_operation + freq_operation) >= currDate)
+      {
+         ARRAY_CREATE(input, double, 1, [0]);
+         this->grid->inputFieldServer(storedClient, input);
+         (*this->foperation)(input);
+         *last_operation = currDate;
+      }
+
+      if ((*last_Write + freq_write) >= currDate)
+      {
+         *last_Write = currDate;
+         return (true);
+      }
+      return (false);
+   }
+
+   //----------------------------------------------------------------
+
+   void CField::setRelFile(const boost::shared_ptr<CFile> _file)
+   { 
+      this->file = _file; 
+   }
+
+   //----------------------------------------------------------------
+
+   StdString CField::GetName(void)   { return (StdString("field")); }
+   StdString CField::GetDefName(void){ return (CField::GetName()); }
+   ENodeType CField::GetType(void)   { return (eField); }
+
+   //----------------------------------------------------------------
+
+   boost::shared_ptr<CGrid> CField::getRelGrid(void) const
+   { 
+      return (this->grid); 
+   }
+
+   //----------------------------------------------------------------
+
+   boost::shared_ptr<CFile> CField::getRelFile(void) const
+   { 
+      return (this->file);
+   }
+
+   //----------------------------------------------------------------
+
+   boost::shared_ptr<CField> CField::getDirectFieldReference(void) const
+   {
+      if (this->field_ref.isEmpty())
+         return (this->getBaseFieldReference());
+
+      if (! CObjectFactory::HasObject<CField>(this->field_ref.getValue()))
+         ERROR("CField::getDirectFieldReference(void)",
+               << "[ ref_name = " << this->field_ref.getValue() << "]"
+               << " invalid field name !");
+
+      return (CObjectFactory::GetObject<CField>(this->field_ref.getValue()));
+   }
+
+   //----------------------------------------------------------------
+
+   const boost::shared_ptr<CField> CField::getBaseFieldReference(void) const
+   { 
+      return (baseRefObject); 
+   }
+
+   //----------------------------------------------------------------
+
+   const std::vector<boost::shared_ptr<CField> > & CField::getAllReference(void) const 
+   { 
+      return (refObject);
+   }
+
+   //----------------------------------------------------------------
+
+   const StdString & CField::getBaseFieldId(void) const
+   { 
+      return (this->getBaseFieldReference()->getId());
+   }
+   
+   //----------------------------------------------------------------
+   
+   const date::CDuration & CField::getFreqOperation(void) const
+   {
+      return (this->freq_operation);
+   }
+   
+   //----------------------------------------------------------------
+   const date::CDuration & CField::getFreqWrite(void) const
+   {
+      return (this->freq_write);
+   }
+   
+   //----------------------------------------------------------------
+         
+   boost::shared_ptr<func::CFunctor> CField::getFieldOperation(void) const
+   {
+      return (this->foperation);
+   }
+
+   //----------------------------------------------------------------
+
+   bool CField::hasDirectFieldReference(void) const
+   { 
+      return (!this->field_ref.isEmpty()); 
+   }
+   
+   //----------------------------------------------------------------
+   
+   ARRAY(double, 1) CField::getData(void) const
+   {
+      return(this->data);
+   }
+
+   //----------------------------------------------------------------
+
+   boost::shared_ptr<date::CDate> CField::getLastWriteDate(void) const
+   {
+      return(this->last_Write);
+   }
+
+   //----------------------------------------------------------------
+
+   boost::shared_ptr<date::CDate> CField::getLastOperationDate(void) const
+   {
+      return(this->last_operation);
+   }
+
+   //----------------------------------------------------------------
+
+   void CField::solveRefInheritance(void)
+   {
+      std::set<CField *> sset;
+      boost::shared_ptr<CField> refer_sptr;
+      CField * refer_ptr = this;
+      
+      this->baseRefObject = CObjectFactory::GetObject<CField>(this);
+      
+      while (refer_ptr->hasDirectFieldReference())
+      {
+         refer_sptr = refer_ptr->getDirectFieldReference();
+         refer_ptr  = refer_sptr.get();
+
+         if(sset.end() != sset.find(refer_ptr))
+         {
+            DEBUG (<< "DÃ©pendance circulaire stoppÃ©e pour l'objet de type CField sur "
+                   << "\"" + refer_ptr->getId() + "\" !");
+            break;
+         }
+
+         SuperClassAttribute::setAttributes(refer_ptr);
+         sset.insert(refer_ptr);
+         baseRefObject = refer_sptr;
+         refObject.push_back(refer_sptr);
+      }
+   }
+
+   //----------------------------------------------------------------
+
+   void  CField::solveOperation(void)
+   {
+      using namespace func;
+      using namespace date;
+       
+      StdString id = this->getBaseFieldReference()->getId();
+      boost::shared_ptr<CContext> _context =
+         CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId());
+
+      if (operation.isEmpty() || freq_op.isEmpty() || this->file->output_freq.isEmpty())
+      {
+         ERROR("CField::solveOperation(void)",
+               << "[ id = " << id << "]"
+               << "Impossible de dÃ©finir une opÃ©ration pour le champ !");
+      }
+
+      if (CXIOSManager::GetStatus() == CXIOSManager::LOC_SERVER)
+      {
+         this->freq_operation =
+             CDuration::FromString(this->file->output_freq.getValue());
+         this->freq_write     =
+             CDuration::FromString(this->file->output_freq.getValue());
+         this->last_Write     = boost::shared_ptr<xmlioserver::date::CDate>
+                        (new date::CDate(_context->getCalendar()->getInitDate()));
+         this->last_operation = boost::shared_ptr<xmlioserver::date::CDate>
+                        (new date::CDate(_context->getCalendar()->getInitDate()));
+         this->foperation     =
+             boost::shared_ptr<func::CFunctor>(new CInstant(this->data));
+      }
+      else
+      {
+         this->freq_operation = CDuration::FromString(freq_op.getValue());
+         this->freq_write     = CDuration::FromString(this->file->output_freq.getValue());
+         this->last_Write     = boost::shared_ptr<xmlioserver::date::CDate>
+                        (new date::CDate(_context->getCalendar()->getInitDate()));
+         this->last_operation = boost::shared_ptr<xmlioserver::date::CDate>
+                        (new date::CDate(_context->getCalendar()->getInitDate()));
+         
+#define DECLARE_FUNCTOR(MType, mtype)              \
+   if  (operation.getValue().compare(#mtype) == 0) \
+   {                                               \
+      boost::shared_ptr<func::CFunctor>            \
+            foperation_(new C##MType(this->data)); \
+      this->foperation = foperation_;              \
+      return;                                      \
+   }
+   
+#include "functor_type.conf"
+         
+         ERROR("CField::solveOperation(void)",
+               << "[ operation = " << operation.getValue() << "]"
+               << "L'opÃ©ration n'est pas dÃ©finie dans le code !");
+      }
+   }
+   
+   //----------------------------------------------------------------
+   
+   void CField::fromBinary(StdIStream & is)
+   {
+      SuperClass::fromBinary(is);
+#define CLEAR_ATT(name_)\
+      SuperClassAttribute::operator[](#name_)->clear()
+
+         CLEAR_ATT(domain_ref);
+         CLEAR_ATT(axis_ref);
+#undef CLEAR_ATT
+
+   }
+
+   //----------------------------------------------------------------
+
+   void CField::solveGridReference(void)
+   {
+      boost::shared_ptr<CDomain> domain;
+      boost::shared_ptr<CAxis> axis;
+
+      if (!domain_ref.isEmpty())
+      {
+         if (CObjectFactory::HasObject<CDomain>(domain_ref.getValue()))
+            domain = CObjectFactory::GetObject<CDomain>(domain_ref.getValue()) ;
+         else
+            ERROR("CField::solveGridReference(void)",
+                  << "RÃ©fÃ©rence au domaine nommÃ© \'"
+                  << domain_ref.getValue() << "\' incorrecte") ;
+      }
+
+      if (!axis_ref.isEmpty())
+      {
+         if (CObjectFactory::HasObject<CAxis>(axis_ref.getValue()))
+            axis = CObjectFactory::GetObject<CAxis>(axis_ref.getValue()) ;
+         else
+            ERROR("CField::solveGridReference(void)",
+                  << "RÃ©fÃ©rence Ã  l'axe nommÃ© \'"
+                  << axis_ref.getValue() <<"\' incorrecte") ;
+      }
+
+      if (!grid_ref.isEmpty())
+      {
+         if (CObjectFactory::HasObject<CGrid>(grid_ref.getValue()))
+            this->grid = CObjectFactory::GetObject<CGrid>(grid_ref.getValue()) ;
+         else
+            ERROR("CField::solveGridReference(void)",
+                  << "RÃ©fÃ©rence Ã  la grille nommÃ©e \'"
+                  << grid_ref.getValue() << "\' incorrecte");
+         if (!domain_ref.isEmpty())
+            DEBUG(<< "DÃ©finition conjointe de la grille "
+                  << "et du domaine, la grille prÃ©vaut..." );
+         if (!axis_ref.isEmpty())
+            DEBUG(<< "DÃ©finition conjointe de la grille "
+                  << "et de l'axe vertical, la grille prÃ©vaut...") ;
+      }
+      else
+      {
+         if (!domain_ref.isEmpty())
+         {
+            if (!axis_ref.isEmpty())
+            {
+               this->grid = CGrid::CreateGrid(domain, axis) ;
+               this->grid_ref.setValue(this->grid->getId());
+            }
+            else
+            {
+               this->grid = CGrid::CreateGrid(domain) ;
+               this->grid_ref.setValue(this->grid->getId());
+            }
+         }
+         else
+         {
+            ERROR("CField::solveGridReference(void)",
+                  << "Le domaine horizontal pour le champ X n'est pas dÃ©fini");
+         }
+      }
+      grid->solveReference() ;
+   }
+
+   } // namespace tree
+
+   ///-------------------------------------------------------------------
+
+   template <>
+      void CGroupTemplate<CField, CFieldGroup, CFieldAttributes>::solveRefInheritance(void)
+   {
+      if (this->group_ref.isEmpty()) return;
+      StdString gref = this->group_ref.getValue();
+
+      if (!CObjectFactory::HasObject<CFieldGroup>(gref))
+         ERROR("CGroupTemplate<CField, CFieldGroup, CFieldAttributes>::solveRefInheritance(void)",
+               << "[ gref = " << gref << "]"
+               << " invalid group name !");
+
+      boost::shared_ptr<CFieldGroup> group
+               = CObjectFactory::GetObject<CFieldGroup>(gref);
+      boost::shared_ptr<CFieldGroup> owner
+               = CObjectFactory::GetObject<CFieldGroup>
+                  (boost::polymorphic_downcast<CFieldGroup*>(this));
+
+      std::vector<boost::shared_ptr<CField> > allChildren  = group->getAllChildren();
+      std::vector<boost::shared_ptr<CField> >::iterator 
+         it = allChildren.begin(), end = allChildren.end();
+      
+      for (; it != end; it++)
+      {
+         boost::shared_ptr<CField> child = *it;
+         if (child->hasId())
+            CGroupFactory::CreateChild(owner)->field_ref.setValue(child->getId());
+      }
+   }
+
+   ///-------------------------------------------------------------------
+
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/node/field.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/field.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/field.hpp	(revision 219)
@@ -0,0 +1,169 @@
+#ifndef __XMLIO_CField__
+#define __XMLIO_CField__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "group_factory.hpp"
+#include "functor.hpp"
+#include "functor_type.hpp"
+#include "duration.hpp"
+#include "date.hpp"
+#include "declare_group.hpp"
+
+namespace xmlioserver {
+namespace tree {
+   
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+   class CFieldGroup;
+   class CFieldAttributes;
+   class CField;
+
+   class CFile;
+   class CGrid;
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CFieldAttribute
+   BEGIN_DECLARE_ATTRIBUTE_MAP(CField)
+#  include "field_attribute.conf"
+   END_DECLARE_ATTRIBUTE_MAP(CField)
+
+   ///--------------------------------------------------------------
+   class CField
+      : public CObjectTemplate<CField>
+      , public CFieldAttributes
+   {
+         /// friend ///
+         friend class CFile;
+
+         /// typedef ///
+         typedef CObjectTemplate<CField>   SuperClass;
+         typedef CFieldAttributes SuperClassAttribute;
+
+      public :
+
+         typedef CFieldAttributes RelAttributes;
+         typedef CFieldGroup      RelGroup;
+
+         /// Constructeurs ///
+         CField(void);
+         explicit CField(const StdString & id);
+         CField(const CField & field);       // Not implemented yet.
+         CField(const CField * const field); // Not implemented yet.
+
+         /// Accesseurs ///
+               boost::shared_ptr<CField> getDirectFieldReference(void) const;
+         const boost::shared_ptr<CField> getBaseFieldReference(void)   const;
+         const std::vector<boost::shared_ptr<CField> > & getAllReference(void) const;
+
+         boost::shared_ptr<CGrid> getRelGrid(void) const ;
+         boost::shared_ptr<CFile> getRelFile(void) const ;
+
+      public :
+
+         const date::CDuration & getFreqOperation(void) const;
+         const date::CDuration & getFreqWrite(void) const;
+
+         boost::shared_ptr<date::CDate> getLastWriteDate(void) const;
+         boost::shared_ptr<date::CDate> getLastOperationDate(void) const;
+
+         boost::shared_ptr<func::CFunctor> getFieldOperation(void) const;
+         
+         ARRAY(double, 1) getData(void) const;
+
+         const StdString & getBaseFieldId(void) const;
+
+         /// Mutateur ///
+         void setRelFile(const boost::shared_ptr<CFile> _file);
+
+         template <StdSize N>
+            inline bool updateData
+               (const date::CDate & currDate, const ARRAY(double, N) data);
+
+         bool updateDataServer
+               (const date::CDate & currDate, const std::deque<ARRAY(double, 1)> storedClient);
+
+      public :
+
+         /// Test ///
+         bool hasDirectFieldReference(void) const;
+
+         /// Traitements ///
+         void solveRefInheritance(void);
+         void solveGridReference(void);
+         void solveOperation(void);
+
+         virtual void fromBinary(StdIStream & is);
+
+         /// Destructeur ///
+         virtual ~CField(void);
+
+         /// Accesseurs statiques ///
+         static StdString GetName(void);
+         static StdString GetDefName(void);
+         
+         static ENodeType GetType(void);
+
+      private :
+
+         /// PropriÃ©tÃ©s privÃ©es ///
+         
+         std::vector<boost::shared_ptr<CField> > refObject;
+         boost::shared_ptr<CField> baseRefObject;
+         boost::shared_ptr<CGrid>  grid ;
+         boost::shared_ptr<CFile>  file;
+
+         date::CDuration freq_operation, freq_write;
+
+         boost::shared_ptr<date::CDate>    last_Write, last_operation;
+         boost::shared_ptr<func::CFunctor> foperation;
+         
+         ARRAY(double, 1) data;
+
+   }; // class CField
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CFieldGroup and CFieldDefinition
+   DECLARE_GROUP(CField);
+
+   } // namespace tree
+
+   ///-----------------------------------------------------------------
+
+   template <>
+      void CGroupTemplate<CField, CFieldGroup, CFieldAttributes>::solveRefInheritance(void);
+
+   ///-----------------------------------------------------------------
+} // namespace xmlioserver
+
+#include "grid.hpp"
+
+namespace xmlioserver {
+namespace tree {
+
+   template <StdSize N>
+      bool CField::updateData(const date::CDate & currDate, const ARRAY(double, N) data)
+   {
+      if ((*last_operation + freq_operation) >= currDate)
+      {
+         ARRAY_CREATE(input, double, 1, [0]);
+         input->resize(boost::extents[data->size()]);
+         this->grid->inputField(data, input);
+         (*this->foperation)(input);
+         *last_operation = currDate;
+      }
+      
+      if ((*last_Write + freq_write) >= currDate)
+      {
+         *last_Write = currDate;
+         return (true);
+      }
+      return (false);
+   };
+
+} // namespace tree
+} // namespace xmlioserver
+
+#endif // __XMLIO_CField__
Index: /XMLIO_V2/dev/common/src/xmlio/node/file.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/file.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/file.cpp	(revision 219)
@@ -0,0 +1,235 @@
+#include "file.hpp"
+
+#include "attribute_template_impl.hpp"
+#include "object_template_impl.hpp"
+#include "group_template_impl.hpp"
+
+#include "object_factory.hpp"
+#include "object_factory_impl.hpp"
+
+namespace xmlioserver {
+namespace tree {
+   
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   CFile::CFile(void)
+      : CObjectTemplate<CFile>(), CFileAttributes()
+      , vFieldGroup(), data_out(), enabledFields()
+   { /* Ne rien faire de plus */ }
+
+   CFile::CFile(const StdString & id)
+      : CObjectTemplate<CFile>(id), CFileAttributes()
+      , vFieldGroup(), data_out(), enabledFields()
+   { /* Ne rien faire de plus */ }
+
+   CFile::~CFile(void)
+   { /* Ne rien faire de plus */ }
+
+   ///---------------------------------------------------------------
+
+   StdString CFile::GetName(void)   { return (StdString("file")); }
+   StdString CFile::GetDefName(void){ return (CFile::GetName()); }
+   ENodeType CFile::GetType(void)   { return (eFile); }
+
+   //----------------------------------------------------------------
+
+   boost::shared_ptr<io::CDataOutput> CFile::getDataOutput(void) const
+   {
+      return (data_out);
+   }
+
+   boost::shared_ptr<CFieldGroup> CFile::getVirtualFieldGroup(void) const
+   {
+      return (this->vFieldGroup);
+   }
+
+   std::vector<boost::shared_ptr<CField> > CFile::getAllFields(void) const
+   {
+      return (this->vFieldGroup->getAllChildren());
+   }
+
+   //----------------------------------------------------------------
+
+   std::vector<boost::shared_ptr<CField> > CFile::getEnabledFields
+      (int default_outputlevel, int default_level, bool default_enabled)
+   {
+      if (!this->enabledFields.empty())
+         return (this->enabledFields);
+
+      const int _outputlevel =
+         (!output_level.isEmpty()) ? output_level.getValue() : default_outputlevel;
+      std::vector<boost::shared_ptr<CField> >::iterator it;
+      this->enabledFields = this->getAllFields();
+
+      for ( it = this->enabledFields.begin() ; it != this->enabledFields.end(); it++ )
+      {
+         if (!(*it)->enabled.isEmpty()) // Si l'attribut 'enabled' est dÃ©fini ...
+         {
+            if (! (*it)->enabled.getValue())
+            { it--; this->enabledFields.erase(it+1); continue; }
+         }
+         else // Si l'attribut 'enabled' n'est pas dÃ©fini ...
+         {
+            if (!default_enabled)
+            { it--; this->enabledFields.erase(it+1); continue; }
+         }
+
+         if (!(*it)->level.isEmpty()) // Si l'attribut 'level' est dÃ©fini ...
+         {
+            if ((*it)->level.getValue() > _outputlevel)
+            { it--; this->enabledFields.erase(it+1); continue; }
+         }
+         else // Si l'attribut 'level' n'est pas dÃ©fini ...
+         {
+            if (default_level > _outputlevel)
+            { it--; this->enabledFields.erase(it+1); continue; }
+         }
+
+         // Le champ est finalement actif, on ajoute la rÃ©fÃ©rence au champ de base.
+         (*it)->setRelFile(CObjectFactory::GetObject(this));
+         (*it)->baseRefObject->refObject.push_back(*it);
+      }
+
+      return (this->enabledFields);
+   }
+
+   //----------------------------------------------------------------
+
+   void CFile::setVirtualFieldGroup(boost::shared_ptr<CFieldGroup> newVFieldGroup)
+   { 
+      this->vFieldGroup = newVFieldGroup; 
+   }
+
+   //----------------------------------------------------------------
+
+   void CFile::setVirtualFieldGroup(const StdString & newVFieldGroupId)
+   {
+      this->setVirtualFieldGroup
+         (CObjectFactory::CreateObject<CFieldGroup>(newVFieldGroupId));
+   }
+
+   //----------------------------------------------------------------
+
+   void CFile::initializeDataOutput(boost::shared_ptr<io::CDataOutput> dout)
+   {
+      this->data_out = dout;
+      this->data_out->writeFile(CObjectFactory::GetObject<CFile>(this));
+      
+      std::vector<boost::shared_ptr<CField> >::iterator it, end = this->enabledFields.end();
+
+      for (it = this->enabledFields.begin() ;it != end; it++)
+      {
+         boost::shared_ptr<CField> field = *it;
+         this->data_out->writeFieldGrid(field);
+      }
+         
+      for (it = this->enabledFields.begin() ;it != end; it++)
+      {
+         boost::shared_ptr<CField> field = *it;
+         this->data_out->writeField(field);
+      }
+         
+      this->data_out->definition_end();
+   }
+
+   //----------------------------------------------------------------
+
+   void CFile::parse(xml::CXMLNode & node)
+   {
+      SuperClass::parse(node);
+      if (node.goToChildElement() & this->hasId())
+      { // Si la dÃ©finition du fichier intÃ©gre des champs et si le fichier est identifiÃ©.
+         node.goToParentElement();
+         this->setVirtualFieldGroup(this->getId());
+         this->getVirtualFieldGroup()->parse(node, false);
+      }
+   }
+   //----------------------------------------------------------------
+
+   StdString CFile::toString(void) const
+   {
+      StdOStringStream oss;
+
+      oss << "<" << CFile::GetName() << " ";
+      if (this->hasId())
+         oss << " id=\"" << this->getId() << "\" ";
+      oss << SuperClassAttribute::toString() << ">" << std::endl;
+      if (this->getVirtualFieldGroup().get() != NULL)
+         oss << *this->getVirtualFieldGroup() << std::endl;
+      oss << "</" << CFile::GetName() << " >";
+      return (oss.str());
+   }
+
+   //----------------------------------------------------------------
+   
+   void CFile::solveDescInheritance(const CAttributeMap * const parent)
+   {
+      SuperClassAttribute::setAttributes(parent);
+      this->getVirtualFieldGroup()->solveDescInheritance(NULL);
+   }
+
+   //----------------------------------------------------------------
+
+   void CFile::solveFieldRefInheritance(void)
+   {
+      // RÃ©solution des hÃ©ritages par rÃ©fÃ©rence de chacun des champs contenus dans le fichier.
+      std::vector<boost::shared_ptr<CField> > allF = this->getAllFields();
+      for (unsigned int i = 0; i < allF.size(); i++)
+         allF[i]->solveRefInheritance();
+   }
+
+   //----------------------------------------------------------------
+
+   void CFile::solveEFGridRef(void)
+   {
+      for (unsigned int i = 0; i < this->enabledFields.size(); i++)
+         this->enabledFields[i]->solveGridReference();
+   }
+
+   //----------------------------------------------------------------
+
+   void CFile::solveEFOperation(void)
+   {
+      for (unsigned int i = 0; i < this->enabledFields.size(); i++)
+         this->enabledFields[i]->solveOperation();
+   }
+   
+   //---------------------------------------------------------------
+   
+   void CFile::toBinary  (StdOStream & os) const
+   {
+      ENodeType genum = CFileGroup::GetType();
+      bool hasVFG = (this->getVirtualFieldGroup().get() != NULL);
+      SuperClass::toBinary(os);
+      
+      os.write (reinterpret_cast<const char*>(&genum) , sizeof(ENodeType));
+      os.write (reinterpret_cast<const char*>(&hasVFG) , sizeof(bool));
+      
+      if (hasVFG)this->getVirtualFieldGroup()->toBinary(os);
+         
+   }
+   
+   //----------------------------------------------------------------
+   
+   void CFile::fromBinary(StdIStream & is)
+   {
+      ENodeType renum = Unknown;
+      bool hasVFG = false;
+      SuperClass::fromBinary(is);
+      
+      is.read (reinterpret_cast<char*>(&renum), sizeof(ENodeType));
+      is.read (reinterpret_cast<char*>(&hasVFG), sizeof(bool));
+      
+      if (renum != CFileGroup::GetType())
+         ERROR("CFile::fromBinary(StdIStream & is)",
+               << "[ renum = " << renum << "] Bad type !");
+      
+      this->setVirtualFieldGroup(this->getId());
+      if (hasVFG)this->getVirtualFieldGroup()->fromBinary(is);
+      
+   }
+
+   ///---------------------------------------------------------------
+
+} // namespace tree
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/node/file.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/file.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/file.hpp	(revision 219)
@@ -0,0 +1,107 @@
+#ifndef __XMLIO_CFile__
+#define __XMLIO_CFile__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "field.hpp"
+#include "declare_group.hpp"
+
+#include "data_output.hpp"
+
+namespace xmlioserver {
+namespace tree {
+   
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+   class CFileGroup;
+   class CFileAttributes;
+   class CFile;
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CFileAttribute
+   BEGIN_DECLARE_ATTRIBUTE_MAP(CFile)
+#  include "file_attribute.conf"
+   END_DECLARE_ATTRIBUTE_MAP(CFile)
+
+   ///--------------------------------------------------------------
+
+   class CFile
+      : public CObjectTemplate<CFile>
+      , public CFileAttributes
+   {
+         /// typedef ///
+         typedef CObjectTemplate<CFile>   SuperClass;
+         typedef CFileAttributes SuperClassAttribute;
+
+      public :
+
+         typedef CFileAttributes RelAttributes;
+         typedef CFileGroup      RelGroup;
+
+         /// Constructeurs ///
+         CFile(void);
+         explicit CFile(const StdString & id);
+         CFile(const CFile & file);       // Not implemented yet.
+         CFile(const CFile * const file); // Not implemented yet.
+
+         /// Accesseurs ///
+         boost::shared_ptr<io::CDataOutput> getDataOutput(void) const;
+         boost::shared_ptr<CFieldGroup> getVirtualFieldGroup(void) const;
+         std::vector<boost::shared_ptr<CField> > getAllFields(void) const;
+
+         std::vector<boost::shared_ptr<CField> >
+            getEnabledFields(int default_outputlevel = 5,
+                             int default_level = 1,
+                             bool default_enabled = true);
+
+      public :
+
+         /// Mutateurs ///
+         void setVirtualFieldGroup(boost::shared_ptr<CFieldGroup> newVFieldGroup);
+         void setVirtualFieldGroup(const StdString & newVFieldGroupId);
+
+         void initializeDataOutput(boost::shared_ptr<io::CDataOutput> dout);
+
+         /// Traitements ///
+         virtual void solveDescInheritance(const CAttributeMap * const parent = 0);
+         void solveFieldRefInheritance(void);
+         void solveEFGridRef(void);
+         void solveEFOperation(void);
+
+         /// Destructeur ///
+         virtual ~CFile(void);
+
+         /// Autres ///
+         virtual void parse(xml::CXMLNode & node);
+         virtual StdString toString(void) const;
+         
+         virtual void toBinary  (StdOStream & os) const;
+         virtual void fromBinary(StdIStream & is);
+
+         /// Accesseurs statiques ///
+         static StdString GetName(void);
+         static StdString GetDefName(void);
+         
+         static ENodeType GetType(void);
+
+      private :
+
+         /// PropriÃ©tÃ©s privÃ©es ///
+         boost::shared_ptr<CFieldGroup> vFieldGroup;
+         boost::shared_ptr<io::CDataOutput> data_out;
+         std::vector<boost::shared_ptr<CField> > enabledFields;
+
+   }; // class CFile
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CFileGroup and CFileDefinition
+   DECLARE_GROUP(CFile);
+
+   ///--------------------------------------------------------------
+
+} // namespace tree
+} // namespace xmlioserver
+
+#endif // __XMLIO_CFile__
Index: /XMLIO_V2/dev/common/src/xmlio/node/grid.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/grid.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/grid.cpp	(revision 219)
@@ -0,0 +1,480 @@
+#include "grid.hpp"
+
+#include "attribute_template_impl.hpp"
+#include "object_template_impl.hpp"
+#include "group_template_impl.hpp"
+
+namespace xmlioserver {
+namespace tree {
+
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   CGrid::CGrid(void)
+      : CObjectTemplate<CGrid>(), CGridAttributes()
+      , withAxis(false), isChecked(false), axis(), domain()
+      , storeIndex(1), out_i_index(1), out_j_index(1), out_l_index(1)
+   { /* Ne rien faire de plus */ }
+
+   CGrid::CGrid(const StdString & id)
+      : CObjectTemplate<CGrid>(id), CGridAttributes()
+      , withAxis(false), isChecked(false), axis(), domain()
+      , storeIndex(1), out_i_index(1), out_j_index(1), out_l_index(1)
+   { /* Ne rien faire de plus */ }
+
+   CGrid::~CGrid(void)
+   { 
+      this->axis.reset() ;
+      this->domain.reset() ;
+      
+      for (StdSize i = 0; i < this->storeIndex.size(); i++)
+      {
+         this->storeIndex[i].reset();
+         this->out_i_index[i].reset();
+         this->out_j_index[i].reset();
+         this->out_l_index[i].reset();
+      }
+   }
+
+   ///---------------------------------------------------------------
+
+   StdString CGrid::GetName(void)    { return (StdString("grid")); }
+   StdString CGrid::GetDefName(void) { return (CGrid::GetName()); }
+   ENodeType CGrid::GetType(void)    { return (eGrid); }
+
+   //----------------------------------------------------------------
+
+   const std::deque<ARRAY(int, 1)> & CGrid::getStoreIndex(void) const
+   { 
+      return (this->storeIndex );
+   }
+
+   //---------------------------------------------------------------
+
+   const std::deque<ARRAY(int, 1)> & CGrid::getOutIIndex(void)  const
+   { 
+      return (this->out_i_index ); 
+   }
+
+   //---------------------------------------------------------------
+
+   const std::deque<ARRAY(int, 1)> & CGrid::getOutJIndex(void)  const
+   { 
+      return (this->out_j_index ); 
+   }
+
+   //---------------------------------------------------------------
+
+   const std::deque<ARRAY(int, 1)> & CGrid::getOutLIndex(void)  const
+   { 
+      return (this->out_l_index ); 
+   }
+
+   //---------------------------------------------------------------
+
+   const boost::shared_ptr<CAxis>   CGrid::getRelAxis  (void) const
+   { 
+      return (this->axis ); 
+   }
+
+   //---------------------------------------------------------------
+
+   const boost::shared_ptr<CDomain> CGrid::getRelDomain(void) const
+   { 
+      return (this->domain ); 
+   }
+
+   //---------------------------------------------------------------
+
+   bool CGrid::hasAxis(void) const 
+   { 
+      return (this->withAxis); 
+   }
+
+   //---------------------------------------------------------------
+
+   StdSize CGrid::getDimension(void) const
+   {
+      return ((this->withAxis)?3:2);
+   }
+
+   //---------------------------------------------------------------
+
+   std::vector<StdSize> CGrid::getShape(void) const
+   {
+      std::vector<StdSize> retvalue;
+      retvalue.push_back(this->domain->ni.getValue());
+      retvalue.push_back(this->domain->nj.getValue());
+      if (this->withAxis)
+         retvalue.push_back(this->axis->size.getValue());
+      return (retvalue);
+   }
+   //---------------------------------------------------------------
+   
+   StdSize CGrid::getSize(void) const
+   {
+      StdSize retvalue = 1;
+      std::vector<StdSize> shape_ = this->getShape();
+      for (StdSize s = 0; s < shape_.size(); s++)
+         retvalue *= shape_[s];
+      return (retvalue);
+   }
+
+   //---------------------------------------------------------------
+
+   void CGrid::solveReference(void)
+   {
+      if (this->isChecked) return;
+      this->solveDomainRef() ;
+      this->solveAxisRef() ;
+      if (this->storeIndex.size() == 1)
+      {
+         this->computeIndex() ;
+      }
+      else
+      {
+         this->computeIndexServer();
+      }
+      this->isChecked = true;
+   }
+
+   //---------------------------------------------------------------
+
+   void CGrid::solveDomainRef(void)
+   {
+      if (!domain_ref.isEmpty())
+      {
+         if (CObjectFactory::HasObject<CDomain>(domain_ref.getValue()))
+         {
+            this->domain = CObjectFactory::GetObject<CDomain>(domain_ref.getValue()) ;
+            domain->checkAttributes() ;
+         }
+         else ERROR("CGrid::solveDomainRef(void)",
+                     << "RÃ©fÃ©rence au domaine incorrecte") ;
+      }
+      else ERROR("CGrid::solveDomainRef(void)",
+                  << "Domaine non dÃ©fini") ;
+   }
+
+   //---------------------------------------------------------------
+
+   void CGrid::solveAxisRef(void)
+   {
+      if (!axis_ref.isEmpty())
+      {
+         this->withAxis = true ;
+         if (CObjectFactory::GetObject<CAxis>(axis_ref.getValue()))
+         {
+            this->axis = CObjectFactory::GetObject<CAxis>(axis_ref.getValue()) ;
+            axis->checkAttributes() ;
+         }
+         else ERROR("CGrid::solveAxisRef(void)",
+                    << "RÃ©fÃ©rence a l'axe incorrecte") ;
+      }
+      else withAxis = false ;
+   }
+
+   //---------------------------------------------------------------
+
+   void CGrid::computeIndex(void)
+   {  
+      const int ni   = domain->ni.getValue() ,
+                nj   = domain->nj.getValue() ,
+                size = (this->hasAxis()) ? axis->size.getValue() : 1 ;
+
+      /*std::cout << ni   << " : "
+                  << nj   << " : "
+                  << size << std::endl;*/
+
+      const int data_dim     = domain->data_dim.getValue() ,
+                data_n_index = domain->data_n_index.getValue() ,
+                data_ibegin  = domain->data_ibegin.getValue() ,
+                data_jbegin  = (data_dim == 2)
+                             ? domain->data_jbegin.getValue() : -1;
+
+      ARRAY(int, 1) data_i_index = domain->data_i_index.getValue() ,
+                    data_j_index = domain->data_j_index.getValue() ;
+
+      /*std::cout << data_n_index  << " : "
+                  << data_i_index  << " : "
+                  << data_j_index  << std::endl; */
+
+      ARRAY(bool, 2) mask = domain->mask.getValue() ;
+
+      int indexCount = 0;
+
+      for(int l = 0; l < size ; l++)
+      {
+         for(int n = 0, i = 0, j = 0; n < data_n_index; n++)
+         {
+            int temp_i = (*data_i_index)[n] + data_ibegin,
+                temp_j = (data_dim == 1) ? -1
+                       : (*data_j_index)[n] + data_jbegin;
+            i = (data_dim == 1) ? (temp_i - 2) % ni
+                                : (temp_i - 1) ;
+            j = (data_dim == 1) ? (temp_i - 2) / ni
+                                : (temp_j - 1) ;
+
+            if ((i >= 0 && i < ni) &&
+                (j >= 0 && j < nj) && (*mask)[i][j])
+               indexCount++ ;
+         }
+      }
+      
+      //std::cout << indexCount  << std::endl;
+      ARRAY_ASSIGN(this->storeIndex[0] , int, 1, [indexCount]);
+      ARRAY_ASSIGN(this->out_l_index[0], int, 1, [indexCount]);
+      ARRAY_ASSIGN(this->out_i_index[0], int, 1, [indexCount]);
+      ARRAY_ASSIGN(this->out_j_index[0], int, 1, [indexCount]);
+
+      for(int count = 0, indexCount = 0,  l = 0; l < size; l++)
+      {
+         for(int n = 0, i = 0, j = 0; n < data_n_index; n++, count++)
+         {
+            int temp_i = (*data_i_index)[n] + data_ibegin,
+                temp_j = (data_dim == 1) ? -1
+                       : (*data_j_index)[n] + data_jbegin;
+            i = (data_dim == 1) ? (temp_i - 2) % ni
+                                : (temp_i - 1) ;
+            j = (data_dim == 1) ? (temp_i - 2) / ni
+                                : (temp_j - 1) ;
+
+            if ((i >= 0 && i < ni) &&
+                (j >= 0 && j < nj) && (*mask)[i][j])
+            {
+               (*this->storeIndex[0]) [indexCount] = count ;
+               (*this->out_l_index[0])[indexCount] = l ;
+               (*this->out_i_index[0])[indexCount] = i ;
+               (*this->out_j_index[0])[indexCount] = j ;
+               indexCount++ ;
+            }
+         }
+      }
+   }
+
+   //----------------------------------------------------------------
+
+   boost::shared_ptr<CGrid>
+      CGrid::CreateGrid(boost::shared_ptr<CDomain> domain)
+   {
+      StdString new_id = StdString("__") + domain->getId() + StdString("__") ;
+      boost::shared_ptr<CGrid> grid =
+         CGroupFactory::CreateChild(CObjectFactory::GetObject<CGridGroup> ("grid_definition"), new_id);
+      grid->domain_ref.setValue(domain->getId());
+      return (grid);
+   }
+
+   boost::shared_ptr<CGrid>
+      CGrid::CreateGrid(boost::shared_ptr<CDomain> domain, boost::shared_ptr<CAxis> axis)
+   {
+      StdString new_id = StdString("__") + domain->getId() +
+                         StdString("_") + axis->getId() + StdString("__") ;
+      boost::shared_ptr<CGrid> grid =
+         CGroupFactory::CreateChild(CObjectFactory::GetObject<CGridGroup> ("grid_definition"), new_id);
+      grid->domain_ref.setValue(domain->getId());
+      grid->axis_ref.setValue(axis->getId());
+      return (grid);
+   }
+
+   //----------------------------------------------------------------
+
+   template <>
+      void CGrid::outputField
+         (const ARRAY(double, 1) stored,  ARRAY(double, 3) field) const
+   {
+      for(StdSize n = 0; n < storeIndex[0]->num_elements(); n++)
+         (*field)[(*out_i_index[0])[n]][(*out_j_index[0])[n]][(*out_l_index[0])[n]] = (*stored)[n] ;
+   }
+
+   //---------------------------------------------------------------
+
+   template <>
+      void CGrid::outputField
+         (const ARRAY(double, 1) stored,  ARRAY(double, 2) field) const
+   {
+      for(StdSize n = 0; n < storeIndex[0]->num_elements(); n++)
+         (*field)[(*out_i_index[0])[n]][(*out_j_index[0])[n]] = (*stored)[n] ;
+   }
+
+   //---------------------------------------------------------------
+
+   template <>
+      void CGrid::outputField
+         (const ARRAY(double, 1) stored,  ARRAY(double, 1) field) const
+   {
+      for(StdSize n = 0; n < storeIndex[0]->num_elements(); n++)
+         (*field)[(*out_i_index[0])[n]] = (*stored)[n] ;
+   }
+
+   //----------------------------------------------------------------
+
+   void CGrid::storeField_arr
+      (const double * const data, ARRAY(double, 1) stored) const
+   {
+      const StdSize size = storeIndex[0]->num_elements() ;
+      stored->resize(boost::extents[size]) ;
+      for(StdSize i = 0; i < size; i++)
+         (*stored)[i] = data[(*storeIndex[0])[i]] ;
+   }
+   
+   //---------------------------------------------------------------
+   
+   void CGrid::toBinary  (StdOStream & os) const
+   {
+      SuperClass::toBinary(os);
+     
+      os.write (reinterpret_cast<const char*>(&this->isChecked), sizeof(bool)); 
+     
+      if (this->isChecked)
+      {
+         this->storeIndex [0]->toBinary(os);
+         this->out_i_index[0]->toBinary(os);
+         this->out_j_index[0]->toBinary(os);
+         this->out_l_index[0]->toBinary(os);
+      }
+   }
+
+   //---------------------------------------------------------------
+   
+   void CGrid::fromBinary(StdIStream & is)
+   {
+      bool hasIndex = false;
+      SuperClass::fromBinary(is);            
+      is.read (reinterpret_cast<char*>(&hasIndex), sizeof(bool)); 
+      
+      if (hasIndex)
+      {
+         ARRAY_CREATE(storeIndex_ , int, 1, [0]);
+         ARRAY_CREATE(out_l_index_, int, 1, [0]);
+         ARRAY_CREATE(out_i_index_, int, 1, [0]);
+         ARRAY_CREATE(out_j_index_, int, 1, [0]);
+         
+         storeIndex_ ->fromBinary(is);
+         out_i_index_->fromBinary(is);
+         out_j_index_->fromBinary(is);
+         out_l_index_->fromBinary(is);
+         
+         this->storeIndex .push_back(storeIndex_);
+         this->out_i_index.push_back(out_i_index_);
+         this->out_j_index.push_back(out_j_index_);
+         this->out_l_index.push_back(out_l_index_);
+      }
+   }
+   
+   //---------------------------------------------------------------
+   
+   void CGrid::computeIndexServer(void)
+   {
+      ARRAY(int, 1) storeIndex_srv   =  this->storeIndex[0];
+      ARRAY(int, 1) out_i_index_srv  =  this->out_i_index[0];
+      ARRAY(int, 1) out_j_index_srv  =  this->out_j_index[0];
+      ARRAY(int, 1) out_l_index_srv  =  this->out_l_index[0];
+
+      ARRAY(int, 2) local_mask =  this->domain->getLocalMask();
+      
+      const std::vector<int> & ibegin = this->domain->getIBeginSub();
+      const std::vector<int> & jbegin = this->domain->getJBeginSub();
+      
+      const int ibegin_srv = this->domain->ibegin.getValue();
+      const int jbegin_srv = this->domain->jbegin.getValue();
+      const int zoom_ni_srv   = this->domain->zoom_ni_loc.getValue();
+      const int zoom_nj_srv   = this->domain->zoom_nj_loc.getValue();
+      
+      const int ibegin_zoom_srv = this->domain->zoom_ibegin_loc.getValue();
+      const int jbegin_zoom_srv = this->domain->zoom_jbegin_loc.getValue();
+           
+      StdSize dn = 0;      
+      for (StdSize j = 1; j < this->out_i_index.size(); j++)
+         dn += this->out_i_index[j]->size();
+         
+      ARRAY_ASSIGN(storeIndex_srv , int, 1, [dn]);
+      ARRAY_ASSIGN(out_i_index_srv, int, 1, [dn]);
+      ARRAY_ASSIGN(out_j_index_srv, int, 1, [dn]);
+      ARRAY_ASSIGN(out_l_index_srv, int, 1, [dn]);
+      
+      for (StdSize i = 0, dn = 0; i < ibegin.size(); i++)
+      {
+         ARRAY(int, 1) storeIndex_cl   =  this->storeIndex [i + 1];
+         ARRAY(int, 1) out_i_index_cl  =  this->out_i_index[i + 1];
+         ARRAY(int, 1) out_j_index_cl  =  this->out_j_index[i + 1];
+         ARRAY(int, 1) out_l_index_cl  =  this->out_l_index[i + 1];
+         
+         const int ibegin_cl = ibegin[i];
+         const int jbegin_cl = jbegin[i];
+         
+         for (StdSize n = dn, m = 0; n < (dn + storeIndex_cl->size()); n++, m++)
+         {
+            (*storeIndex_srv)[n]  = (*storeIndex_cl)[m]  + dn; // Faux mais inutile dans tous les cas.
+            (*out_i_index_srv)[n] = (*out_i_index_cl)[m] 
+                                  + (ibegin_cl - 1) - (ibegin_srv - 1) - (ibegin_zoom_srv - 1);
+            (*out_j_index_srv)[n] = (*out_j_index_cl)[m]
+                                  + (jbegin_cl - 1) - (jbegin_srv - 1) - (jbegin_zoom_srv - 1);
+            (*out_l_index_srv)[n] = (*out_l_index_cl)[m];
+         }
+                  
+         dn += storeIndex_cl->size();                 
+      }
+           
+      if (storeIndex_srv->size() != 0)
+      {
+         const int ibegin_t = 
+            *std::min_element(out_i_index_srv->begin(), out_i_index_srv->end());
+         const int iend_t   =
+            *std::max_element(out_i_index_srv->begin(), out_i_index_srv->end());
+         const int jbegin_t =   
+            *std::min_element(out_j_index_srv->begin(), out_j_index_srv->end());
+         const int jend_t   =
+            *std::max_element(out_j_index_srv->begin(), out_j_index_srv->end());
+            
+         if ((ibegin_t < 0) || (jbegin_t < 0) ||
+             (iend_t >= zoom_ni_srv) || (jend_t >= zoom_nj_srv))
+         {
+            ERROR("CGrid::computeIndexServer(void)",
+                  <<"Erreur d'indexation de la grille au niveau du serveur") ;
+         }
+      }
+
+      if (storeIndex_srv->size() != 0)
+         for (StdSize u = 0; u < storeIndex_srv->size(); u++)
+            (*local_mask)[(*out_i_index_srv)[u]][(*out_j_index_srv)[u]] = 1;
+
+      //~ StdOFStream ofs(this->getId().c_str());
+      //~ for (StdSize h = 0; h < storeIndex_srv->size(); h++)
+      //~ {
+        //~ ofs << "(" << (*storeIndex_srv)[h]  << ";"
+            //~ << (*out_i_index_srv)[h] << ","
+            //~ << (*out_j_index_srv)[h] << ","
+            //~ << (*out_l_index_srv)[h] << ")" << std::endl;
+      //~ }
+      //~ ofs.close();
+      this->storeIndex.resize(1);
+      this->out_i_index.resize(1);
+      this->out_j_index.resize(1);
+      this->out_l_index.resize(1);
+      
+   }
+   
+   //----------------------------------------------------------------
+   
+   void CGrid::inputFieldServer
+         (const std::deque<ARRAY(double, 1)> storedClient,
+                           ARRAY(double, 1)  storedServer) const
+   {
+      if ((this->storeIndex.size()-1 ) != storedClient.size())
+         ERROR("CGrid::inputFieldServer(...)",
+                << "[ Nombre de tableau attendu = " << (this->storeIndex.size()-1) << ", "
+                << "[ Nombre de tableau reÃ§u = "    << storedClient.size() << "] "
+                << "Les donnÃ©es d'un client sont manquantes !") ;
+      if (storedServer.get() != NULL)
+         storedServer->resize(boost::extents[this->storeIndex.size()-1]);
+      else 
+         ARRAY_ASSIGN(storedServer, double, 1, [this->storeIndex.size()-1]);
+         
+      for (StdSize i = 0, n = 0; i < storedClient.size(); i++)
+         for (StdSize j = 0; j < storedClient[i]->num_elements(); j++)
+            (*storedServer)[n++] = (*storedClient[i])[j];
+   }
+
+   ///---------------------------------------------------------------
+
+} // namespace tree
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/node/grid.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/grid.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/grid.hpp	(revision 219)
@@ -0,0 +1,150 @@
+#ifndef __XMLIO_CGrid__
+#define __XMLIO_CGrid__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "group_factory.hpp"
+
+#include "declare_group.hpp"
+#include "domain.hpp"
+#include "axis.hpp"
+
+namespace xmlioserver {
+namespace tree {
+   
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+   class CGridGroup;
+   class CGridAttributes;
+   class CGrid;
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CGridAttribute
+   BEGIN_DECLARE_ATTRIBUTE_MAP(CGrid)
+#  include "grid_attribute.conf"
+   END_DECLARE_ATTRIBUTE_MAP(CGrid)
+
+   ///--------------------------------------------------------------
+
+   class CGrid
+      : public CObjectTemplate<CGrid>
+      , public CGridAttributes
+   {
+         /// typedef ///
+         typedef CObjectTemplate<CGrid>   SuperClass;
+         typedef CGridAttributes SuperClassAttribute;
+
+      public :
+
+         typedef CGridAttributes RelAttributes;
+         typedef CGridGroup      RelGroup;
+
+         /// Constructeurs ///
+         CGrid(void);
+         explicit CGrid(const StdString & id);
+         CGrid(const CGrid & grid);       // Not implemented yet.
+         CGrid(const CGrid * const grid); // Not implemented yet.
+
+         /// Traitements ///
+         void solveReference(void);
+
+         virtual void toBinary  (StdOStream & os) const;
+         virtual void fromBinary(StdIStream & is);
+
+         /// Tests ///
+         bool hasAxis(void) const;
+
+      public :
+
+         /// Accesseurs ///
+         const std::deque<ARRAY(int, 1)> & getStoreIndex(void) const;
+         const std::deque<ARRAY(int, 1)> & getOutIIndex(void)  const;
+         const std::deque<ARRAY(int, 1)> & getOutJIndex(void)  const;
+         const std::deque<ARRAY(int, 1)> & getOutLIndex(void)  const;
+
+         const boost::shared_ptr<CAxis>   getRelAxis  (void) const;
+         const boost::shared_ptr<CDomain> getRelDomain(void) const;
+
+         StdSize getDimension(void) const;
+         StdSize getSize(void) const;
+         std::vector<StdSize> getShape(void) const;
+
+         /// EntrÃ©es-sorties de champs ///
+         template <StdSize n>
+            void inputField(const ARRAY(double, n) field, ARRAY(double, 1) stored) const;
+            
+         void inputFieldServer(const std::deque<ARRAY(double, 1)> storedClient,
+                                                ARRAY(double, 1)  storedServer) const;
+
+         template <StdSize n>
+            void outputField(const ARRAY(double, 1) stored,  ARRAY(double, n) field) const;
+
+         /// Destructeur ///
+         virtual ~CGrid(void);
+
+      public :
+
+         /// Accesseurs statiques ///
+         static StdString GetName(void);
+         static StdString GetDefName(void);
+         
+         static ENodeType GetType(void);
+
+         /// Instanciateurs Statiques ///
+         static boost::shared_ptr<CGrid>
+            CreateGrid(boost::shared_ptr<CDomain> domain);
+         static boost::shared_ptr<CGrid>
+            CreateGrid(boost::shared_ptr<CDomain> domain, boost::shared_ptr<CAxis> axis);
+
+      protected :
+
+         /// EntrÃ©es-sorties de champs (interne) ///
+         void storeField_arr(const double * const data, ARRAY(double, 1) stored) const;
+
+         /// Traitements protÃ©gÃ©s ///
+         void computeIndexServer(void);
+         void computeIndex(void);
+         void solveDomainRef(void);
+         void solveAxisRef(void);
+
+      public:
+
+         /// PropriÃ©tÃ©s privÃ©es ///
+         bool withAxis ;
+         bool isChecked;
+
+         boost::shared_ptr<CAxis>   axis ;
+         boost::shared_ptr<CDomain> domain ;
+
+         std::deque<ARRAY(int, 1)> storeIndex ;
+         std::deque<ARRAY(int, 1)> out_i_index ;
+         std::deque<ARRAY(int, 1)> out_j_index ;
+         std::deque<ARRAY(int, 1)> out_l_index ;
+
+   }; // class CGrid
+
+   ///--------------------------------------------------------------
+
+   template <StdSize n>
+      void CGrid::inputField(const  ARRAY(double, n) field, ARRAY(double, 1) stored) const
+   {
+      if (this->getSize() != field->num_elements())
+         ERROR("CGrid::inputField(const  ARRAY(double, n) field, ARRAY(double, 1) stored)",
+                << "[ Taille des donnÃ©es attendue = " << this->getSize()       << ", "
+                << "Taille des donnÃ©es reÃ§ue = "      << field->num_elements() << " ] "
+                << "Le tableau de donnÃ©es n'a pas la bonne taille !") ;
+      this->storeField_arr(field.data(), stored) ;
+   }
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CGridGroup and CGridDefinition
+   DECLARE_GROUP(CGrid);
+
+   ///--------------------------------------------------------------
+
+} // namespace tree
+} // namespace xmlioserver
+
+#endif // __XMLIO_CGrid__
Index: /XMLIO_V2/dev/common/src/xmlio/node/method.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/method.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/method.hpp	(revision 219)
@@ -0,0 +1,102 @@
+#ifndef __XMLIO_CMethod__
+#define __XMLIO_CMethod__
+
+namespace xmlioserver
+{
+   namespace tree
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+      class CMethodGroup;
+      class CMethodAttributes;
+      class CBaseMethod;
+      class CMethod;
+
+      ///--------------------------------------------------------------
+
+      // Declare/Define CMethodAttribute
+      BEGIN_DECLARE_ATTRIBUTE_MAP(CMethod)
+#include "method_attribute.conf"
+      END_DECLARE_ATTRIBUTE_MAP(CMethod)
+
+      ///--------------------------------------------------------------
+
+      class CBaseMethod
+      { // Declare CMethod functionalities
+         public :
+
+            /// Constructeur et Destructeur ///
+            CBaseMethod(void);
+            ~CBaseMethod(void);
+
+      }; // class CBaseMethod
+
+      ///--------------------------------------------------------------
+
+      class CMethod
+         : public CObjectTemplate<CMethod>
+         , public CMethodAttributes
+         , public CBaseMethod
+      {
+            /// typedef ///
+            typedef CObjectTemplate<CMethod>   SuperClass;
+            typedef CMethodAttributes SuperClassAttribute;
+            typedef CBaseMethod       SuperClassBase;
+
+         public :
+
+            typedef CMethodAttributes RelAttributes;
+            typedef CMethodGroup      RelGroup;
+
+            /// Constructeurs ///
+            CMethod(void);
+            explicit CMethod(const StdString & id);
+            CMethod(const CMethod & method);       // Not implemented yet.
+            CMethod(const CMethod * const method); // Not implemented yet.
+
+            /// Destructeur ///
+            virtual ~CMethod(void);
+
+            /// Accesseurs statiques ///
+            static inline StdString GetName(void);
+            static inline StdString GetDefName(void);
+
+      }; // class CMethod
+
+      ///--------------------------------------------------------------
+
+      // Declare/Define CMethodGroup and CMethodDefinition
+      DECLARE_GROUP(CMethod);
+
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CBaseMethod::CBaseMethod(void)
+      { /* Ne rien faire de plus */ }
+
+      CBaseMethod::~CBaseMethod(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      CMethod::CMethod(void)
+         : CObjectTemplate<CMethod>()
+         , CMethodAttributes()
+         , CBaseMethod()
+      { /* Ne rien faire de plus */ }
+
+      CMethod::CMethod(const StdString & id)
+         : CObjectTemplate<CMethod>(id)
+         , CMethodAttributes()
+         , CBaseMethod()
+      { /* Ne rien faire de plus */ }
+
+      CMethod::~CMethod(void)
+      { /* Ne rien faire de plus */ }
+
+      StdString CMethod::GetName(void)   { return (StdString("method")); }
+      StdString CMethod::GetDefName(void){ return (CMethod::GetName()); }
+
+   } // namespace tree
+} // namespace xmlioserver
+
+#endif // __XMLIO_CMethod__
Index: /XMLIO_V2/dev/common/src/xmlio/node/node_enum.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/node_enum.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/node_enum.hpp	(revision 219)
@@ -0,0 +1,23 @@
+#ifndef __XMLIO_NODE_ENUM__
+#define __XMLIO_NODE_ENUM__
+
+#define DECLARE_NODE(Name_, name_)     ,e##Name_, g##Name_
+#define DECLARE_NODE_PAR(Name_, name_) ,e##Name_, g##Name_
+
+namespace xmlioserver
+{
+   namespace tree
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      typedef enum _node_type
+      {
+         Unknown = 0
+
+#include "node_type.conf"
+
+      } ENodeType;
+
+   } // namespace tree
+} // namespace xmlioserver
+
+#endif // __XMLIO_NODE_ENUM__
Index: /XMLIO_V2/dev/common/src/xmlio/node/node_type.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/node_type.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/node_type.hpp	(revision 219)
@@ -0,0 +1,13 @@
+#ifndef __XMLIO_NODE_TYPE__
+#define __XMLIO_NODE_TYPE__
+
+#include "axis.hpp"
+#include "domain.hpp"
+#include "field.hpp"
+#include "file.hpp"
+#include "grid.hpp"
+//#include "method.hpp"
+//#include "var.hpp"
+#include "context.hpp"
+
+#endif // __XMLIO_NODE_TYPE__
Index: /XMLIO_V2/dev/common/src/xmlio/node/var.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/node/var.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/node/var.hpp	(revision 219)
@@ -0,0 +1,102 @@
+#ifndef __XMLIO_CVar__
+#define __XMLIO_CVar__
+
+namespace xmlioserver
+{
+   namespace tree
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+      class CVarGroup;
+      class CVarAttributes;
+      class CBaseVar;
+      class CVar;
+
+      ///--------------------------------------------------------------
+
+      // Declare/Define CVarAttribute
+      BEGIN_DECLARE_ATTRIBUTE_MAP(CVar)
+#include "var_attribute.conf"
+      END_DECLARE_ATTRIBUTE_MAP(CVar)
+
+      ///--------------------------------------------------------------
+
+      class CBaseVar
+      { // Declare CVar functionalities
+         public :
+
+            /// Constructeur et Destructeur ///
+            CBaseVar(void);
+            ~CBaseVar(void);
+
+      }; // class CBaseVar
+
+      ///--------------------------------------------------------------
+
+      class CVar
+         : public CObjectTemplate<CVar>
+         , public CVarAttributes
+         , public CBaseVar
+      {
+            /// typedef ///
+            typedef CObjectTemplate<CVar>   SuperClass;
+            typedef CVarAttributes SuperClassAttribute;
+            typedef CBaseVar       SuperClassBase;
+
+         public :
+
+            typedef CVarAttributes RelAttributes;
+            typedef CVarGroup      RelGroup;
+
+            /// Constructeurs ///
+            CVar(void);
+            explicit CVar(const StdString & id);
+            CVar(const CVar & var);       // Not implemented yet.
+            CVar(const CVar * const var); // Not implemented yet.
+
+            /// Destructeur ///
+            virtual ~CVar(void);
+
+            /// Accesseurs statiques ///
+            static inline StdString GetName(void);
+            static inline StdString GetDefName(void);
+
+      }; // class CVar
+
+      ///--------------------------------------------------------------
+
+      // Declare/Define CVarGroup and CVarDefinition
+      DECLARE_GROUP(CVar);
+
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CBaseVar::CBaseVar(void)
+      { /* Ne rien faire de plus */ }
+
+      CBaseVar::~CBaseVar(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      CVar::CVar(void)
+         : CObjectTemplate<CVar>()
+         , CVarAttributes()
+         , CBaseVar()
+      { /* Ne rien faire de plus */ }
+
+      CVar::CVar(const StdString & id)
+         : CObjectTemplate<CVar>(id)
+         , CVarAttributes()
+         , CBaseVar()
+      { /* Ne rien faire de plus */ }
+
+      CVar::~CVar(void)
+      { /* Ne rien faire de plus */ }
+
+      StdString CVar::GetName(void)   { return (StdString("var")); }
+      StdString CVar::GetDefName(void){ return (CVar::GetName()); }
+
+   } // namespace tree
+} // namespace xmlioserver
+
+#endif // __XMLIO_CVar__
Index: /XMLIO_V2/dev/common/src/xmlio/object.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/object.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/object.cpp	(revision 219)
@@ -0,0 +1,61 @@
+#include "object.hpp"
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   CObject::CObject(void)
+      : id(), IdDefined(false)
+   { /* Ne rien faire de plus */ }
+
+   CObject::CObject(const StdString & id)
+      : id(id), IdDefined(true)
+   { /* Ne rien faire de plus */ }
+
+   CObject::CObject(const CObject & object)
+      : id(object.id), IdDefined(object.IdDefined)
+   { /* Ne rien faire de plus */ }
+
+   CObject::~CObject(void)
+   { /* Ne rien faire de plus */ }
+
+   const StdString & CObject::getId(void) const 
+   { 
+      return (this->id);
+   }
+
+   bool CObject::hasId(void) const  
+   { 
+      return (this->IdDefined);
+   }
+
+   void CObject::resetId(void) 
+   { 
+      this->IdDefined = false ;
+   }
+
+   void CObject::setId(const StdString & id)
+   { 
+      this->id = id ;
+      this->IdDefined = true ;
+   }
+
+   bool CObject::operator==(const CObject & other) const
+   {
+      if(!this->hasId() || !other.hasId())
+         return (false);
+      return (this->id.compare(other.id) == 0);
+   }
+
+   bool CObject::operator!=(const CObject & other) const
+   { 
+      return (!(*this == other));
+   }
+
+   StdOStream & operator << (StdOStream & os, const CObject & object)
+   { 
+      os << object.toString();
+      return (os);
+   }
+
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/object.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/object.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/object.hpp	(revision 219)
@@ -0,0 +1,58 @@
+#ifndef __XMLIO_CObject__
+#define __XMLIO_CObject__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+   class CObject
+   {
+      public :
+
+         /// Destructeur ///
+         virtual ~CObject(void);
+
+         /// Accesseurs ///
+         const StdString & getId(void) const;
+
+         /// Mutateurs ///
+         void resetId(void);
+         void setId(const StdString & id);
+
+         /// Tests ///
+         bool hasId(void) const;
+
+         /// OpÃ©rateurs ///
+         bool operator==(const CObject & other) const;
+         bool operator!=(const CObject & other) const;
+
+         /// Flux ///
+         friend StdOStream & operator << (StdOStream & os, const CObject & object);
+
+         /// Autres ///
+         virtual StdString toString(void) const = 0;
+         virtual void fromString(const StdString & str) = 0;
+
+      protected :
+
+         /// Constructeurs ///
+         CObject(void);
+         explicit CObject(const StdString & id);
+         CObject(const CObject & object);
+         CObject(const CObject * const object); // Not implemented.
+
+      private :
+
+         /// PropriÃ©tÃ©s ///
+         StdString id ;    // identifiant de l'Object
+         bool IdDefined ;  // true si l'object est identifiÃ©, false sinon.
+
+   }; // class CObject
+
+} // namespace xmlioserver
+
+#endif // __XMLIO_CObject__
+
Index: /XMLIO_V2/dev/common/src/xmlio/object_factory.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/object_factory.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/object_factory.cpp	(revision 219)
@@ -0,0 +1,15 @@
+#include "object_factory.hpp"
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   StdString CObjectFactory::CurrContext("");
+
+   void CObjectFactory::SetCurrentContextId(const StdString & context)
+   { CObjectFactory::CurrContext = context; }
+
+   StdString & CObjectFactory::GetCurrentContextId(void)
+   { return (CObjectFactory::CurrContext); }
+
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/object_factory.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/object_factory.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/object_factory.hpp	(revision 219)
@@ -0,0 +1,59 @@
+#ifndef __XMLIO_CObjectFactory__
+#define __XMLIO_CObjectFactory__
+
+/// boost headers ///
+#include <boost/shared_ptr.hpp>
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+#include "object_template.hpp"
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   class CObjectFactory
+   {
+      public :
+
+         /// Mutateurs ///
+         static void SetCurrentContextId(const StdString & context);
+
+         /// Accesseurs ///
+         static StdString & GetCurrentContextId(void);
+
+         template <typename U>
+            static inline boost::shared_ptr<U> GetObject(const StdString & id);
+
+         template <typename U>
+            static inline boost::shared_ptr<U> GetObject(const U * const object);
+
+         template <typename U>
+            static inline int GetObjectNum(void);
+         template <typename U>
+            static inline int GetObjectIdNum(void);
+
+         template <typename U>
+            static inline const std::vector<boost::shared_ptr<U> > &
+               GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId());
+
+         /// Tests ///
+         template <typename U>
+            static inline bool HasObject(const StdString & id);
+
+         /// Instanciateur ///
+         template <typename U>
+            static inline boost::shared_ptr<U> CreateObject(const StdString & id = StdString(""));
+
+
+      private :
+
+         /// PropriÃ©tÃ©s statiques ///
+         static StdString CurrContext;
+
+   }; // class CObjectFactory
+} // namespace xmlioserver
+
+#include "object_factory_impl.hpp"
+
+#endif // __XMLIO_CObjectFactory__
Index: /XMLIO_V2/dev/common/src/xmlio/object_factory_impl.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/object_factory_impl.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/object_factory_impl.hpp	(revision 219)
@@ -0,0 +1,109 @@
+#ifndef __XMLIO_CObjectFactory_impl__
+#define __XMLIO_CObjectFactory_impl__
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+   template <typename U>
+       int CObjectFactory::GetObjectNum(void)
+   {
+      if (CurrContext.size() == 0)
+         ERROR("CObjectFactory::GetObjectNum(void)",
+               << "please define current context id !");
+      return (U::AllVectObj[CObjectFactory::CurrContext].size());
+   }
+
+   template <typename U>
+      int CObjectFactory::GetObjectIdNum(void)
+   {
+      if (CurrContext.size() == 0)
+         ERROR("CObjectFactory::GetObjectIdNum(void)",
+               << "please define current context id !");
+      return (U::AllMapObj[CObjectFactory::CurrContext].size());
+   }
+
+   template <typename U>
+      bool CObjectFactory::HasObject(const StdString & id)
+   {
+      if (CurrContext.size() == 0)
+         ERROR("CObjectFactory::HasObject(const StdString & id)",
+               << "[ id = " << id << " ] please define current context id !");
+      return (U::AllMapObj[CObjectFactory::CurrContext].find(id) !=
+              U::AllMapObj[CObjectFactory::CurrContext].end());
+   }
+
+   template <typename U>
+      boost::shared_ptr<U> CObjectFactory::GetObject(const U * const object)
+   {
+      if (CurrContext.size() == 0)
+         ERROR("CObjectFactory::GetObject(const U * const object)",
+               << "please define current context id !");
+      std::vector<boost::shared_ptr<U> > & vect =
+                     U::AllVectObj[CObjectFactory::CurrContext];
+                     
+      typename std::vector<boost::shared_ptr<U> >::const_iterator 
+         it = vect.begin(), end = vect.end();
+      
+      for (; it != end; it++)
+      {
+         boost::shared_ptr<U> ptr = *it;
+         if (ptr.get() == object)
+            return (ptr);
+      }
+      
+      ERROR("CObjectFactory::GetObject(const U * const object)",
+               << "[type = " << U::GetName() << "]"
+               << " object was not found !");
+      return (boost::shared_ptr<U>()); // jamais atteint
+   }
+
+   template <typename U>
+      boost::shared_ptr<U> CObjectFactory::GetObject(const StdString & id)
+   {
+      if (CurrContext.size() == 0)
+         ERROR("CObjectFactory::GetObject(const StdString & id)",
+               << "[ id = " << id << " ] please define current context id !");
+      if (!CObjectFactory::HasObject<U>(id))
+         ERROR("CObjectFactory::GetObject(const StdString & id)",
+               << "[ id = " << id << ", U = " << U::GetName() << " ] "
+               << " object is not referenced !");
+      return (U::AllMapObj[CObjectFactory::CurrContext][id]);
+   }
+
+   template <typename U>
+      boost::shared_ptr<U> CObjectFactory::CreateObject(const StdString & id)
+   {
+      if (CurrContext.size() == 0)
+         ERROR("CObjectFactory::CreateObject(const StdString & id)",
+               << "[ id = " << id << " ] please define current context id !");
+      if (id.size() == 0)
+      {
+         boost::shared_ptr<U> value(new U);
+         U::AllVectObj[CObjectFactory::CurrContext].insert
+            (U::AllVectObj[CObjectFactory::CurrContext].end(), value);
+         return (value);
+      }
+      else if (CObjectFactory::HasObject<U>(id))
+      {
+         return (CObjectFactory::GetObject<U>(id));
+      }
+      else
+      {
+         boost::shared_ptr<U> value(new U(id));
+         U::AllVectObj[CObjectFactory::CurrContext].insert
+            (U::AllVectObj[CObjectFactory::CurrContext].end(), value);
+         U::AllMapObj[CObjectFactory::CurrContext].insert(std::make_pair(id, value));
+         return (value);
+      }
+   }
+
+   template <typename U>
+      const std::vector<boost::shared_ptr<U> > &
+         CObjectFactory::GetObjectVector(const StdString & context)
+   {
+      return (U::AllVectObj[context]);
+   }
+
+} // namespace xmlioserver
+
+#endif // __XMLIO_CObjectFactory_impl__
Index: /XMLIO_V2/dev/common/src/xmlio/object_template.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/object_template.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/object_template.hpp	(revision 219)
@@ -0,0 +1,77 @@
+#ifndef __XMLIO_CObjectTemplate__
+#define __XMLIO_CObjectTemplate__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "attribute_map.hpp"
+#include "node_enum.hpp"
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   template <class T>
+      class CObjectTemplate
+         : public CObject
+         , public virtual tree::CAttributeMap
+   {
+
+         /// Friend ///
+         friend class CObjectFactory;
+
+         /// Typedef ///
+         typedef tree::CAttributeMap SuperClassMap;
+         typedef CObject SuperClass;
+         typedef T DerivedType;
+
+      public :
+
+         /// Autres ///
+         virtual StdString toString(void) const;
+         virtual void fromString(const StdString & str);
+
+         virtual void toBinary  (StdOStream & os) const;
+         virtual void fromBinary(StdIStream & is);
+
+         virtual void parse(xml::CXMLNode & node);
+         
+         /// Accesseurs ///
+         tree::ENodeType getType(void) const;
+
+         /// Test ///
+         virtual bool hasChild(void) const;
+
+         /// Traitements ///
+         virtual void solveDescInheritance(const CAttributeMap * const parent = 0);
+
+         /// Traitement statique ///
+         static void ClearAllAttributes(void);
+
+         /// Accesseur statique ///
+         static std::vector<boost::shared_ptr<DerivedType> > &
+            GetAllVectobject(const StdString & contextId);
+
+         /// Destructeur ///
+         virtual ~CObjectTemplate(void);
+
+      protected :
+
+         /// Constructeurs ///
+         CObjectTemplate(void);
+         explicit CObjectTemplate(const StdString & id);
+         CObjectTemplate(const CObjectTemplate<T> & object,
+                         bool withAttrList = true, bool withId = true);
+         CObjectTemplate(const CObjectTemplate<T> * const object); // Not implemented.
+
+      private :
+
+         /// PropriÃ©tÃ©s statiques ///
+         static xios_map<StdString,
+                xios_map<StdString,
+                boost::shared_ptr<DerivedType> > > AllMapObj; 
+         static xios_map<StdString,
+                std::vector<boost::shared_ptr<DerivedType> > > AllVectObj;
+
+   }; // class CObjectTemplate
+} // namespace xmlioserver
+
+#endif // __XMLIO_CObjectTemplate__
Index: /XMLIO_V2/dev/common/src/xmlio/object_template_impl.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/object_template_impl.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/object_template_impl.hpp	(revision 219)
@@ -0,0 +1,140 @@
+#ifndef __XMLIO_CObjectTemplate_impl__
+#define __XMLIO_CObjectTemplate_impl__
+
+namespace xmlioserver
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+   template <class T>
+      xios_map<StdString,
+      xios_map<StdString,
+      boost::shared_ptr<T> > > CObjectTemplate<T>::AllMapObj;
+
+   template <class T>
+      xios_map<StdString,
+      std::vector<boost::shared_ptr<T> > > CObjectTemplate<T>::AllVectObj;
+
+   template <class T>
+      CObjectTemplate<T>::CObjectTemplate(void)
+         : tree::CAttributeMap()
+         , CObject()
+   { /* Ne rien faire de plus */ }
+
+   template <class T>
+      CObjectTemplate<T>::CObjectTemplate(const StdString & id)
+         : tree::CAttributeMap()
+         , CObject(id)
+   { /* Ne rien faire de plus */ }
+
+   template <class T>
+      CObjectTemplate<T>::CObjectTemplate
+         (const CObjectTemplate<T> & object, bool withAttrList, bool withId)
+         : tree::CAttributeMap()
+         , CObject()
+   {
+      if (object.hasId() && withId)
+         this->setId(object.getId());
+      ERROR("CObjectTemplate<T> construtor 3", << "Not completly implemented yet !");
+   }
+   
+   template <class T>
+      CObjectTemplate<T>::~CObjectTemplate(void)
+   { /* Ne rien faire de plus */ }
+
+   ///--------------------------------------------------------------
+
+   template <class T>
+      std::vector<boost::shared_ptr<T> > &
+         CObjectTemplate<T>::GetAllVectobject(const StdString & contextId)
+   { 
+      return (CObjectTemplate<T>::AllVectObj[contextId]); 
+   }
+   
+   //---------------------------------------------------------------
+   
+   template <class T>
+      StdString CObjectTemplate<T>::toString(void) const
+   {
+      StdOStringStream oss;
+      oss << "<" << T::GetName();
+      if (this->hasId())
+         oss << " id=\"" << this->getId() << "\"";
+      oss << " " << SuperClassMap::toString() << "/>";
+      return (oss.str());
+   }
+
+   template <class T>
+      void CObjectTemplate<T>::fromString(const StdString & str)
+   { 
+      ERROR("CObjectTemplate<T>::fromString(str)",
+            << "[ str = " << str << "] Not implemented yet !"); 
+   }
+   
+   //---------------------------------------------------------------
+   
+   template <class T>
+      void CObjectTemplate<T>::toBinary(StdOStream & os) const
+   {
+      SuperClassMap::toBinary(os);    
+   }
+      
+   template <class T>
+      void CObjectTemplate<T>::fromBinary(StdIStream & is)
+   {
+      SuperClassMap::fromBinary(is); 
+   }
+   
+   //---------------------------------------------------------------
+
+   template <class T>
+      void CObjectTemplate<T>::parse(xml::CXMLNode & node)
+   {
+      xml::THashAttributes attributes = node.getAttributes();
+      CAttributeMap::setAttributes(attributes);
+   }
+
+   //---------------------------------------------------------------
+
+   template <class T>
+      tree::ENodeType CObjectTemplate<T>::getType(void) const
+   {
+      return (T::GetType());
+   }
+   
+   //---------------------------------------------------------------
+
+   template <class T>
+      bool CObjectTemplate<T>::hasChild(void) const
+   { 
+      return (false); 
+   }
+
+   //---------------------------------------------------------------
+
+   template <class T>
+      void CObjectTemplate<T>::solveDescInheritance(const CAttributeMap * const parent)
+   { 
+      SuperClassMap::setAttributes(parent); 
+   }
+
+   //---------------------------------------------------------------
+
+   template <class T>
+      void CObjectTemplate<T>::ClearAllAttributes(void)
+   {
+      std::vector<boost::shared_ptr<T> > & avect =
+         CObjectTemplate<T>::GetAllVectobject(CObjectFactory::GetCurrentContextId());
+      typename std::vector<boost::shared_ptr<T> >::iterator
+            it = avect.begin(), end = avect.end();
+
+      for (;it != end; it++)
+      {
+         CAttributeMap & amap = **it;
+         amap.clearAllAttributes();
+      }
+   }
+
+   ///--------------------------------------------------------------
+
+} // namespace xmlioserver
+
+#endif // __XMLIO_CObjectTemplate_impl__
Index: /XMLIO_V2/dev/common/src/xmlio/output/nc4_data_output.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/output/nc4_data_output.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/output/nc4_data_output.cpp	(revision 219)
@@ -0,0 +1,500 @@
+#include "nc4_data_output.hpp"
+
+#include <boost/lexical_cast.hpp>
+#include "attribute_template_impl.hpp"
+
+#include "file.hpp"
+#include "calendar.hpp"
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CNc4DataOutput::CNc4DataOutput
+         (const StdString & filename, bool exist)
+            : SuperClass()
+            , SuperClassWriter(filename, exist)
+            , filename(filename)
+      {
+         StdString timeid = StdString("time_counter");
+         SuperClass::type = MULTI_FILE;
+         if (!exist)
+            SuperClassWriter::addDimension(timeid);
+      }
+
+      CNc4DataOutput::CNc4DataOutput
+         (const StdString & filename, bool exist, bool multigroup, MPI_Comm comm_server)
+            : SuperClass()
+            , SuperClassWriter(filename, exist, &comm_server)
+            , comm_server(comm_server)
+            , filename(filename)
+      {
+         StdString timeid = StdString("time_counter");
+         SuperClass::type = (multigroup) ? MULTI_GROUP : ONE_FILE;
+         if (!exist)
+            SuperClassWriter::addDimension(timeid);
+      }
+
+      CNc4DataOutput::CNc4DataOutput
+         (const StdString & filename, bool exist, bool multigroup, comm::MPIComm comm_server, bool)
+            : SuperClass()
+            , SuperClassWriter(filename, exist, &comm_server, true)
+            , filename(filename)
+      {
+         StdString timeid = StdString("time_counter");
+         SuperClass::type = (multigroup) ? MULTI_GROUP : ONE_FILE;
+         if (!exist)
+            SuperClassWriter::addDimension(timeid);
+      }
+
+      CNc4DataOutput::~CNc4DataOutput(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      const StdString & CNc4DataOutput::getFileName(void) const
+      {
+         return (this->filename);
+      }
+
+      //---------------------------------------------------------------
+
+      void CNc4DataOutput::writeDomain_(const boost::shared_ptr<tree::CDomain> domain)
+      {
+         if (domain->IsWritten(this->filename)) return;
+         domain->checkAttributes();
+         
+         if (domain->isEmpty()) return;
+
+         int dvm = 1;
+
+         std::vector<StdString> dim0, dim1;
+         StdString domid     = (!domain->name.isEmpty())
+                             ? domain->name.getValue() : domain->getId();
+         StdString lonid     = StdString("lon_").append(domid);
+         StdString latid     = StdString("lat_").append(domid);
+         StdString lonid_loc = StdString("lon_").append(domid).append("_local");
+         StdString latid_loc = StdString("lat_").append(domid).append("_local");
+         StdString maskid    = StdString("mask_").append(domid).append("_local");
+
+         ARRAY(int, 2) mask = domain->getLocalMask();
+
+         unsigned int ssize = domain->zoom_ni_loc.getValue() * domain->zoom_nj_loc.getValue();
+         bool isCurvilinear = (domain->lonvalue.getValue()->size() == ssize);
+
+         SuperClassWriter::addDimension(lonid, domain->ni_glo.getValue());
+         SuperClassWriter::addDimension(latid, domain->nj_glo.getValue());
+
+         if (isCurvilinear)
+         {
+            dim0.push_back(latid_loc); dim0.push_back(lonid_loc);
+            lonid = StdString("nav_lon_").append(domid);
+            latid = StdString("nav_lat_").append(domid);
+         }
+         else
+         {
+            dim0.push_back(latid_loc);
+            dim1.push_back(lonid_loc);
+         }
+         switch (SuperClass::type)
+         {
+            case (MULTI_FILE) :
+            {
+               SuperClassWriter::addDimension(lonid_loc, domain->zoom_ni_loc.getValue());
+               SuperClassWriter::addDimension(latid_loc, domain->zoom_nj_loc.getValue());
+               this->writeLocalAttributes(domain->zoom_ibegin_loc.getValue(),
+                                          domain->zoom_ni_loc.getValue(),
+                                          domain->zoom_jbegin_loc.getValue(),
+                                          domain->zoom_nj_loc.getValue(),
+                                          domid);
+               if (isCurvilinear)
+               {
+                  SuperClassWriter::addVariable(latid, NC_FLOAT, dim0);
+                  SuperClassWriter::addVariable(lonid, NC_FLOAT, dim0);
+               }
+               else
+               {
+                  SuperClassWriter::addVariable(latid, NC_FLOAT, dim0);
+                  SuperClassWriter::addVariable(lonid, NC_FLOAT, dim1);
+               }
+               this->writeAxisAttributes
+                  (latid, "X", "longitude", "Longitude", "degrees_east", domid);
+               this->writeAxisAttributes
+                  (lonid, "Y", "latitude", "Latitude", "degrees_north", domid);
+
+               dim0.clear();
+               dim0.push_back(latid_loc);
+               dim0.push_back(lonid_loc);
+
+               SuperClassWriter::addVariable(maskid, NC_INT, dim0);
+
+               this->writeMaskAttributes(maskid,
+                  domain->data_dim.getValue()/*,
+                  domain->data_ni.getValue(),
+                  domain->data_nj.getValue(),
+                  domain->data_ibegin.getValue(),
+                  domain->data_jbegin.getValue()*/);
+                  
+               SuperClassWriter::setDefaultValue(maskid, &dvm);
+
+               SuperClassWriter::definition_end();
+               SuperClassWriter::writeData(domain->latvalue.getValue(), latid, true, 0);
+               SuperClassWriter::writeData(domain->lonvalue.getValue(), lonid, true, 0);
+               SuperClassWriter::writeData(mask, maskid);
+               SuperClassWriter::definition_start();
+
+               break;
+            }
+            default :
+               ERROR("CNc4DataOutput::writeDomain(domain)",
+                     << "[ type = " << SuperClass::type << "]"
+                     << " not implemented yet !");
+         }
+         domain->addRelFile(this->filename);
+      }
+
+      //--------------------------------------------------------------
+
+      void CNc4DataOutput::writeAxis_(const boost::shared_ptr<tree::CAxis> axis)
+      {
+         if (axis->IsWritten(this->filename)) return;
+         axis->checkAttributes();
+         std::vector<StdString> dims;
+         StdString axisid = (!axis->name.isEmpty())
+                           ? axis->name.getValue() : axis->getId();
+         SuperClassWriter::addDimension(axisid, axis->size.getValue());
+         dims.push_back(axisid);
+
+         switch (SuperClass::type)
+         {
+            case (MULTI_FILE) :
+            {
+               SuperClassWriter::addVariable(axisid, NC_FLOAT, dims);
+
+               SuperClassWriter::addAttribute("axis", StdString("Z"), &axisid);
+
+               if (!axis->standard_name.isEmpty())
+                  SuperClassWriter::addAttribute
+                     ("standard_name",  axis->standard_name.getValue(), &axisid);
+
+               if (!axis->long_name.isEmpty())
+                  SuperClassWriter::addAttribute
+                     ("long_name", axis->long_name.getValue(), &axisid);
+
+               if (!axis->unit.isEmpty())
+                  SuperClassWriter::addAttribute
+                     ("units", axis->unit.getValue(), &axisid);
+
+               SuperClassWriter::definition_end();
+               SuperClassWriter::writeData(axis->zvalue.getValue(), axisid, true, 0);
+               SuperClassWriter::definition_start();
+
+               break;
+            }
+            default :
+               ERROR("CNc4DataOutput::writeDomain(domain)",
+                     << "[ type = " << SuperClass::type << "]"
+                     << " not implemented yet !");
+         }
+         axis->addRelFile(this->filename);
+      }
+
+      //--------------------------------------------------------------
+
+      void CNc4DataOutput::writeField_(const boost::shared_ptr<tree::CField> field)
+      {
+         std::vector<StdString> dims, coodinates;
+         boost::shared_ptr<CGrid> grid =
+            CObjectFactory::GetObject<CGrid>(field->grid_ref.getValue());
+         boost::shared_ptr<CDomain> domain =
+            CObjectFactory::GetObject<CDomain>(grid->domain_ref.getValue());
+            
+         if (domain->isEmpty()) return;
+
+         StdString timeid    = StdString("time_counter");
+         StdString domid     = (!domain->name.isEmpty())
+                             ? domain->name.getValue() : domain->getId();
+         StdString lonid     = StdString("lon_").append(domid);
+         StdString latid     = StdString("lat_").append(domid);
+         StdString lonid_loc = StdString("lon_").append(domid).append("_local");
+         StdString latid_loc = StdString("lat_").append(domid).append("_local");
+         StdString fieldid   = (!field->name.isEmpty())
+                             ? field->name.getValue() : field->getBaseFieldReference()->getId();
+
+         unsigned int ssize = domain->ni.getValue() * domain->nj.getValue();
+         bool isCurvilinear = (domain->lonvalue.getValue()->size() == ssize);
+
+         nc_type type = (!field->prec.isEmpty() &&
+                        ( field->prec.getValue() == 4))
+                        ? NC_FLOAT : NC_DOUBLE;
+         bool wtime   = !(!field->operation.isEmpty() &&
+                         ( field->operation.getValue().compare("once") == 0));
+                         
+         if (wtime)
+         {
+            StdOStringStream oss;
+            oss << "time_" << field->operation.getValue()
+                << "_" << field->getRelFile()->output_freq.getValue();
+
+            coodinates.push_back(oss.str());
+            dims.push_back(timeid);
+         }
+
+         if (!grid->axis_ref.isEmpty())
+         {
+            boost::shared_ptr<CAxis> axis =
+               CObjectFactory::GetObject<CAxis>(grid->axis_ref.getValue());
+            StdString axisid = (!axis->name.isEmpty())
+                             ? axis->name.getValue() : axis->getId();
+            dims.push_back(axisid);
+            coodinates.push_back(axisid);
+         }
+
+         if (isCurvilinear)
+         {
+            coodinates.push_back(StdString("nav_lat_").append(domid));
+            coodinates.push_back(StdString("nav_lon_").append(domid));
+         }
+         else
+         {
+            coodinates.push_back(latid);
+            coodinates.push_back(lonid);
+         }
+
+         switch (SuperClass::type)
+         {
+            case (MULTI_FILE) :
+            {
+               dims.push_back(latid_loc);
+               dims.push_back(lonid_loc);
+               SuperClassWriter::addVariable(fieldid, type, dims);
+
+               if (!field->standard_name.isEmpty())
+                  SuperClassWriter::addAttribute
+                     ("standard_name",  field->standard_name.getValue(), &fieldid);
+
+               if (!field->long_name.isEmpty())
+                  SuperClassWriter::addAttribute
+                     ("long_name", field->long_name.getValue(), &fieldid);
+
+               if (!field->unit.isEmpty())
+                  SuperClassWriter::addAttribute
+                     ("units", field->unit.getValue(), &fieldid);
+                     
+               SuperClassWriter::addAttribute
+                     ("online_operation", field->operation.getValue(), &fieldid);
+                     
+               if (wtime)
+               {
+                  SuperClassWriter::addAttribute
+                        ("interval_operation", field->freq_op.getValue(), &fieldid);
+                  SuperClassWriter::addAttribute
+                        ("interval_write", field->getRelFile()->output_freq.getValue(), &fieldid);
+               }
+               
+               if (!field->default_value.isEmpty())
+               {
+                  double default_value = field->default_value.getValue();
+                  float fdefault_value = (float)default_value;
+                  if (type == NC_DOUBLE)
+                     SuperClassWriter::setDefaultValue(fieldid, &default_value);
+                  else
+                     SuperClassWriter::setDefaultValue(fieldid, &fdefault_value);
+               }
+               else
+               {
+                  double * default_value = NULL;
+                  SuperClassWriter::setDefaultValue(fieldid, default_value);
+               }             
+
+               {  // Ecriture des coordonnÃ©es
+               
+                  StdString coordstr; //boost::algorithm::join(coodinates, " ")
+                  std::vector<StdString>::iterator 
+                     itc = coodinates.begin(), endc = coodinates.end();
+                  
+                  for (; itc!= endc; itc++)
+                  {
+                     StdString & coord = *itc;
+                     if (itc+1 != endc)
+                           coordstr.append(coord).append(" ");
+                     else  coordstr.append(coord);
+                  }
+
+                  SuperClassWriter::addAttribute("coordinates", coordstr, &fieldid);
+
+               }
+
+               break;
+            }
+            default :
+               ERROR("CNc4DataOutput::writeDomain(domain)",
+                     << "[ type = " << SuperClass::type << "]"
+                     << " not implemented yet !");
+         }
+      }
+
+      //--------------------------------------------------------------
+
+      void CNc4DataOutput::writeFile_ (const boost::shared_ptr<tree::CFile> file)
+      {
+         StdString filename = (!file->name.isEmpty())
+                            ? file->name.getValue() : file->getId();
+         StdString description = (!file->description.isEmpty())
+                               ? file->description.getValue()
+                               : StdString("Created by xmlioserver");
+         this->writeFileAttributes(filename, description,
+                                   StdString ("CF-1.1"),
+                                   StdString("An IPSL model"),
+                                   this->getTimeStamp());
+      }
+
+      //---------------------------------------------------------------
+
+      StdString CNc4DataOutput::getTimeStamp(void) const
+      {
+         const int buffer_size = 100;
+         time_t rawtime;
+         struct tm * timeinfo = NULL;
+         char buffer [buffer_size];
+
+         time ( &rawtime );
+         timeinfo = localtime ( &rawtime );
+         strftime (buffer, buffer_size, "%Y-%b-%d %H:%M:%S %Z", timeinfo);
+
+         return (StdString(buffer));
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CNc4DataOutput::writeFieldData_ (const boost::shared_ptr<tree::CField>  field)
+      {
+         boost::shared_ptr<CGrid> grid =
+            CObjectFactory::GetObject<CGrid>(field->grid_ref.getValue());
+         StdString fieldid   = (!field->name.isEmpty())
+                             ? field->name.getValue() 
+                             : field->getBaseFieldReference()->getId();
+         ARRAY(double, 1) field_data = field->getData();
+         
+         if (grid->hasAxis()) // 3D
+         {
+            ARRAY(double, 3) field_data3D;            
+            grid->outputField(field_data, field_data3D);
+            SuperClassWriter::writeData(field_data3D, fieldid, true, 0);
+            
+         }
+         else // 2D
+         {
+            ARRAY(double, 3) field_data2D;
+            grid->outputField(field_data,  field_data2D);
+            SuperClassWriter::writeData(field_data2D, fieldid, true, 0);
+         }
+      }
+
+      //---------------------------------------------------------------
+
+      void CNc4DataOutput::writeTimeAxis_
+                  (const boost::shared_ptr<tree::CField>    field,
+                   const boost::shared_ptr<date::CCalendar> cal)
+      {
+         StdOStringStream oss;
+         oss << "time_" << field->operation.getValue()
+             << "_" << field->getRelFile()->output_freq.getValue();
+
+         std::vector<StdString> dims;
+         StdString axisid = oss.str();
+         StdString timeid = StdString("time_counter");
+
+         dims.push_back(timeid);
+         if (!SuperClassWriter::varExist(axisid))
+         {
+            SuperClassWriter::addVariable(axisid, NC_DOUBLE, dims);
+            this->writeTimeAxisAttributes
+               (axisid, cal->getId(),
+                StdString("seconds since ").append(cal->getInitDate().toString()),
+                cal->getInitDate().toString());
+         }
+
+      }
+
+      //---------------------------------------------------------------
+      
+      void CNc4DataOutput::writeTimeAxisAttributes(const StdString & axis_name,
+                                                   const StdString & calendar,
+                                                   const StdString & units,
+                                                   const StdString & time_origin,
+                                                   const StdString & standard_name,
+                                                   const StdString & long_name,
+                                                   const StdString & title)
+      {
+         SuperClassWriter::addAttribute("standard_name", standard_name, &axis_name);
+         SuperClassWriter::addAttribute("long_name",     long_name    , &axis_name);
+         SuperClassWriter::addAttribute("title",         title        , &axis_name);
+         SuperClassWriter::addAttribute("calendar",      calendar     , &axis_name);
+         SuperClassWriter::addAttribute("units",         units        , &axis_name);
+         SuperClassWriter::addAttribute("time_origin",   time_origin  , &axis_name);
+      }
+      
+      //---------------------------------------------------------------
+
+      void CNc4DataOutput::writeAxisAttributes(const StdString & axis_name,
+                                               const StdString & axis,
+                                               const StdString & standard_name,
+                                               const StdString & long_name,
+                                               const StdString & units,
+                                               const StdString & nav_model)
+      {
+         SuperClassWriter::addAttribute("axis"         , axis         , &axis_name);
+         SuperClassWriter::addAttribute("standard_name", standard_name, &axis_name);
+         SuperClassWriter::addAttribute("long_name"    , long_name    , &axis_name);
+         SuperClassWriter::addAttribute("units"        , units        , &axis_name);
+         SuperClassWriter::addAttribute("nav_model"    , nav_model    , &axis_name);
+      }
+
+      //---------------------------------------------------------------
+      
+      void CNc4DataOutput::writeLocalAttributes
+         (int ibegin, int ni, int jbegin, int nj, StdString domid)
+      {
+         SuperClassWriter::addAttribute(StdString("ibegin_").append(domid), ibegin);
+         SuperClassWriter::addAttribute(StdString("ni_"    ).append(domid), ni);
+         SuperClassWriter::addAttribute(StdString("jbegin_").append(domid), jbegin);
+         SuperClassWriter::addAttribute(StdString("nj_"    ).append(domid), nj);
+      }
+
+      //---------------------------------------------------------------
+
+      void CNc4DataOutput:: writeFileAttributes(const StdString & name,
+                                                const StdString & description,
+                                                const StdString & conventions,
+                                                const StdString & production,
+                                                const StdString & timeStamp)
+      {
+         SuperClassWriter::addAttribute("name"       , name);
+         SuperClassWriter::addAttribute("description", description);
+         SuperClassWriter::addAttribute("conventions", conventions);
+         SuperClassWriter::addAttribute("production" , production);
+         SuperClassWriter::addAttribute("timeStamp"  , timeStamp);
+      }
+
+      //---------------------------------------------------------------
+
+      void CNc4DataOutput::writeMaskAttributes(const StdString & mask_name,
+                                               int data_dim,
+                                               int data_ni,
+                                               int data_nj,
+                                               int data_ibegin,
+                                               int data_jbegin)
+      {
+         SuperClassWriter::addAttribute("data_dim"   , data_dim   , &mask_name);
+         SuperClassWriter::addAttribute("data_ni"    , data_ni    , &mask_name);
+         SuperClassWriter::addAttribute("data_nj"    , data_nj    , &mask_name);
+         SuperClassWriter::addAttribute("data_ibegin", data_ibegin, &mask_name);
+         SuperClassWriter::addAttribute("data_jbegin", data_jbegin, &mask_name);
+      }
+
+      ///--------------------------------------------------------------
+
+   } // namespace io
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/output/nc4_data_output.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/output/nc4_data_output.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/output/nc4_data_output.hpp	(revision 219)
@@ -0,0 +1,105 @@
+#ifndef __XMLIO_NC4_DATA_OUTPUT__
+#define __XMLIO_NC4_DATA_OUTPUT__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "onetcdf4.hpp"
+#include "data_output.hpp"
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+      class CNc4DataOutput
+         : protected CONetCDF4
+         , public virtual CDataOutput
+      {
+         public :
+
+            /// DÃ©finition de type ///
+            typedef CONetCDF4   SuperClassWriter;
+            typedef CDataOutput SuperClass;
+
+            /// Constructeurs ///
+            CNc4DataOutput
+               (const StdString & filename, bool exist);
+            CNc4DataOutput
+               (const StdString & filename, bool exist, bool multigroup, MPI_Comm comm_server);
+            CNc4DataOutput
+               (const StdString & filename, bool exist, bool multigroup, comm::MPIComm comm_server, bool);
+
+            CNc4DataOutput(const CNc4DataOutput & dataoutput);       // Not implemented.
+            CNc4DataOutput(const CNc4DataOutput * const dataoutput); // Not implemented.
+
+            /// Accesseur ///
+            const StdString & getFileName(void) const;
+
+            /// Destructeur ///
+            virtual ~CNc4DataOutput(void);
+
+         protected :
+
+            /// Ecriture ///
+            virtual void writeDomain_    (const boost::shared_ptr<tree::CDomain>   domain);
+            virtual void writeAxis_      (const boost::shared_ptr<tree::CAxis>     axis);
+            virtual void writeField_     (const boost::shared_ptr<tree::CField>    field);
+            virtual void writeFieldData_ (const boost::shared_ptr<tree::CField>    field);
+            virtual void writeFile_      (const boost::shared_ptr<tree::CFile>     file);
+            virtual void writeTimeAxis_  (const boost::shared_ptr<tree::CField>    field,
+                                          const boost::shared_ptr<date::CCalendar> cal);
+
+         protected :
+         
+            void writeLocalAttributes(int ibegin, int ni, int jbegin, int nj, StdString domid);
+
+            void writeTimeAxisAttributes(const StdString & axis_name,
+                                         const StdString & calendar,
+                                         const StdString & units,
+                                         const StdString & time_origin,
+                                         const StdString & standard_name = StdString("time"),
+                                         const StdString & long_name     = StdString("Time axis"),
+                                         const StdString & title         = StdString("Time"));
+
+            void writeFileAttributes(const StdString & name,
+                                     const StdString & description,
+                                     const StdString & conventions,
+                                     const StdString & production,
+                                     const StdString & timeStamp);
+
+            void writeMaskAttributes(const StdString & mask_name,
+                                     int data_dim,
+                                     int data_ni     = 0,
+                                     int data_nj     = 0,
+                                     int data_ibegin = 0,
+                                     int data_jbegin = 0);
+
+            void writeAxisAttributes(const StdString & axis_name,
+                                     const StdString & axis,
+                                     const StdString & standard_name,
+                                     const StdString & long_name,
+                                     const StdString & units,
+                                     const StdString & nav_model);
+            template <class T>
+               void writeAxisData(const StdString & axis_name,
+                                  const ARRAY(T, 1) data,
+                                  bool collective, StdSize record,
+                                  const std::vector<StdSize> * start = NULL,
+                                  const std::vector<StdSize> * count = NULL);
+
+         private :
+
+            /// Traitement ///
+            StdString getTimeStamp(void) const;
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            MPI_Comm comm_server;
+            const StdString filename;
+
+      }; // class CNc4DataOutput
+
+   } // namespace io
+} // namespace xmlioserver
+
+#endif //__XMLIO_NC4_DATA_OUTPUT__
Index: /XMLIO_V2/dev/common/src/xmlio/output/onetcdf4.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/output/onetcdf4.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/output/onetcdf4.cpp	(revision 219)
@@ -0,0 +1,369 @@
+#include "onetcdf4.hpp"
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CONetCDF4::CONetCDF4
+         (const StdString & filename, bool exist, const MPI_Comm * comm)
+            : path()
+      {
+         this->wmpi = (comm != NULL);
+         this->initialize(filename, exist, comm);
+      }
+      
+      //---------------------------------------------------------------
+      
+      CONetCDF4::CONetCDF4
+         (const StdString & filename, bool exist, const comm::MPIComm * comm, bool)
+         : path()
+      {
+         this->wmpi = (comm != NULL);
+         MPI_Comm * null_comm = NULL;
+         if (comm == NULL)
+            this->initialize(filename, exist, null_comm);
+         else
+         {
+            MPI_Comm comm_c = MPI_Comm_f2c(*comm);
+            this->initialize(filename, exist, &comm_c);
+         }
+      }
+      
+      //---------------------------------------------------------------
+      
+      CONetCDF4::~CONetCDF4(void)
+      {
+         CheckError(nc_close(this->ncidp));
+      }
+
+      ///--------------------------------------------------------------
+
+      void CONetCDF4::initialize
+         (const StdString & filename, bool exist, const MPI_Comm * comm)
+      {
+         if (!exist)
+         {
+            if (comm != NULL)
+            {
+               CheckError(nc_create_par
+                  (filename.c_str(), NC_NETCDF4|NC_MPIPOSIX, *comm, MPI_INFO_NULL, &this->ncidp));
+            }
+            else CheckError(nc_create(filename.c_str(), NC_NETCDF4, &this->ncidp));
+         }
+         else
+         {
+            if (comm != NULL)
+               CheckError(nc_open_par
+                  (filename.c_str(), NC_NETCDF4|NC_MPIIO, *comm, MPI_INFO_NULL, &this->ncidp));
+            else  CheckError(nc_open(filename.c_str(), NC_NETCDF4, &this->ncidp));
+         }
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CONetCDF4::definition_start(void)
+      { 
+         CheckError(nc_redef(this->ncidp));
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CONetCDF4::definition_end(void)
+      { 
+         CheckError(nc_enddef(this->ncidp));
+      }
+      
+      //---------------------------------------------------------------
+      
+      void CONetCDF4::CheckError(int status)
+      {
+         if (status != NC_NOERR)
+         {
+            StdString errormsg (nc_strerror(status)); // fuite mÃ©moire ici ?
+            ERROR("CONetCDF4::CheckError(int status)",
+                  << "[ status = " << status << " ] " << errormsg);
+         }
+      }
+
+      //---------------------------------------------------------------
+      
+      int CONetCDF4::getCurrentGroup(void)
+      {
+         return (this->getGroup(this->getCurrentPath()));
+      }
+      
+      //---------------------------------------------------------------
+      
+      int CONetCDF4::getGroup(const CONetCDF4Path & path)
+      {
+         int retvalue = this->ncidp;
+         
+         CONetCDF4Path::const_iterator
+            it  = path.begin(), end = path.end();
+
+         for (;it != end; it++)
+         {
+            const StdString & groupid = *it;
+            CheckError(nc_inq_ncid(retvalue, const_cast<char*>(groupid.c_str()), &retvalue));
+         }
+         return (retvalue);
+      }
+      
+      //---------------------------------------------------------------
+      
+      int CONetCDF4::getVariable(const StdString & varname)
+      {
+         int varid = 0;
+         int grpid = this->getCurrentGroup();
+         CheckError(nc_inq_varid (grpid, varname.c_str(), &varid));
+         return (varid);
+      }
+      
+      //---------------------------------------------------------------
+      
+      int CONetCDF4::getDimension(const StdString & dimname)
+      {
+         int dimid = 0;
+         int grpid = this->getCurrentGroup();
+         CheckError(nc_inq_dimid (grpid, dimname.c_str(), &dimid));
+         return (dimid);
+      }
+      
+      //---------------------------------------------------------------
+      
+      int CONetCDF4::getUnlimitedDimension(void)
+      {
+         int dimid = 0;
+         int grpid = this->getCurrentGroup();
+         CheckError(nc_inq_unlimdim (grpid, &dimid));
+         return (dimid);
+      }
+      
+      //---------------------------------------------------------------
+      
+      std::vector<StdSize> CONetCDF4::getDimensions(const StdString & varname)
+      {
+         StdSize size = 0;
+         std::vector<StdSize> retvalue;
+         int grpid = this->getCurrentGroup();
+         int varid = this->getVariable(varname);
+         int nbdim = 0, *dimid = NULL;
+
+         CheckError(nc_inq_varndims(grpid, varid, &nbdim));
+         dimid = new int[nbdim]();
+         CheckError(nc_inq_vardimid(grpid, varid, dimid));
+
+         for (int i = 0; i < nbdim; i++)
+         {
+            CheckError(nc_inq_dimlen (grpid, dimid[i], &size));
+            if (size == NC_UNLIMITED)
+                size = UNLIMITED_DIM;
+            retvalue.push_back(size);
+         }
+
+         return (retvalue);
+      }
+
+      //---------------------------------------------------------------
+
+      const CONetCDF4::CONetCDF4Path & CONetCDF4::getCurrentPath(void) const
+      { return (this->path); }
+
+      void CONetCDF4::setCurrentPath(const CONetCDF4Path & path)
+      { this->path = path; }
+
+      //---------------------------------------------------------------
+
+      int CONetCDF4::addGroup(const StdString & name)
+      {
+         int retvalue = 0;
+         int grpid = this->getCurrentGroup();
+         CheckError(nc_def_grp(grpid, const_cast<char*>(name.c_str()), &retvalue));
+         return (retvalue);
+      }
+      
+      //---------------------------------------------------------------
+      
+      int CONetCDF4::addDimension(const StdString& name, const StdSize size)
+      {
+         int retvalue = 0;
+         int grpid = this->getCurrentGroup();
+         if (size != UNLIMITED_DIM)
+            CheckError(nc_def_dim (grpid, name.c_str(), size, &retvalue));
+         else
+            CheckError(nc_def_dim (grpid, name.c_str(), NC_UNLIMITED, &retvalue));
+         return (retvalue);
+      }
+      
+      //---------------------------------------------------------------
+      
+      int CONetCDF4::addVariable(const StdString & name, nc_type type,
+                                  const std::vector<StdString> & dim)
+      {
+         int retvalue = 0;
+         std::vector<int> dimids;
+         int grpid = this->getCurrentGroup();
+         
+         std::vector<StdString>::const_iterator
+            it  = dim.begin(), end = dim.end();
+
+         for (;it != end; it++)
+         {
+            const StdString & dimid = *it;
+            dimids.push_back(this->getDimension(dimid));
+         }
+         CheckError(nc_def_var (grpid, name.c_str(), type, dimids.size(), &(dimids[0]), &retvalue));
+         return (retvalue);
+      }
+
+      //---------------------------------------------------------------
+
+      template <>
+         void CONetCDF4::addAttribute
+            (const StdString & name, const StdString & value, const StdString * varname )
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CheckError(nc_put_att(grpid, varid, name.c_str(), NC_CHAR, value.size()+1, value.c_str()));
+         //CheckError(nc_put_att_string(grpid, varid, name.c_str(), 1, &str));
+      }
+      
+      //---------------------------------------------------------------
+      
+      template <>
+         void CONetCDF4::addAttribute
+            (const StdString & name, const double & value, const StdString * varname )
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CheckError(nc_put_att_double(grpid, varid, name.c_str(), NC_DOUBLE,1, &value));
+      }
+      
+      //---------------------------------------------------------------
+      
+      template <>
+         void CONetCDF4::addAttribute
+            (const StdString & name, const float & value, const StdString * varname )
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CheckError(nc_put_att_float(grpid, varid, name.c_str(), NC_FLOAT, 1, &value));
+      }
+      
+      //---------------------------------------------------------------
+      
+      template <>
+         void CONetCDF4::addAttribute
+            (const StdString & name, const int & value, const StdString * varname )
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CheckError(nc_put_att_int(grpid, varid, name.c_str(), NC_INT,1, &value));
+      }
+
+      //---------------------------------------------------------------
+
+      void CONetCDF4::getWriteDataInfos(const StdString & name, StdSize record, StdSize & array_size,
+                                        std::vector<StdSize> & sstart,
+                                        std::vector<StdSize> & scount,
+                                        const std::vector<StdSize> * start,
+                                        const std::vector<StdSize> * count)
+      {
+         std::vector<StdSize> sizes = this->getDimensions(name);       
+         std::vector<StdSize>::const_iterator
+            it  = sizes.begin(), end = sizes.end();
+         int i = 0;
+
+         for (;it != end; it++)
+         {
+            StdSize  s = *it;
+            if ((start != NULL) && (count != NULL))
+            {
+               if (s == UNLIMITED_DIM)
+               {
+                  sstart.push_back(record);
+                  scount.push_back(1);
+               }
+               else
+               {
+                  sstart.push_back((*start)[i]);
+                  scount.push_back((*count)[i]);
+                  array_size *= (*count)[i];
+                  i++;
+               }
+            }
+            else
+            {
+               if (s == UNLIMITED_DIM)
+               {
+                  sstart.push_back(record);
+                  scount.push_back(1);
+               }
+               else
+               {
+                  sstart.push_back(0);
+                  scount.push_back(sizes[i]);
+                  array_size *= sizes[i];
+               }
+               i++;
+            }
+         }
+      }
+
+      //---------------------------------------------------------------
+
+      template <>
+         void CONetCDF4::writeData_(int grpid, int varid,
+                                    const std::vector<StdSize> & sstart,
+                                    const std::vector<StdSize> & scount, double * data)
+      {
+         CheckError(nc_put_vara_double(grpid, varid, &(sstart[0]), &(scount[0]), data));
+      }
+      
+      //---------------------------------------------------------------
+      
+      template <>
+         void CONetCDF4::writeData_(int grpid, int varid,
+                                    const std::vector<StdSize> & sstart,
+                                    const std::vector<StdSize> & scount, int * data)
+      {
+          CheckError(nc_put_vara_int(grpid, varid, &(sstart[0]), &(scount[0]), data));
+      }
+      
+      //---------------------------------------------------------------
+      
+      template <>
+         void CONetCDF4::writeData_(int grpid, int varid,
+                                    const std::vector<StdSize> & sstart,
+                                    const std::vector<StdSize> & scount, float * data)
+      {
+          CheckError(nc_put_vara_float(grpid, varid, &(sstart[0]), &(scount[0]), data));
+      }
+
+      //---------------------------------------------------------------
+
+      void CONetCDF4::writeData(const ARRAY(int, 2) data, const StdString & name)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = this->getVariable(name);
+         StdSize array_size = 1;
+         std::vector<StdSize> sstart, scount;
+
+         this->getWriteDataInfos(name, 0, array_size,  sstart, scount, NULL, NULL);
+         this->writeData_(grpid, varid, sstart, scount, data->data());
+      }
+
+      //---------------------------------------------------------------
+      
+      bool CONetCDF4::varExist(const StdString & varname)
+      {
+         int varid = 0;
+         int grpid = this->getCurrentGroup();
+         return (nc_inq_varid (grpid, varname.c_str(), &varid) == NC_NOERR);
+      }
+
+      ///--------------------------------------------------------------
+   } // namespace io
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/output/onetcdf4.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/output/onetcdf4.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/output/onetcdf4.hpp	(revision 219)
@@ -0,0 +1,167 @@
+#ifndef __XMLIO_INETCDF4__
+#define __XMLIO_INETCDF4__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "exception.hpp"
+#include "array.hpp"
+#include "data_output.hpp"
+#include "mpi_manager.hpp"
+
+#include <mpi.h>
+#define MPI_INCLUDED
+#include <netcdf.h>
+
+#ifndef UNLIMITED_DIM
+   #define UNLIMITED_DIM (size_t)(-1)
+#endif  //UNLIMITED_DIM
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CONetCDF4
+         : public virtual CDataOutput
+      {
+         public :
+
+            /// DÃ©finition de type ///
+            typedef std::vector<StdString> CONetCDF4Path;
+
+            /// Constructeurs ///
+            CONetCDF4(const StdString & filename, bool exist, const MPI_Comm * comm = NULL);
+            CONetCDF4(const StdString & filename, bool exist, const comm::MPIComm * comm, bool);
+
+            CONetCDF4(const CONetCDF4 & onetcdf4);       // Not implemented.
+            CONetCDF4(const CONetCDF4 * const onetcdf4); // Not implemented.
+
+
+            /// Initialisation ///
+            void initialize(const StdString & filename, bool exist, const MPI_Comm * comm);
+            void definition_start(void);
+            void definition_end(void);
+
+            /// Mutateurs ///
+            void setCurrentPath(const CONetCDF4Path & path);
+
+            int addGroup(const StdString & name);
+            int addDimension(const StdString& name, const StdSize size = UNLIMITED_DIM);
+            int addVariable(const StdString & name, nc_type type,
+                            const std::vector<StdString> & dim);
+                            
+      //----------------------------------------------------------------
+         public :
+         
+            template <class T>
+               void setDefaultValue(const StdString & varname, const T * value = NULL);
+         
+            template <class T>
+               void addAttribute
+                  (const StdString & name, const T & value, const StdString * varname = NULL);
+
+            /// Ecriture des donnÃ©es ///
+            template <class T, StdSize ndim>
+               void writeData(const ARRAY(T, ndim) data, const StdString & name,
+                              bool collective, StdSize record,
+                              const std::vector<StdSize> * start = NULL,
+                              const std::vector<StdSize> * count = NULL);
+
+            void writeData(const ARRAY(int, 2) data, const StdString & name);
+
+            /// Accesseur ///
+            const CONetCDF4Path & getCurrentPath(void) const;
+
+            /// Destructeur ///
+            virtual ~CONetCDF4(void);
+            
+      //----------------------------------------------------------------
+      
+         protected :
+
+            /// Ecriture ///
+            virtual void writeField_ (const boost::shared_ptr<tree::CField>  field)  = 0;
+            virtual void writeDomain_(const boost::shared_ptr<tree::CDomain> domain) = 0;
+            virtual void writeAxis_  (const boost::shared_ptr<tree::CAxis>   axis)   = 0;
+
+            /// Accesseurs ///
+            int getCurrentGroup(void);
+            int getGroup(const CONetCDF4Path & path);
+            int getVariable(const StdString & varname);
+            int getDimension(const StdString & dimname);
+            std::vector<StdSize> getDimensions(const StdString & varname);
+            int getUnlimitedDimension(void);
+
+            bool varExist(const StdString & varname);
+
+      //----------------------------------------------------------------
+      
+         private :
+         
+            template <class T>
+               void writeData_(int grpid, int varid,
+                               const std::vector<StdSize> & sstart,
+                               const std::vector<StdSize> & scount, T * data);
+
+            void getWriteDataInfos(const StdString & name, StdSize record, StdSize & array_size,
+                                   std::vector<StdSize> & sstart,
+                                   std::vector<StdSize> & scount,
+                                   const std::vector<StdSize> * start,
+                                   const std::vector<StdSize> * count);
+
+            /// VÃ©rification des erreurs NetCDF ///
+            void CheckError(int status);
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            CONetCDF4Path path;
+            int ncidp;
+            bool wmpi;
+
+      }; // class CONetCDF4
+
+      ///---------------------------------------------------------------
+           
+      template <class T, StdSize ndim>
+         void CONetCDF4::writeData(const ARRAY(T, ndim) data, const StdString & name,
+                                   bool collective, StdSize record,
+                                   const std::vector<StdSize> * start,
+                                   const std::vector<StdSize> * count)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = this->getVariable(name);
+         StdSize array_size = 1;
+         std::vector<StdSize> sstart, scount;
+
+         if (this->wmpi && collective)
+            CheckError(nc_var_par_access(grpid, varid, NC_COLLECTIVE));
+         if (this->wmpi && !collective)
+            CheckError(nc_var_par_access(grpid, varid, NC_INDEPENDENT));
+
+         this->getWriteDataInfos
+         (name, record, array_size,  sstart, scount, start, count);
+         this->writeData_(grpid, varid, sstart, scount, data->data());
+      }
+      
+      //----------------------------------------------------------------
+           
+      template <class T>
+         void CONetCDF4::setDefaultValue(const StdString & varname, const T * value)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = this->getVariable(varname);
+         
+         if (value != NULL)
+         {
+            CheckError(nc_def_var_fill(grpid, varid, 0, value));
+            this->addAttribute(StdString("missing_value"), *value, &varname);
+         }
+         else
+            CheckError(nc_def_var_fill(grpid, varid, 1, NULL));         
+      }
+     
+      ///---------------------------------------------------------------
+
+   } // namespace io
+} // namespace xmlioserver
+
+#endif //__XMLIO_INETCDF4__
Index: /XMLIO_V2/dev/common/src/xmlio/rebuild.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/rebuild.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/rebuild.cpp	(revision 219)
@@ -0,0 +1,17 @@
+#include "rebuild.hpp"
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CRebuild::CRebuild(const StdString & filename)
+      { /* Ne rien faire de plus */ }
+
+      CRebuild::~CRebuild(void)
+      { /* Ne rien faire de plus */ }
+
+
+   } // namespace io
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/rebuild.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/rebuild.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/rebuild.hpp	(revision 219)
@@ -0,0 +1,30 @@
+#ifndef __XMLIO_CRebuild__
+#define __XMLIO_CRebuild__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CRebuild
+      {
+         public :
+
+            /// Construteurs ///
+            CRebuild(void);                            // Never implemented.
+            explicit CRebuild(const StdString & filename);
+            CRebuild(const CRebuild  & rebuild);       // Never implemented.
+            CRebuild(const CRebuild  * const rebuild); // Never implemented.
+
+            /// Destructeur ///
+            virtual ~CRebuild(void);
+
+      }; // class CRebuild
+
+   } // namespace io
+} // namespace xmlioserver
+
+#endif // __XMLIO_CRebuild__
Index: /XMLIO_V2/dev/common/src/xmlio/server.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/server.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/server.cpp	(revision 219)
@@ -0,0 +1,286 @@
+#include "server.hpp"
+
+#include "tree_manager.hpp"
+#include "duration.hpp"
+#include "data_treatment.hpp"
+
+namespace xmlioserver {
+namespace comm {
+
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+   
+   CServer::CServer(MPIComm comm_client_server)
+      : blist(comm_client_server)
+   { /* Ne rien faire de plus */ }  
+        
+   CServer::~CServer(void)
+   { /* Ne rien faire de plus */ } 
+   
+   ///--------------------------------------------------------------
+
+   boost::shared_ptr<CServer> CServer::Server;
+
+   ///--------------------------------------------------------------
+   
+   const CBufferList & CServer::getBufferList(void) const 
+   {
+      return (this->blist);
+   }
+
+   ///--------------------------------------------------------------
+
+   boost::shared_ptr<CServer> CServer::CreateServer(MPIComm comm_client_server)
+   {
+      if (CServer::Server.get() != NULL)
+         CServer::Server = boost::shared_ptr<CServer>(new CServer(comm_client_server));
+      return (CServer::GetServer());
+   }
+
+   ///--------------------------------------------------------------
+
+   boost::shared_ptr<CServer> CServer::GetServer(void)
+   {
+      return (CServer::Server);
+   }
+   
+   //---------------------------------------------------------------
+   
+   void CServer::run(void)
+   {
+      while (this->blist.recvRequests())
+      {
+         long int managerId = -1, methodId  = -1, nbargs  = -1;
+         long int managerId_= -1, methodId_ = -1, nbargs_ = -1;
+         std::vector<CLinearBuffer> lbuffer;
+         this->blist.getRequests(lbuffer);
+                 
+         for (StdSize i = 0; i < lbuffer.size(); i++)
+         {           
+            lbuffer[i].getRequestInfos(0, managerId, methodId, nbargs);
+            if (((managerId_ != managerId) || (methodId_ != methodId) || (nbargs_ != nbargs)) && (i != 0 ))
+            {
+               //std::cout << managerId_ << "<->" << managerId << std::endl
+               //          << methodId_  << "<->" << methodId  << std::endl
+               //          << nbargs_    << "<->" << nbargs    << std::endl;
+               ERROR("CServer::run(void)", << "[" << i << "] Les requÃªtes ne sont pas synchronisÃ©es !");
+            }
+            managerId_ = managerId;
+            methodId_  = methodId;
+            nbargs_    = nbargs;
+         }
+            
+         if (managerId == 0)
+         {
+            switch(methodId)
+            {
+               case (0) :
+                  this->initialize();
+                  continue;
+               case (1) :
+                  this->finalize();
+                  return;
+               default  :
+                  ERROR("CServer::run(void)", 
+                     << "[ managerId = " << managerId << ", "
+                     << "[ methodId = "  << methodId  << ", "
+                     << "[ nbargs = "    << nbargs    << "] "
+                     << " Methode inconnue !");
+            }
+         }
+         if (managerId == 1)
+         {
+            switch(methodId)
+            {
+               case (0) :
+                  this->setContext(lbuffer);
+                  continue;
+               case (1) :
+                  this->updateCalendar(lbuffer);
+                  continue;
+               case (2) :
+                  this->setTimestep(lbuffer);
+                  continue;
+               default  :
+                  ERROR("CServer::run(void)", 
+                     << "[ managerId = " << managerId << ", "
+                     << "[ methodId = "  << methodId  << ", "
+                     << "[ nbargs = "    << nbargs    << "] "
+                     << " Methode inconnue !");
+            }
+         }
+         if (managerId == 2)
+         {
+            switch(methodId)
+            {
+               case (0) :
+                  this->writeData(lbuffer, 4);
+                  continue;
+               case (1) :
+                  this->writeData(lbuffer, 8);
+                  continue;
+               default  :
+                  ERROR("CServer::run(void)", 
+                     << "[ managerId = " << managerId << ", "
+                     << "[ methodId = "  << methodId  << ", "
+                     << "[ nbargs = "    << nbargs    << "] "
+                     << " Methode inconnue !");
+            }
+         }
+         ERROR("CServer::run(void)", 
+                << "[ managerId = " << managerId << ", "
+                << "[ methodId = "  << methodId  << ", "
+                << "[ nbargs = "    << nbargs    << "] "
+                << " Methode inconnue !");
+      }
+   }
+
+   //--------------------------------------------------------------
+   
+   void CServer::initialize(void) // manager 0, method 0
+   {
+      // Ne rien faire de plus
+   }
+   
+   //--------------------------------------------------------------
+   
+   void CServer::finalize(void) // manager 0, method 1
+   {
+       comm::CMPIManager::Barrier();
+   }   
+
+   //--------------------------------------------------------------
+
+   void CServer::setTimestep(const std::vector<CLinearBuffer> & buffer)// manager 1, method 2
+   {
+      boost::shared_ptr<CContext> context =
+         CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId());
+      boost::shared_ptr<data::CDataTreatment> dtreat = context->getDataTreatment();
+
+      StdString durationstr;
+      for (StdSize i = 0; i < buffer.size(); i++)
+      {
+         StdString durationstr_ = buffer[i].getString(3);
+         if (durationstr.compare(durationstr_) != 0 && (i != 0))
+         {
+            ERROR("CServer::setTimestep(const std::vector<CLinearBuffer> & buffer)",
+                  << "[ durationstr 1 = " << durationstr   << ", "
+                  << "[ durationstr 2 = " << durationstr_  << "] "
+                  << " Modification de timestep dÃ©synchronisÃ© !");
+         }
+         else durationstr = durationstr_;
+
+      }
+      std::cout << "setTimestep called " << durationstr << std::endl;
+      dtreat->set_timestep(date::CDuration::FromString(durationstr));
+   }
+
+   //--------------------------------------------------------------
+             
+   void CServer::setContext(const std::vector<CLinearBuffer> & buffer) // manager 1, method 0
+   { 
+      StdString contextId;
+      for (StdSize i = 0; i < buffer.size(); i++)
+      {
+         StdString contextId_ = buffer[i].getString(3);
+         if (contextId.compare(contextId_) != 0 && (i != 0))
+         {
+            ERROR("CServer::setContext(const std::vector<CLinearBuffer> & buffer)", 
+                  << "[ contextId 1 = " << contextId   << ", "
+                  << "[ contextId 2 = " << contextId_  << "] "
+                  << " Changement de contexte dÃ©synchronisÃ© !");
+         }
+         else contextId = contextId_;
+         
+      }
+      std::cout << "setContext called " << contextId << std::endl;
+      CTreeManager::SetCurrentContextId(contextId);
+   }
+   
+   //--------------------------------------------------------------
+   
+   void CServer::updateCalendar(const std::vector<CLinearBuffer> & buffer) // manager 1, method 1
+   {
+      boost::shared_ptr<CContext> context =
+         CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId());
+      boost::shared_ptr<data::CDataTreatment> dtreat = context->getDataTreatment();
+
+      int timestep = -1;
+      for (StdSize i = 0; i < buffer.size(); i++)
+      {
+         int timestep_ = buffer[i].getInt(3);
+         if ((timestep_ != timestep)  && (i != 0))
+         {
+            ERROR("CServer::updateCalendar(const std::vector<CLinearBuffer> & buffer)", 
+                  << "[ timestep 1 = " << timestep   << ", "
+                  << "[ timestep 2 = " << timestep_  << "] "
+                  << " Mise Ã  jour du calendrier dÃ©synchronisÃ©e !");
+         }
+         else timestep = timestep_;
+      }
+      std::cout << "updateCalendar called " << timestep <<std::endl;
+      dtreat->update_calendar(timestep);
+   }
+   
+   //--------------------------------------------------------------
+         
+   void CServer::writeData(const std::vector<CLinearBuffer> & buffer, int prec)  // manager 2, method 0 - 1
+   {
+      boost::shared_ptr<CContext> context =
+         CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId());
+      boost::shared_ptr<data::CDataTreatment> dtreat = context->getDataTreatment();
+
+      StdString fieldId, fileId;
+      for (StdSize i = 0; i < buffer.size(); i++)
+      {
+         StdString fieldId_ = buffer[i].getString(3);
+         StdString fileId_ = buffer[i].getString(4);
+
+         if (fieldId.compare(fieldId_) != 0 && (i != 0))
+         {           
+            ERROR("CServer::writeData(const std::vector<CLinearBuffer> & buffer, int prec)", 
+                  << "[fieldId 1 = " << fieldId   << ", "
+                  << " fieldId 2 = " << fieldId_  << "] "
+                  << " Ecriture des donnÃ©es dÃ©synchronisÃ©e !");
+         }
+         else fieldId = fieldId_;
+
+         if (fileId.compare(fileId_) != 0 && (i != 0))
+         {
+            ERROR("CServer::writeData(const std::vector<CLinearBuffer> & buffer, int prec)",
+                  << "[fileId 1 = " << fileId   << ", "
+                  << " fileId 2 = " << fileId_  << "] "
+                  << " Ecriture des donnÃ©es dÃ©synchronisÃ©e !");
+         }
+         else fileId = fileId_;
+      }
+      
+      if (prec == 4)
+      {
+         std::deque<ARRAY(float, 1)> dataArray(buffer.size());
+         for (StdSize i = 0; i < buffer.size(); i++)
+            dataArray[i] = buffer[i].getFloatArray(5);
+         std::cout << "writeData called (float) " << fieldId << ", " << dataArray[0] << std::endl;
+         // Jamais atteint car les donnÃ©es sont transfÃ©rÃ©es en tant que double
+         return;
+      }      
+      else if (prec == 8)
+      {
+         std::deque<ARRAY(double, 1)> dataArray(buffer.size());
+         for (StdSize i = 0; i < buffer.size(); i++)
+            dataArray[i] = buffer[i].getDoubleArray(5);
+         std::cout << "writeData called (double) " << fieldId << ", " << dataArray[0]  << std::endl;
+         dtreat->write_data(fieldId, fileId, dataArray);
+         return;
+      }      
+      else
+      {
+         ERROR("CServer::writeData(const std::vector<CLinearBuffer> & buffer, int prec)", 
+               << " PrÃ©cision des donnÃ©es invalide !");
+      }
+   }
+  
+   ///--------------------------------------------------------------
+   
+   
+} // namespace comm
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/server.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/server.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/server.hpp	(revision 219)
@@ -0,0 +1,59 @@
+#ifndef __XMLIO_Server__
+#define __XMLIO_Server__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "mpi_manager.hpp"
+#include "buffer_list.hpp"
+#include "array.hpp"
+
+namespace xmlioserver {
+namespace comm {
+
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   
+   class CServer
+   {
+      public :
+
+         static boost::shared_ptr<CServer> CreateServer(MPIComm comm_client_server);
+         static boost::shared_ptr<CServer> GetServer(void);
+
+         /// Destructeur ///
+         ~CServer(void);
+         
+         void run(void);
+         
+      protected : 
+      
+         /// Accesseur ///
+         const CBufferList & getBufferList(void) const;
+         
+      public :
+      
+         /// Appels distants///   
+         void initialize(void); // manager 0, method 0
+         void finalize(void);   // manager 0, method 1
+             
+         void setContext    (const std::vector<CLinearBuffer> & buffer); // manager 1, method 0
+         void updateCalendar(const std::vector<CLinearBuffer> & buffer); // manager 1, method 1
+         void setTimestep   (const std::vector<CLinearBuffer> & buffer); // manager 1, method 2
+         
+         void writeData(const std::vector<CLinearBuffer> & buffer, int prec); // manager 2, method 0 - 1
+      
+      private :
+
+         /// Constructeurs ///
+         CServer(MPIComm comm_client_server);
+      
+         /// PropriÃ©tÃ© privÃ©e ///
+         CBufferList blist;
+
+         static boost::shared_ptr<CServer> Server;
+      
+   }; // class CServer  
+
+} // namespace comm
+} // namespace xmlioserver
+
+#endif //__XMLIO_Server__
Index: /XMLIO_V2/dev/common/src/xmlio/vtk/lscereader.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/vtk/lscereader.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/vtk/lscereader.cpp	(revision 219)
@@ -0,0 +1,697 @@
+#include "lscereader.hpp"
+
+// BibliothÃšque VTK
+#include "vtkObjectFactory.h"
+#include "vtkInformation.h"
+#include "vtkInformationVector.h"
+#include "vtkStreamingDemandDrivenPipeline.h"
+
+#include <vtkProperty.h>
+#include <vtkDataSetMapper.h>
+#include <vtkActor.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderer.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtkLegendScaleActor.h>
+
+#include "vtkMath.h"
+
+namespace xmlioserver
+{
+   namespace vtk
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      vtkStandardNewMacro(vtkLSCEReader);
+
+      vtkLSCEReader::vtkLSCEReader(void)
+         : FileName(), CurGridType(RECTILINEAR), VarNames()
+         , A3D(true), ATemporal(true), ACell(true)
+         , Reader()
+      {
+         this->SetNumberOfInputPorts (0);
+         this->SetNumberOfOutputPorts(1);
+      }
+
+      vtkLSCEReader::~vtkLSCEReader(void)
+      {
+
+      }
+
+      ///---------------------------------------------------------------
+
+      void vtkLSCEReader::SetFileName(const StdString & fileName)
+      {
+         this->FileName = fileName;
+         this->Reader   = boost::shared_ptr<io::CINetCDF4>(new io::CINetCDF4(fileName));
+         this->Modified();
+      }
+
+      const StdString & vtkLSCEReader::GetFileName(void) const
+      {
+         return (this->FileName);
+      }
+
+      void vtkLSCEReader::PrintSelf(ostream& os, vtkIndent indent)
+      {
+        this->Superclass::PrintSelf(os,indent);
+      }
+
+      //----------------------------------------------------------------
+      void vtkLSCEReader::AddVariableToSelection(const StdString & varName)
+      {
+         if (this->Reader->isRectilinear(varName))
+            this->SetGridType (RECTILINEAR);
+         else if (this->Reader->isCurvilinear(varName))
+            this->SetGridType (CURVILINEAR);
+         else
+            this->SetGridType (UNSTRUCTURED);
+
+         this->VarNames.insert(varName);
+      }
+
+      void vtkLSCEReader::RemoveSelectedVariable(const StdString & varName)
+      {
+         std::set<StdString>::iterator it = this->VarNames.find(varName);
+         if (it != this->VarNames.end()) this->VarNames.erase(it);
+      }
+
+      void vtkLSCEReader::RemoveAllSelectedVariables(void)
+      {
+         this->VarNames.clear();
+      }
+
+      const std::set<StdString> &
+            vtkLSCEReader::GetSelectedVariables(void) const
+      {
+         return (this->VarNames);
+      }
+
+      bool vtkLSCEReader::HasSelectedVariable(void) const
+      {
+         return (this->VarNames.size() != 0);
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::SetGridType (GridType type)
+      {
+         if ((this->IsUnstructured() && (type == CURVILINEAR)) ||
+             (this->IsUnstructured() && (type == RECTILINEAR)) ||
+             (this->IsCurvilinear()  && (type == RECTILINEAR)))
+            this->RemoveAllSelectedVariables();
+         this->CurGridType = type;
+      }
+
+      bool vtkLSCEReader::IsUnstructured(void) const
+      {
+         return (this->CurGridType == UNSTRUCTURED);
+      }
+
+      bool vtkLSCEReader::IsCurvilinear(void) const
+      {
+         return (this->CurGridType == CURVILINEAR);
+      }
+
+      bool vtkLSCEReader::IsRectilinear(void) const
+      {
+         return (this->CurGridType == RECTILINEAR);
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::AcceptTemporalOnly(bool value)
+      {
+         this->ATemporal = value;
+      }
+
+      void vtkLSCEReader::Accept3DOnly(bool value)
+      {
+         this->A3D = value;
+      }
+
+      void vtkLSCEReader::AcceptCellOnly(bool value)
+      {
+         this->ACell = value;
+      }
+
+      //----------------------------------------------------------------
+
+      int vtkLSCEReader::ProcessRequest
+                           (vtkInformation       *  request,
+                            vtkInformationVector ** vtkNotUsed(inputVector),
+                            vtkInformationVector *  outputVector)
+      {
+         if(request->Has(vtkDemandDrivenPipeline::REQUEST_DATA()))
+            return (this->RequestData(NULL, NULL, outputVector));
+
+         //if(request->Has(vtkDemandDrivenPipeline::REQUEST_DATA_OBJECT()))
+         //   return (this->RequestDataObject(NULL, NULL, outputVector));
+
+         //if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION()))
+         //   return (this->RequestInformation(NULL, NULL, outputVector));
+
+         if(request->Has(vtkStreamingDemandDrivenPipeline::REQUEST_UPDATE_EXTENT()))
+            return (this->RequestUpdateExtent(NULL, NULL, outputVector));
+
+         return (1);
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::ShowVariable(const vtkStdString & filename,
+                                       const vtkStdString & varname)
+      {
+         vtkSmartPointer<vtkLSCEReader> lscereader =
+               vtkSmartPointer<vtkLSCEReader>::New();
+
+         lscereader->SetFileName(filename);
+         lscereader->AddVariableToSelection(varname);
+         lscereader->Update();
+
+         // CrÃ©ation d'un mappeur et d'un acteur.
+         vtkSmartPointer<vtkDataSetMapper> mapper = vtkSmartPointer<vtkDataSetMapper>::New();
+         mapper->SetInputConnection(lscereader->GetOutput()->GetProducerPort());
+         mapper->SetScalarRange  (1000, 10000);
+
+         vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
+         actor->SetMapper(mapper);
+         actor->GetProperty()->SetRepresentationToWireframe();
+
+         // CrÃ©ation d'une fenÃªtre de rendu.
+         vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();
+         vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
+         renderWindow->AddRenderer(renderer);
+         vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
+            vtkSmartPointer<vtkRenderWindowInteractor>::New();
+         renderWindowInteractor->SetRenderWindow(renderWindow);
+
+
+         vtkSmartPointer<vtkLegendScaleActor> legendScaleActor =
+            vtkSmartPointer<vtkLegendScaleActor>::New();
+
+         // Ajout de l'acteur Ã  la scÃšne.
+         renderer->AddActor(actor);
+         renderer->AddActor(legendScaleActor);
+
+         renderer->GradientBackgroundOn();
+         renderer->SetBackground(1,1,1);
+         renderer->SetBackground2(0,0,0);
+
+         // Rendu et intÃ©raction
+         renderWindow->Render();
+         renderWindowInteractor->Start();
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::CreateRectilinearGrid(vtkRectilinearGrid * grid,
+                                                vtkInformation     * outInfo,
+                                                vtkFloatArray      * xspacing,
+                                                vtkFloatArray      * yspacing,
+                                                vtkFloatArray      * zspacing,
+                                                vtkIntArray        * dimensions)
+      {
+            int extent[6] = { 0, dimensions->GetValue(0) - 1
+                            , 0, dimensions->GetValue(1) - 1
+                            , 0, dimensions->GetValue(2) - 1};
+            outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),extent,6);
+            grid->SetExtent (extent);
+            grid->SetDimensions (dimensions->GetValue(0),
+                                 dimensions->GetValue(1),
+                                 dimensions->GetValue(2));
+            grid->SetXCoordinates (xspacing);
+            grid->SetYCoordinates (yspacing);
+            grid->SetZCoordinates (zspacing);
+      }
+
+      void vtkLSCEReader::CreateStructuredGrid(vtkStructuredGrid * grid,
+                                               vtkInformation    * outInfo,
+                                               vtkPoints         * points,
+                                               vtkIntArray       * dimensions)
+      {
+            int extent[6] = { 0, dimensions->GetValue(0) - 1
+                            , 0, dimensions->GetValue(1) - 1
+                            , 0, dimensions->GetValue(2) - 1};
+            outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),extent,6);
+            grid->SetExtent (extent);
+            grid->SetDimensions (dimensions->GetValue(0),
+                                 dimensions->GetValue(1),
+                                 dimensions->GetValue(2));
+            grid->SetPoints(points);
+      }
+
+      void vtkLSCEReader::CreateUnstructuredGrid(vtkUnstructuredGrid * grid,
+                                                 vtkInformation      * outInfo,
+                                                 vtkPoints           * points,
+                                                 vtkCellArray        * cells,
+                                                 int                   celltype)
+      {
+         grid->SetPoints(points);
+         grid->SetCells(celltype, cells);
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::GetRectilinearConnectivity(int dimZ, int dimY, int dimX, vtkCellArray * cells)
+      {
+         if (dimZ == 1 && dimY >  1 && dimX >  1) // 2D
+         {
+            vtkIdType pts[4] ;
+
+            for (int i = 0, k = 0; i < (dimX - 1); i++)
+               for (int j = 0; j < (dimY - 1); j++, k++)
+            {
+               pts[0] =  i * dimY + j;
+               pts[1] =  i * dimY + j + 1;
+               pts[2] =  (i+1) * dimY + j + 1;
+               pts[3] =  (i+1) * dimY + j;
+               cells->InsertNextCell(4,  pts);
+            }
+         }
+         else if (dimZ > 1 && dimY >  1 && dimX >  1) // 3D
+         {
+            vtkIdType pts[8];
+            for (int i = 0, l = 0; i < (dimX - 1); i++)
+               for (int j = 0; j < (dimY - 1); j++)
+                  for (int k = 0; k < (dimZ - 1); k++, l++)
+            {
+               pts[0] =  i * dimY * dimZ + j * dimZ + k;
+               pts[1] =  i * dimY * dimZ + j * dimZ + k + 1;
+               pts[2] =  (i+1) * dimY * dimZ + j * dimZ + k + 1;
+               pts[3] =  (i+1) * dimY * dimZ + j * dimZ + k;
+
+               pts[4] =  i * dimY * dimZ  + (j + 1) * dimZ + k ;
+               pts[5] =  i * dimY * dimZ  + (j + 1) * dimZ + k +1;
+               pts[6] =  (i+1) * dimY * dimZ + (j + 1) * dimZ + k + 1;
+               pts[7] =  (i+1) * dimY * dimZ + (j + 1) * dimZ + k ;
+               cells->InsertNextCell(8,  pts);
+            }
+         }
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::CreateSimpleGrid (int xi, int xf,
+                                            int yi, int yf,
+                                            int zi, int zf,
+                                            vtkFloatArray * xspacing,
+                                            vtkFloatArray * yspacing,
+                                            vtkFloatArray * zspacing,
+                                            vtkIntArray   * dimensions)
+      {
+         dimensions->InsertNextValue (xf - xi + 1); // X
+         dimensions->InsertNextValue (yf - yi + 1); // Y
+         dimensions->InsertNextValue (zf - zi + 1); // Z
+         for (int i = xi; i <= xf; i++)
+            xspacing->InsertNextValue (i);
+         for (int j = yi; j <= yf; j++)
+            yspacing->InsertNextValue (j);
+         for (int k = zi; k <= zf; k++)
+            zspacing->InsertNextValue (k);
+      }
+
+      void vtkLSCEReader::CreateSimpleGrid (int xi, int xf,
+                                            int yi, int yf,
+                                            int zi, int zf,
+                                            vtkPoints   * points,
+                                            vtkIntArray * dimensions)
+      {
+         dimensions->InsertNextValue (xf - xi + 1); // X
+         dimensions->InsertNextValue (yf - yi + 1); // Y
+         dimensions->InsertNextValue (zf - zi + 1); // Z
+         for (int i = xi; i <= xf; i++)
+            for (int j = yi; j <= yf; j++)
+               for (int k = zi; k <= zf; k++)
+                  points->InsertNextPoint(i, j, k);
+      }
+
+      void vtkLSCEReader::CreateSimpleGrid (int xi, int xf,
+                                            int yi, int yf,
+                                            int zi, int zf,
+                                            vtkPoints    * points,
+                                            vtkCellArray * cells,
+                                            vtkIntArray  * dimensions)
+      {
+         this->CreateSimpleGrid (xi, xf, yi, yf, zi, zf, points, dimensions);
+         int dimX = dimensions->GetValue(0),
+             dimY = dimensions->GetValue(1),
+             dimZ = dimensions->GetValue(2);
+         this->GetRectilinearConnectivity(dimZ, dimY, dimX, cells);
+      }
+
+      //----------------------------------------------------------------
+      void vtkLSCEReader::GetSpacings(const vtkStdString & coordinate,
+                                      bool bounds, vtkFloatArray * spacing)
+      {
+         StdSize size = (Reader->getDimensions(&coordinate).begin())->second;
+         ARRAY_CREATE(data_arr, float, 1, [1]);
+         if (Reader->hasVariable(coordinate))
+         {
+            if (bounds)
+            {
+               if (Reader->hasBounds(coordinate))
+               { // CellData, variable de coordonnÃ©e avec attributes bounds.
+                  StdString boundid = Reader->getBoundsId(coordinate);
+                  float f;
+                  Reader->getData(data_arr, boundid);
+                  spacing->InsertNextValue (f = (*data_arr)[0]);
+                  for (StdSize j = 1; j < (2 * size); j++) // << Super laid
+                     if (f != (*data_arr)[j])
+                        spacing->InsertNextValue (f = (*data_arr)[j]);
+               }
+               else
+               { // CellData, variable de coordonnÃ©e sans attributes bounds.
+                  Reader->getData(data_arr, coordinate);
+                  spacing->InsertNextValue ((*data_arr)[0] - ((*data_arr)[1] - (*data_arr)[0])/2);
+                  for (StdSize j = 0; j < (size-1); j++)
+                     spacing->InsertNextValue ((*data_arr)[j] + ((*data_arr)[j+1]-(*data_arr)[j])/2);
+                  spacing->InsertNextValue ((*data_arr)[size-2] + ((*data_arr)[size-1] - (*data_arr)[size-2])/2);
+               }
+            }
+            else
+            { // PointData, variable de coordonnÃ©e.
+               Reader->getData(data_arr, coordinate);
+               for (StdSize j = 0; j < (size-1); j++)
+                  spacing->InsertNextValue ((*data_arr)[j]);
+            }
+         }
+         else
+         {
+            if (bounds) // CellData, dimension de coordonnÃ©e.
+               for (float i = -0.5; i < ((float)size + 1.); i = i + 1.)
+                  spacing->InsertNextValue (i);
+            else // PointData, dimension de coordonnÃ©e.
+               for (float j = 0.; j < (float)size; j = j + 1.)
+                  spacing->InsertNextValue (j);
+         }
+      }
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::AddPoint(vtkPoints * points, float *  value, bool proj)
+      {
+         if (proj)
+         {
+            double h = 1.0;
+            double cartesianCoord[3];
+            value[0] =  0.017453292519943295 * value[0];
+            value[1] =  0.017453292519943295 * value[1];
+
+            cartesianCoord[0] = h * cos(value[0]) * cos(value[1]);
+            cartesianCoord[1] = h * sin(value[0]) * cos(value[1]);
+            cartesianCoord[2] = h * sin(value[1]);
+            points->InsertNextPoint (cartesianCoord);
+         }
+         else
+         {
+            points->InsertNextPoint (value);
+         }
+      }
+
+      //----------------------------------------------------------------
+      void vtkLSCEReader::GetPoints(const vtkStdString & xcoordinate,
+                                    const vtkStdString & ycoordinate,
+                                    const vtkStdString & zcoordinate,
+                                    bool bounds, bool proj,
+                                    vtkPoints * points, vtkIntArray * dimensions)
+      {
+         float value[3];
+         bool is2D = true;
+         ARRAY_CREATE(xvalue, float, 1, [1]);
+         ARRAY_CREATE(yvalue, float, 1, [1]);
+         vtkSmartPointer<vtkFloatArray> zspacing = vtkSmartPointer<vtkFloatArray>::New();
+         if (zcoordinate.size() > 0)
+         {
+            GetSpacings(zcoordinate, bounds, zspacing);
+            is2D = false;
+         }
+         else
+            zspacing->InsertNextValue(0);
+
+         dimensions->InsertNextValue
+            (Reader->getDimensions(&xcoordinate)[Reader->getLonCoordName(xcoordinate)]);
+         dimensions->InsertNextValue
+            (Reader->getDimensions(&xcoordinate)[Reader->getLatCoordName(xcoordinate)]);
+         dimensions->InsertNextValue(zspacing->GetNumberOfTuples());
+
+         if (!bounds)
+         {
+            Reader->getData(xvalue, xcoordinate);
+            Reader->getData(yvalue, ycoordinate);
+
+            for (int i = 0; i < dimensions->GetValue(0); i++)
+               for (int j = 0; j < dimensions->GetValue(1); j++)
+                  for (int k = 0; k < dimensions->GetValue(2); k++)
+                  {
+                     value[0] = (*xvalue)[i*dimensions->GetValue(1) + j];
+                     value[1] = (*yvalue)[i*dimensions->GetValue(1) + j];
+                     value[2] = zspacing->GetValue(k);
+                     AddPoint(points, value, proj);
+                  }
+            return;
+         }
+
+         dimensions->SetValue(0, dimensions->GetValue(0)+1);
+         dimensions->SetValue(1, dimensions->GetValue(1)+1);
+
+         if (Reader->hasBounds(xcoordinate))
+         {
+            StdString boundid = Reader->getBoundsId(xcoordinate);
+            Reader->getData(xvalue, boundid);
+         }
+         if (Reader->hasBounds(ycoordinate))
+         {
+            StdString boundid = Reader->getBoundsId(ycoordinate);
+            Reader->getData(yvalue, boundid);
+         }
+         int ydim = dimensions->GetValue(0) - 1 ,
+             xdim = dimensions->GetValue(1) - 1;
+
+         for (int i = 0; i <= xdim; i++)
+            for (int j = 0; j <= ydim; j++)
+               for (int k = 0; k < dimensions->GetValue(2); k++)
+               {
+                  if ((j != ydim) && (i != xdim))
+                  {
+                     value[0] = (*xvalue)[4 * (i * ydim + j) + 0];
+                     value[1] = (*yvalue)[4 * (i * ydim + j) + 0];
+                     value[2] = zspacing->GetValue(k);
+                     AddPoint(points, value, proj);
+
+                     continue;
+                  }
+                  else if ((j == ydim) && (i != xdim))
+                  {
+                     value[0] = (*xvalue)[4 * (i * ydim + j - 1) + 1];
+                     value[1] = (*yvalue)[4 * (i * ydim + j - 1) + 1];
+                     value[2] = zspacing->GetValue(k);
+                     AddPoint(points, value, proj);
+
+                     continue;
+                  }
+                  else if ((j != ydim) && (i == xdim))
+                  {
+                     value[0] = (*xvalue)[4 * ((i-1) * ydim + j) + 3];
+                     value[1] = (*yvalue)[4 * ((i-1) * ydim + j) + 3];
+                     value[2] = zspacing->GetValue(k);
+                     AddPoint(points, value, proj);
+
+                     continue;
+                  }
+                  else if ((j == ydim) && (i == xdim))
+                  {
+                     value[0] = (*xvalue)[4 * ((i-1) * ydim + j - 1) + 2];
+                     value[1] = (*yvalue)[4 * ((i-1) * ydim + j - 1) + 2];
+                     value[2] = zspacing->GetValue(k);
+                     AddPoint(points, value, proj);
+
+                     continue;
+                  }
+               }
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::GetCellsAndPoints(const vtkStdString & xcoordinate,
+                                            const vtkStdString & ycoordinate,
+                                            const vtkStdString & zcoordinate,
+                                            bool bounds, bool proj, StdSize nbvertex,
+                                            vtkCellArray * cells, vtkPoints * points,
+                                            vtkIntArray * dimensions)
+      {
+         float value[3];
+         double h = 1.0;
+         double cartesianCoord[3];
+         vtkIdType pts[nbvertex] ;
+         bool is2D = true;
+         ARRAY_CREATE(xvalue, float, 1, [1]);
+         ARRAY_CREATE(yvalue, float, 1, [1]);
+         vtkSmartPointer<vtkFloatArray> zspacing = vtkSmartPointer<vtkFloatArray>::New();
+         if (zcoordinate.size() > 0)
+         {
+            GetSpacings(zcoordinate, bounds, zspacing);
+            is2D = false;
+         }
+         else
+            zspacing->InsertNextValue(0);
+
+         StdSize size = (*Reader->getDimensions(&xcoordinate).begin()).second;
+         if (Reader->hasBounds(xcoordinate))
+         {
+            StdString boundid = Reader->getBoundsId(xcoordinate);
+            Reader->getData(xvalue, boundid);
+         }
+         if (Reader->hasBounds(ycoordinate))
+         {
+            StdString boundid = Reader->getBoundsId(ycoordinate);
+            Reader->getData(yvalue, boundid);
+         }
+
+         for (StdSize u = 0; u < size; u++)
+         {
+            for (int v = 0; v < zspacing->GetNumberOfTuples(); v++)
+            {
+               for (StdSize w = 0; w < nbvertex; w++)
+               {
+                  value[0] = (*xvalue)[nbvertex * u + w];
+                  value[1] = (*yvalue)[nbvertex * u + w];
+                  value[2] = zspacing->GetValue(v);
+                  pts[w] = nbvertex * u + w;
+
+                  if (proj)
+                  {
+                     value[0] = 0.017453292519943295 * value[0];
+                     value[1] = 0.017453292519943295 * value[1];
+
+                     cartesianCoord[0] = h * cos(value[0]) * cos(value[1]);
+                     cartesianCoord[1] = h * sin(value[0]) * cos(value[1]);
+                     cartesianCoord[2] = h * sin(value[1]);
+                     points->InsertPoint (pts[w], cartesianCoord);
+                  }
+                  else
+                  {
+                     points->InsertPoint (pts[w], value);
+                  }
+               }
+               cells->InsertNextCell(nbvertex,  pts);
+            }
+         }
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::AddScalarData(vtkDataSet * output,
+                                        const StdString & varname,
+                                        StdSize record, bool bounds)
+      {
+         vtkSmartPointer<vtkDoubleArray> data = vtkDoubleArray::New();
+         data->SetName(varname.c_str());
+         ARRAY_CREATE(data_arr, double, 1, [1]);
+         Reader->getData(data_arr, varname);
+
+         data->SetNumberOfValues (data_arr->size());
+         for (StdSize i = 0; i < data_arr->size(); i++)
+            data->SetValue (i, (*data_arr)[i]);
+
+         if (bounds)
+         {
+            output->GetCellData()->AddArray(data);
+            output->GetCellData()->SetActiveScalars (varname.c_str());
+         }
+         else
+         {
+            output->GetPointData()->AddArray(data);
+            output->GetPointData()->SetActiveScalars (varname.c_str());
+         }
+      }
+
+      //----------------------------------------------------------------
+
+      int vtkLSCEReader::RequestData
+                           (vtkInformation       *  vtkNotUsed(request),
+                            vtkInformationVector ** vtkNotUsed(inputVector),
+                            vtkInformationVector *  outputVector)
+      {
+         vtkInformation *  outInfo = outputVector->GetInformationObject(0);
+         vtkDataSet     *  output  = vtkDataSet::GetData(outInfo);
+
+         if (!output)
+         {
+            switch (this->CurGridType)
+            {
+               case(RECTILINEAR)  :
+                  output = vtkRectilinearGrid::New();
+                  break;
+               case(CURVILINEAR)  :
+                  output = vtkStructuredGrid::New();
+                  break;
+               default :
+                  output = vtkUnstructuredGrid::New();
+                  break;
+            }
+            output->SetPipelineInformation(outInfo);
+            output->Delete();
+         }
+
+         vtkUnstructuredGrid * uoutput  = vtkUnstructuredGrid::SafeDownCast(output);
+         vtkRectilinearGrid  * routput  = vtkRectilinearGrid::SafeDownCast(output);
+         vtkStructuredGrid   * soutput  = vtkStructuredGrid::SafeDownCast(output);
+
+         if (routput)
+         { // Grille rectiliniÃ©aire
+            vtkSmartPointer<vtkFloatArray>
+                           xspacing = vtkSmartPointer<vtkFloatArray>::New(),
+                           yspacing = vtkSmartPointer<vtkFloatArray>::New(),
+                           zspacing = vtkSmartPointer<vtkFloatArray>::New();
+            vtkSmartPointer<vtkIntArray> dims = vtkSmartPointer<vtkIntArray>::New();
+
+            //CreateSimpleGrid (-1, 10, -1, 10, -1, 10, xspacing, yspacing, zspacing, dims);
+            GetSpacings(Reader->getLonCoordName(*VarNames.begin()), true, xspacing);
+            GetSpacings(Reader->getLatCoordName(*VarNames.begin()), true, yspacing);
+            GetSpacings(Reader->getVertCoordName(*VarNames.begin()), true, zspacing);
+            /*std::cout << zspacing->GetNumberOfTuples() << std::endl;*/
+
+            dims->InsertNextValue(xspacing->GetNumberOfTuples());
+            dims->InsertNextValue(yspacing->GetNumberOfTuples());
+            dims->InsertNextValue(zspacing->GetNumberOfTuples());
+
+            CreateRectilinearGrid(routput, outInfo, xspacing, yspacing, zspacing, dims);
+         }
+
+         if (soutput)
+         { // Grille structurÃ©e
+            vtkSmartPointer<vtkPoints>   pts  = vtkSmartPointer<vtkPoints>::New();
+            vtkSmartPointer<vtkIntArray> dims = vtkSmartPointer<vtkIntArray>::New();
+
+            //CreateSimpleGrid (-1, 10, -1, 10, -1, 10, pts, dims);
+            GetPoints(Reader->getLonCoordName(*VarNames.begin()),
+                      Reader->getLatCoordName(*VarNames.begin()),
+                      Reader->getVertCoordName(*VarNames.begin()), false, true, pts, dims);
+            CreateStructuredGrid(soutput, outInfo, pts, dims);
+         }
+
+         if (uoutput)
+         { // Grille non-structurÃ©e
+            vtkSmartPointer<vtkPoints>    pts   = vtkSmartPointer<vtkPoints>::New();
+            vtkSmartPointer<vtkIntArray>  dims  = vtkSmartPointer<vtkIntArray>::New();
+            vtkSmartPointer<vtkCellArray> cells = vtkSmartPointer<vtkCellArray>::New();
+            // VTK_QUAD, VTK_HEXAHEDRON, VTK_POLYGON
+
+            //CreateSimpleGrid (0, 12, 0, 12, 0, 12, pts, cells, dims);
+            GetCellsAndPoints(Reader->getLonCoordName(*VarNames.begin()),
+                              Reader->getLatCoordName(*VarNames.begin()),
+                              Reader->getVertCoordName(*VarNames.begin()), true, true,
+                              Reader->getNbVertex(*VarNames.begin()), cells, pts, dims);
+
+            AddScalarData(uoutput, *VarNames.begin(), 0, true);
+            CreateUnstructuredGrid(uoutput, outInfo, pts, cells, VTK_POLYGON);
+
+         }
+         return (1);
+      }
+
+      ///---------------------------------------------------------------
+
+
+   } // namespace vtk
+} // namespace xmlioserver
+
Index: /XMLIO_V2/dev/common/src/xmlio/vtk/lscereader.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/vtk/lscereader.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/vtk/lscereader.hpp	(revision 219)
@@ -0,0 +1,192 @@
+#ifndef __XMLIO_LSCE_READER__
+#define __XMLIO_LSCE_READER__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "inetcdf4.hpp"
+
+/// VTK headers ///
+#include "vtkDataObjectAlgorithm.h"
+
+#include "vtkStdString.h"
+
+#include "vtkUnstructuredGrid.h"
+#include "vtkStructuredGrid.h"
+#include "vtkRectilinearGrid.h"
+
+#include "vtkSmartPointer.h"
+
+#include "vtkStringArray.h"
+#include "vtkFloatArray.h"
+#include "vtkIntArray.h"
+#include "vtkDoubleArray.h"
+#include "vtkCellArray.h"
+
+#include "vtkCellData.h"
+#include "vtkPointData.h"
+
+namespace xmlioserver
+{
+   namespace vtk
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+      class VTK_EXPORT vtkLSCEReader
+         : public vtkDataObjectAlgorithm
+      {
+         public :
+
+         //-------------------------------------------------------------
+            typedef enum _gridtype
+            { RECTILINEAR = 0, CURVILINEAR, UNSTRUCTURED } GridType;
+         //-------------------------------------------------------------
+
+            /// SpÃ©cifique VTK ///
+            static vtkLSCEReader * New(void);
+            vtkTypeMacro(vtkLSCEReader, vtkDataObjectAlgorithm);
+            void PrintSelf(ostream& os, vtkIndent indent);
+
+         //-------------------------------------------------------------
+
+            /// Mutateurs ///
+            void SetFileName(const StdString & fileName);
+
+            void AddVariableToSelection(const StdString & varName);
+            void RemoveSelectedVariable(const StdString & varName);
+            void RemoveAllSelectedVariables(void);
+
+            void SetGridType (GridType type);
+
+            void AcceptTemporalOnly(bool value);
+            void Accept3DOnly(bool value);
+            void AcceptCellOnly(bool value);
+
+         //-------------------------------------------------------------
+
+            /// Accesseurs ///
+            const StdString & GetFileName(void) const;
+
+            const std::set<StdString> & GetSelectedVariables(void) const;
+
+         //-------------------------------------------------------------
+
+            /// Tests ///
+            bool IsUnstructured(void) const;
+            bool IsCurvilinear(void) const;
+            bool IsRectilinear(void) const;
+
+            bool HasSelectedVariable(void) const;
+
+            /// Visualisation ///
+            static void ShowVariable(const vtkStdString & filename,
+                                     const vtkStdString & varname);
+
+         protected:
+
+            /// Constructeur ///
+            vtkLSCEReader(void);
+
+            /// Destructeur ///
+            virtual ~vtkLSCEReader(void);
+
+         //-------------------------------------------------------------
+            void GetSpacings(const vtkStdString & coordinate,
+                             bool bounds, vtkFloatArray * spacing);
+
+         //-------------------------------------------------------------
+
+            void CreateRectilinearGrid(vtkRectilinearGrid *, vtkInformation *,
+                                        vtkFloatArray *, vtkFloatArray *, vtkFloatArray *,
+                                        vtkIntArray *);
+
+            void CreateStructuredGrid(vtkStructuredGrid *, vtkInformation *,
+                                      vtkPoints *, vtkIntArray *);
+
+            void CreateUnstructuredGrid(vtkUnstructuredGrid *, vtkInformation *,
+                                        vtkPoints *, vtkCellArray *, int);
+
+         //-------------------------------------------------------------
+
+            void CreateSimpleGrid (int xi, int xf, int yi, int yf, int zi, int zf,
+                                   vtkFloatArray *, vtkFloatArray *, vtkFloatArray *,
+                                   vtkIntArray *);
+
+            void CreateSimpleGrid (int xi, int xf, int yi, int yf, int zi, int zf,
+                                   vtkPoints *, vtkIntArray *);
+
+            void CreateSimpleGrid (int xi, int xf, int yi, int yf, int zi, int zf,
+                                   vtkPoints *, vtkCellArray *, vtkIntArray *);
+
+         //-------------------------------------------------------------
+
+            void GetRectilinearConnectivity(int, int, int, vtkCellArray *);
+
+         //-------------------------------------------------------------
+
+            void AddPoint(vtkPoints * points, float *  value, bool proj);
+
+            void GetPoints(const vtkStdString & xcoordinate,
+                           const vtkStdString & ycoordinate,
+                           const vtkStdString & zcoordinate,
+                           bool bounds, bool proj,
+                           vtkPoints * points, vtkIntArray * dimensions);
+
+         //-------------------------------------------------------------
+
+            void GetCellsAndPoints(const vtkStdString & xcoordinate,
+                                   const vtkStdString & ycoordinate,
+                                   const vtkStdString & zcoordinate,
+                                   bool bounds, bool proj, StdSize nbvertex,
+                                   vtkCellArray * cells, vtkPoints * points,
+                                   vtkIntArray * dimensions);
+
+         //-------------------------------------------------------------
+
+            void AddScalarData(vtkDataSet * output, const StdString & varname,
+                               StdSize record, bool bounds);
+
+         //-------------------------------------------------------------
+
+            /// Traitements ///
+            virtual int RequestData
+               (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+
+            //virtual int RequestInformation
+            //   (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+
+            //virtual int RequestDataObject
+            //   (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+
+            virtual int ProcessRequest
+               (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+
+         //-------------------------------------------------------------
+
+         private:
+
+            /// Constructeurs ///
+            vtkLSCEReader(const vtkLSCEReader &);        // Not implemented
+            vtkLSCEReader(const vtkLSCEReader * const);  // Not implemented
+
+            /// OpÃ©rateur ///
+            void operator=(const vtkLSCEReader &);       // Not implemented
+
+         //-------------------------------------------------------------
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            StdString FileName;
+
+            GridType CurGridType;
+            std::set<StdString> VarNames;
+            bool A3D, ATemporal, ACell;
+
+            boost::shared_ptr<io::CINetCDF4> Reader;
+
+      }; // class vtkLSCEReader
+
+      ///----------------------------------------------------------------
+
+   } // namespace vtk
+} // namespace xmlioserver
+
+#endif //__XMLIO_LSCE_READER__
Index: /XMLIO_V2/dev/common/src/xmlio/xml_node.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/xml_node.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/xml_node.cpp	(revision 219)
@@ -0,0 +1,91 @@
+#include "xml_node.hpp"
+
+namespace xmlioserver
+{
+   namespace xml
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      StdString CXMLNode::RootName("simulation");
+
+      CXMLNode::CXMLNode(rapidxml::xml_node<char> * const root)
+         : node(root)
+      { /* Ne rien faire de plus */ }
+
+      CXMLNode::~CXMLNode(void)
+      { /* Ne rien faire de plus */ }
+
+      StdString CXMLNode::getElementName(void) const
+      { 
+         return (this->node->name()); 
+      }
+
+      bool CXMLNode::goToNextElement(void)
+      {
+         bool retvalue = false;
+         for(rapidxml::xml_node<char> * nextElement = this->node->next_sibling();
+                                      ; nextElement = this->node->next_sibling())
+         {
+            if (nextElement == NULL) break;
+            else if (nextElement->type() == rapidxml::node_element)
+            { 
+               node = nextElement;
+               return (!retvalue);
+            }
+         }
+         return (retvalue);
+      }
+
+      bool CXMLNode::goToChildElement(void)
+      {
+         bool retvalue = false;
+         rapidxml::xml_node<char> * nextElement = this->node->first_node();
+         if (nextElement != NULL)
+         {
+            for(;;nextElement = this->node->next_sibling())
+            {
+               if (nextElement == NULL) break;
+               else if (nextElement->type() == rapidxml::node_element)
+               { 
+                  node = nextElement; 
+                  return (!retvalue); 
+               }
+            }
+         }
+         return (retvalue);
+      }
+
+      bool CXMLNode::goToParentElement(void)
+      {
+         bool retvalue = false;
+         if (!(this->getElementName().compare(CXMLNode::RootName)))
+            return (retvalue);
+         node = node->parent();
+         return (!retvalue);
+      }
+
+      const StdString & CXMLNode::GetRootName(void)
+      { 
+         return (CXMLNode::RootName); 
+      }
+
+      THashAttributes CXMLNode::getAttributes(void) const
+      {
+         THashAttributes attributes;
+         rapidxml::xml_attribute<char> *currentAttr = NULL;
+
+         if ((currentAttr = this->node->first_attribute()) != NULL)
+         {
+            do 
+            {
+               attributes.insert(std::pair<StdString, StdString>
+                                (StdString(currentAttr->name()),
+                                 StdString(currentAttr->value())));
+            } while ((currentAttr = currentAttr->next_attribute()) != NULL);
+         }
+
+         return (attributes) ;
+      }
+
+   }// namespace xml
+} // namespace xmlioserve
Index: /XMLIO_V2/dev/common/src/xmlio/xml_node.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/xml_node.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/xml_node.hpp	(revision 219)
@@ -0,0 +1,55 @@
+#ifndef __XMLIO_CXMLNode__
+#define __XMLIO_CXMLNode__
+
+/// rapidXML headers ///
+#include <rapidxml.hpp>
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+
+namespace xmlioserver
+{
+   namespace xml
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      typedef xios_map<StdString, StdString> THashAttributes;
+
+      class CXMLNode
+      {
+         public :
+
+            /// Constructeurs ///
+            CXMLNode(rapidxml::xml_node<char> * const root);
+
+            /// Destructeur ///
+            ~CXMLNode(void);
+
+            /// Accesseurs ///
+            StdString getElementName(void) const;
+            THashAttributes getAttributes(void) const;
+
+            /// Mutateurs ///
+            bool goToNextElement(void);
+            bool goToChildElement(void);
+            bool goToParentElement(void);
+
+            /// Accesseurs statiques ///
+            static const StdString & GetRootName(void);
+
+         private :
+
+            /// Constructeurs ///
+            CXMLNode(void);                        // Not implemented yet.
+            CXMLNode(const CXMLNode & node);       // Not implemented yet.
+            CXMLNode(const CXMLNode * const node); // Not implemented yet.
+
+            rapidxml::xml_node<char> * node;
+
+            static StdString RootName;
+
+      }; //class CXMLParser
+
+   }// namespace xml
+} // namespace xmlioserver
+
+#endif // __XMLIO_CXMLNode__
Index: /XMLIO_V2/dev/common/src/xmlio/xml_parser.cpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/xml_parser.cpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/xml_parser.cpp	(revision 219)
@@ -0,0 +1,89 @@
+#include "xml_parser.hpp"
+
+#include "attribute_template_impl.hpp"
+#include "object_template_impl.hpp"
+#include "group_template_impl.hpp"
+
+namespace xmlioserver
+{
+   namespace xml
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      void CXMLParser::ParseFile(const StdString & filename)
+      { StdIFStream ifs ( filename.c_str() , StdIFStream::in );
+        CXMLParser::ParseStream(ifs); }
+
+      void CXMLParser::ParseString(const StdString & xmlContent)
+      {
+         StdIStringStream iss ( xmlContent /*, StdIStringStream::in*/ );
+         CXMLParser::ParseStream(iss);
+      }
+
+      void CXMLParser::ParseStream(StdIStream & stream)
+      {
+         if (!stream.good())
+            ERROR("CXMLParser::ParseStream(const StdIStream & stream)",
+                  << "Bad xml stream !");
+         StdOStringStream oss;
+         while(!stream.eof() && !stream.fail ())
+            oss.put(stream.get());
+         try
+         {
+            //const StdString xmlcontent( oss.str(), 0, oss.str().size()-2); //<POURQUOI ?
+            const StdString xmlcontent( oss.str(), 0, oss.str().size()-1 );
+            rapidxml::xml_document<char> doc;
+            doc.parse<0>(const_cast<char*>(xmlcontent.c_str()));
+
+            CXMLNode node(doc.first_node());
+            THashAttributes attributes;
+
+            if (node.getElementName().compare(CXMLNode::GetRootName()) != 0)
+               ERROR("CXMLParser::ParseStream(StdIStream & stream)",
+                     << "Root element should be named simulation (actual = \'"
+                     << node.getElementName() << "\')!");
+
+            if (node.goToChildElement())
+            {
+               do
+               {
+                  boost::shared_ptr<tree::CContextGroup> group_context =
+                                    tree::CContext::GetContextGroup();
+                  attributes = node.getAttributes();
+
+                  if (attributes.end() == attributes.find("id"))
+                  {  
+                     DEBUG("Le context ne sera pas traitÃ© car il n'est pas identifiÃ© !");
+                     continue; 
+                  }
+
+                  CObjectFactory::SetCurrentContextId(attributes["id"]);
+                  CGroupFactory::SetCurrentContextId(attributes["id"]);
+
+                  bool hasctxt = CObjectFactory::HasObject<tree::CContext>(attributes["id"]);
+
+                  if(hasctxt)
+                  {  
+                     DEBUG("Le context ne sera pas traitÃ© car "
+                           << "il existe dÃ©jÃ  un autre context possÃ©dant le mÃªme nom !");
+                     continue; 
+                  }
+
+                  boost::shared_ptr<tree::CContext> context =
+                     CObjectFactory::CreateObject<tree::CContext>(attributes["id"]);
+                  if (!hasctxt) CGroupFactory::AddChild(group_context, context);
+                  context->parse(node);
+
+                  attributes.clear();
+
+               } while (node.goToNextElement());
+            }
+         }
+         catch (rapidxml::parse_error & exc)
+         {
+            ERROR("CXMLParser::ParseStream(StdIStream & stream)",
+                  << "RapidXML error : " << exc.what() << " !");
+         }
+      }
+   }// namespace xml
+} // namespace xmlioserver
Index: /XMLIO_V2/dev/common/src/xmlio/xml_parser.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/xml_parser.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/xml_parser.hpp	(revision 219)
@@ -0,0 +1,27 @@
+#ifndef __XMLIO_CXMLParser__
+#define __XMLIO_CXMLParser__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "xml_node.hpp"
+#include "context.hpp"
+
+namespace xmlioserver
+{
+   namespace xml
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CXMLParser
+      {
+         public :
+
+            static void ParseFile(const StdString & filename);
+            static void ParseString(const StdString & xmlContent);
+            static void ParseStream(StdIStream & stream);
+
+      }; //class CXMLParser
+
+   }// namespace xml
+} // namespace xmlioserver
+
+#endif // __XMLIO_CXMLParser__
Index: /XMLIO_V2/dev/common/src/xmlio/xmlioserver.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/xmlioserver.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/xmlioserver.hpp	(revision 219)
@@ -0,0 +1,24 @@
+#ifndef __XMLIO__
+#define __XMLIO__
+
+#include "xmlioserver_spl.hpp"
+
+/// xmlioserver headers ///
+#include "mpi_manager.hpp"
+#include "tree_manager.hpp"
+#include "xios_manager.hpp"
+#include "data_treatment.hpp"
+#include "nc4_data_output.hpp"
+
+//#include "data_manager.hpp"
+//#include "time_manager.hpp"
+
+using namespace xmlioserver;
+using namespace xmlioserver::data;
+using namespace xmlioserver::io;
+using namespace xmlioserver::tree;
+using namespace xmlioserver::xml;
+using namespace xmlioserver::comm;
+using namespace xmlioserver::func;
+
+#endif //__XMLIO__
Index: /XMLIO_V2/dev/common/src/xmlio/xmlioserver_spl.hpp
===================================================================
--- /XMLIO_V2/dev/common/src/xmlio/xmlioserver_spl.hpp	(revision 219)
+++ /XMLIO_V2/dev/common/src/xmlio/xmlioserver_spl.hpp	(revision 219)
@@ -0,0 +1,50 @@
+#ifndef __XMLIO_SPL__
+#define __XMLIO_SPL__
+
+/// standard C++ headers ///
+#include <utility>
+#include <string>
+#include <algorithm>
+
+// standard C
+#include <cstring>
+#include <cstdlib>
+#include <cmath>
+#include <ctime>
+
+// Conteneurs.
+#include <vector>
+#include <set>
+#include <stack>
+#include <list>
+#include <map>
+#include <deque>
+
+// Flux.
+#include <iostream>
+#include <fstream>
+#include <sstream>
+
+/// boost headers ///
+//#include <boost/unordered_map.hpp>
+
+/// Map ///
+#define xios_map std::map
+
+/// Macro ///
+#define UNUSED(parameter)
+
+/// DÃ©finition de types (issus de la bibliothÃšque standard)///
+typedef std::ostringstream StdOStringStream;
+typedef std::istringstream StdIStringStream;
+typedef std::ofstream      StdOFStream;
+typedef std::ifstream      StdIFStream;
+typedef std::ostream       StdOStream;
+typedef std::istream       StdIStream;
+typedef std::string        StdString;
+typedef std::size_t        StdSize;
+
+/// xmlioserver headers ///
+#include "configure.hpp"
+
+#endif //__XMLIO_SPL__
