Ignore:
Timestamp:
10/16/12 13:04:44 (12 years ago)
Author:
ymipsl
Message:

Major Update

  • redesign Type and attribute manipulation
  • add enumerate type and attribute
  • use blitz class array instead of boost class array

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp

    r352 r369  
    1111#include "icutil.hpp" 
    1212#include "timer.hpp" 
    13 #include "axis.hpp" 
     13#include "node_type.hpp" 
    1414 
    1515extern "C" 
     
    109109  void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int extent1) 
    110110  { 
    111      CTimer::get("XIOS").resume(); 
    112     ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 
    113     std::copy(value, &(value[array_tmp->num_elements()]), array_tmp->data()); 
    114     axis_hdl->value.setValue(array_tmp); 
     111    CTimer::get("XIOS").resume(); 
     112    CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ; 
     113    axis_hdl->value.reference(tmp.copy()); 
    115114    axis_hdl->sendAttributToServer(axis_hdl->value); 
    116115  } 
     
    118117  void cxios_get_axis_value(axis_Ptr axis_hdl, double* value, int extent1) 
    119118  { 
    120     if (!array_copy(axis_hdl->value.getValue(), value, extent1)) 
    121      ERROR("void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int extent1)",<<"Output array size is not conform to array size attribute") ; 
     119    CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ; 
     120    tmp=axis_hdl->value ; 
    122121     CTimer::get("XIOS").suspend(); 
     122  } 
     123   
     124   
     125  void cxios_set_axis_zoom_begin(axis_Ptr axis_hdl, int zoom_begin) 
     126  { 
     127     CTimer::get("XIOS").resume(); 
     128    axis_hdl->zoom_begin.setValue(zoom_begin); 
     129    axis_hdl->sendAttributToServer(axis_hdl->zoom_begin); 
     130     CTimer::get("XIOS").suspend(); 
     131  } 
     132   
     133  void cxios_get_axis_zoom_begin(axis_Ptr axis_hdl, int* zoom_begin) 
     134  { 
     135    *zoom_begin = axis_hdl->zoom_begin.getValue(); 
     136  } 
     137   
     138   
     139  void cxios_set_axis_zoom_end(axis_Ptr axis_hdl, int zoom_end) 
     140  { 
     141     CTimer::get("XIOS").resume(); 
     142    axis_hdl->zoom_end.setValue(zoom_end); 
     143    axis_hdl->sendAttributToServer(axis_hdl->zoom_end); 
     144     CTimer::get("XIOS").suspend(); 
     145  } 
     146   
     147  void cxios_get_axis_zoom_end(axis_Ptr axis_hdl, int* zoom_end) 
     148  { 
     149    *zoom_end = axis_hdl->zoom_end.getValue(); 
     150  } 
     151   
     152   
     153  void cxios_set_axis_zoom_size(axis_Ptr axis_hdl, int zoom_size) 
     154  { 
     155     CTimer::get("XIOS").resume(); 
     156    axis_hdl->zoom_size.setValue(zoom_size); 
     157    axis_hdl->sendAttributToServer(axis_hdl->zoom_size); 
     158     CTimer::get("XIOS").suspend(); 
     159  } 
     160   
     161  void cxios_get_axis_zoom_size(axis_Ptr axis_hdl, int* zoom_size) 
     162  { 
     163    *zoom_size = axis_hdl->zoom_size.getValue(); 
    123164  } 
    124165   
Note: See TracChangeset for help on using the changeset viewer.