Ignore:
Timestamp:
04/07/11 15:04:00 (13 years ago)
Author:
hozdoba
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/xmlio/main_server.cpp

    r158 r168  
    11// XmlIOServer 
    2 //#include <boost/type_traits/is_convertible.hpp> 
    3 //template< typename From, typename To > struct is_convertible : ::boost::integral_constant<bool,(::boost::detail::is_convertible_impl_dispatch<From,To> ::value)>;  
    4 /* 
    5 namespace boost 
    6 { 
    7   template< typename From, typename To > struct is_convertible ; 
    8 } 
    9 */ 
    102#include "xmlioserver.hpp" 
    113 
     4#include "attribute_template_impl.hpp" 
     5#include "group_template_impl.hpp" 
     6 
    127#include "fake.hpp" 
    13 #include "attribute_template_impl.hpp" 
    14 #include "nc4_data_output.hpp" 
    158 
    169// Point d'entrée du programme principal 
     
    2013   { 
    2114      comm::CMPIManager::Initialise(&argc, &argv); // < seulement en mode connecté 
    22       CXIOSManager::Initialise(CXIOSManager::CLIENT, &argc, &argv); 
     15       
     16      // Création d'un contexte 
     17      boost::shared_ptr<CContext> contxt = CTreeManager::CreateContext("mon_context"); 
     18       
     19       
     20      boost::shared_ptr<CGridGroup>   grid_def   =  
     21         CObjectFactory::GetObject<CGridGroup>(StdString("grid_definition")); 
     22      boost::shared_ptr<CAxisGroup>   axis_def   =  
     23         CObjectFactory::GetObject<CAxisGroup>(StdString("axis_definition")); 
     24      boost::shared_ptr<CDomainGroup> domain_def =  
     25         CObjectFactory::GetObject<CDomainGroup>(StdString("domain_definition")); 
     26       
     27      // Ajout d'une grille, d'un axe et d'un domaine. 
     28      boost::shared_ptr<CGrid>   grid   =  
     29         CGroupFactory::CreateChild(grid_def  , StdString("ma_grille")); 
     30      boost::shared_ptr<CAxis>   axis   =  
     31         CGroupFactory::CreateChild(axis_def  , StdString("mon_axe")); 
     32      boost::shared_ptr<CDomain> domain =  
     33         CGroupFactory::CreateChild(domain_def, StdString("mon_domaine")); 
     34       
     35      // Définition des attributs de la grille. 
     36      grid->domain_ref.setValue(StdString("mon_domaine")); 
     37      grid->axis_ref.setValue(StdString("mon_axe")); 
     38       
     39      // Définition des attributs de l'axe. 
     40      ARRAY_CREATE(zvalue, double, 1, [100]); 
     41            
     42      axis->size.setValue(zvalue->num_elements()); 
     43      axis->zvalue.setValue(zvalue); 
     44       
     45      // Définition des attributs du domaine l'axe. 
     46      ARRAY_CREATE(latvalue, double, 1, [200]); 
     47      ARRAY_CREATE(lonvalue, double, 1, [200]); 
     48       
     49      domain->ni_glo.setValue(40); 
     50      domain->nj_glo.setValue(40); 
     51       
     52      domain->ibegin.setValue(1); 
     53      domain->ni.setValue(20);       
     54      domain->jbegin.setValue(1); 
     55      domain->nj.setValue(10); 
     56       
     57      domain->data_dim.setValue(2); 
     58       
     59      domain->lonvalue.setValue(lonvalue); 
     60      domain->latvalue.setValue(latvalue); 
     61       
     62      // Résolution 
     63      grid->solveReference(); 
     64       
     65      // Sortie de l'arborescence xml sous forme de fichier. 
     66      CTreeManager::PrintTreeToFile("data/def/test.xml"); 
     67       
     68      
     69      
     70      
     71      
     72      
     73      
     74      
     75      
     76      
     77      
     78      
     79      
     80      
     81      
     82      
     83      
     84       
     85      /*CXIOSManager::Initialise(CXIOSManager::CLIENT, &argc, &argv); 
    2386      CXIOSManager::AddClient("nemo", 
    2487                              CMPIManager::GetCommSize(CMPIManager::GetCommWorld()), 
     
    2689                              &nemo_fake_entry); 
    2790      CXIOSManager::RunClient(); 
    28       CXIOSManager::Finalize(); 
     91      CXIOSManager::Finalize();*/ 
    2992 
    3093      comm::CMPIManager::Finalize(); // < seulement en mode connecté 
    31  
     94       
    3295      //CXIOSManager::AddClient("orchidee", 1, 1, &orchidee_fake_entry); 
    3396      //CXIOSManager::AddClient("lmdz"    , 2, 2, &lmdz_fake_entry); 
Note: See TracChangeset for help on using the changeset viewer.