Changeset 1158 for XIOS/dev/dev_olga/src/interface/c_attr/icfile_attr.cpp
- Timestamp:
- 06/06/17 17:58:16 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/src/interface/c_attr/icfile_attr.cpp
r932 r1158 553 553 554 554 555 void cxios_set_file_time_stamp_format(file_Ptr file_hdl, const char * time_stamp_format, int time_stamp_format_size) 556 { 557 std::string time_stamp_format_str; 558 if (!cstr2string(time_stamp_format, time_stamp_format_size, time_stamp_format_str)) return; 559 CTimer::get("XIOS").resume(); 560 file_hdl->time_stamp_format.setValue(time_stamp_format_str); 561 CTimer::get("XIOS").suspend(); 562 } 563 564 void cxios_get_file_time_stamp_format(file_Ptr file_hdl, char * time_stamp_format, int time_stamp_format_size) 565 { 566 CTimer::get("XIOS").resume(); 567 if (!string_copy(file_hdl->time_stamp_format.getInheritedValue(), time_stamp_format, time_stamp_format_size)) 568 ERROR("void cxios_get_file_time_stamp_format(file_Ptr file_hdl, char * time_stamp_format, int time_stamp_format_size)", << "Input string is too short"); 569 CTimer::get("XIOS").suspend(); 570 } 571 572 bool cxios_is_defined_file_time_stamp_format(file_Ptr file_hdl) 573 { 574 CTimer::get("XIOS").resume(); 575 bool isDefined = file_hdl->time_stamp_format.hasInheritedValue(); 576 CTimer::get("XIOS").suspend(); 577 return isDefined; 578 } 579 580 581 void cxios_set_file_time_stamp_name(file_Ptr file_hdl, const char * time_stamp_name, int time_stamp_name_size) 582 { 583 std::string time_stamp_name_str; 584 if (!cstr2string(time_stamp_name, time_stamp_name_size, time_stamp_name_str)) return; 585 CTimer::get("XIOS").resume(); 586 file_hdl->time_stamp_name.setValue(time_stamp_name_str); 587 CTimer::get("XIOS").suspend(); 588 } 589 590 void cxios_get_file_time_stamp_name(file_Ptr file_hdl, char * time_stamp_name, int time_stamp_name_size) 591 { 592 CTimer::get("XIOS").resume(); 593 if (!string_copy(file_hdl->time_stamp_name.getInheritedValue(), time_stamp_name, time_stamp_name_size)) 594 ERROR("void cxios_get_file_time_stamp_name(file_Ptr file_hdl, char * time_stamp_name, int time_stamp_name_size)", << "Input string is too short"); 595 CTimer::get("XIOS").suspend(); 596 } 597 598 bool cxios_is_defined_file_time_stamp_name(file_Ptr file_hdl) 599 { 600 CTimer::get("XIOS").resume(); 601 bool isDefined = file_hdl->time_stamp_name.hasInheritedValue(); 602 CTimer::get("XIOS").suspend(); 603 return isDefined; 604 } 605 606 607 void cxios_set_file_time_units(file_Ptr file_hdl, const char * time_units, int time_units_size) 608 { 609 std::string time_units_str; 610 if (!cstr2string(time_units, time_units_size, time_units_str)) return; 611 CTimer::get("XIOS").resume(); 612 file_hdl->time_units.fromString(time_units_str); 613 CTimer::get("XIOS").suspend(); 614 } 615 616 void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size) 617 { 618 CTimer::get("XIOS").resume(); 619 if (!string_copy(file_hdl->time_units.getInheritedStringValue(), time_units, time_units_size)) 620 ERROR("void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size)", << "Input string is too short"); 621 CTimer::get("XIOS").suspend(); 622 } 623 624 bool cxios_is_defined_file_time_units(file_Ptr file_hdl) 625 { 626 CTimer::get("XIOS").resume(); 627 bool isDefined = file_hdl->time_units.hasInheritedValue(); 628 CTimer::get("XIOS").suspend(); 629 return isDefined; 630 } 631 632 555 633 void cxios_set_file_timeseries(file_Ptr file_hdl, const char * timeseries, int timeseries_size) 556 634 { … … 629 707 return isDefined; 630 708 } 709 710 711 void cxios_set_file_uuid_format(file_Ptr file_hdl, const char * uuid_format, int uuid_format_size) 712 { 713 std::string uuid_format_str; 714 if (!cstr2string(uuid_format, uuid_format_size, uuid_format_str)) return; 715 CTimer::get("XIOS").resume(); 716 file_hdl->uuid_format.setValue(uuid_format_str); 717 CTimer::get("XIOS").suspend(); 718 } 719 720 void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size) 721 { 722 CTimer::get("XIOS").resume(); 723 if (!string_copy(file_hdl->uuid_format.getInheritedValue(), uuid_format, uuid_format_size)) 724 ERROR("void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size)", << "Input string is too short"); 725 CTimer::get("XIOS").suspend(); 726 } 727 728 bool cxios_is_defined_file_uuid_format(file_Ptr file_hdl) 729 { 730 CTimer::get("XIOS").resume(); 731 bool isDefined = file_hdl->uuid_format.hasInheritedValue(); 732 CTimer::get("XIOS").suspend(); 733 return isDefined; 734 } 735 736 737 void cxios_set_file_uuid_name(file_Ptr file_hdl, const char * uuid_name, int uuid_name_size) 738 { 739 std::string uuid_name_str; 740 if (!cstr2string(uuid_name, uuid_name_size, uuid_name_str)) return; 741 CTimer::get("XIOS").resume(); 742 file_hdl->uuid_name.setValue(uuid_name_str); 743 CTimer::get("XIOS").suspend(); 744 } 745 746 void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size) 747 { 748 CTimer::get("XIOS").resume(); 749 if (!string_copy(file_hdl->uuid_name.getInheritedValue(), uuid_name, uuid_name_size)) 750 ERROR("void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size)", << "Input string is too short"); 751 CTimer::get("XIOS").suspend(); 752 } 753 754 bool cxios_is_defined_file_uuid_name(file_Ptr file_hdl) 755 { 756 CTimer::get("XIOS").resume(); 757 bool isDefined = file_hdl->uuid_name.hasInheritedValue(); 758 CTimer::get("XIOS").suspend(); 759 return isDefined; 760 } 631 761 }
Note: See TracChangeset
for help on using the changeset viewer.