Ignore:
Timestamp:
06/18/18 20:32:55 (6 years ago)
Author:
yushan
Message:

branch_openmp merged with trunk r1544

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/interface/c_attr/icfield_attr.cpp

    r1205 r1545  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
     
    137137     CTimer::get("XIOS").resume(); 
    138138     bool isDefined = field_hdl->check_if_active.hasInheritedValue(); 
     139     CTimer::get("XIOS").suspend(); 
     140     return isDefined; 
     141  } 
     142 
     143 
     144  void cxios_set_field_comment(field_Ptr field_hdl, const char * comment, int comment_size) 
     145  { 
     146    std::string comment_str; 
     147    if (!cstr2string(comment, comment_size, comment_str)) return; 
     148    CTimer::get("XIOS").resume(); 
     149    field_hdl->comment.setValue(comment_str); 
     150    CTimer::get("XIOS").suspend(); 
     151  } 
     152 
     153  void cxios_get_field_comment(field_Ptr field_hdl, char * comment, int comment_size) 
     154  { 
     155    CTimer::get("XIOS").resume(); 
     156    if (!string_copy(field_hdl->comment.getInheritedValue(), comment, comment_size)) 
     157      ERROR("void cxios_get_field_comment(field_Ptr field_hdl, char * comment, int comment_size)", << "Input string is too short"); 
     158    CTimer::get("XIOS").suspend(); 
     159  } 
     160 
     161  bool cxios_is_defined_field_comment(field_Ptr field_hdl) 
     162  { 
     163     CTimer::get("XIOS").resume(); 
     164     bool isDefined = field_hdl->comment.hasInheritedValue(); 
    139165     CTimer::get("XIOS").suspend(); 
    140166     return isDefined; 
Note: See TracChangeset for help on using the changeset viewer.