1 | /* ************************************************************************** * |
---|
2 | * Copyright © IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011 * |
---|
3 | * ************************************************************************** */ |
---|
4 | |
---|
5 | #include "icutil.hpp" |
---|
6 | |
---|
7 | extern "C" |
---|
8 | { |
---|
9 | // /////////////////////////////// Définitions ////////////////////////////// // |
---|
10 | |
---|
11 | // ----------------------- Redéfinition de types ---------------------------- |
---|
12 | |
---|
13 | typedef enum { D360 = 0 , ALLLEAP, NOLEAP, JULIAN, GREGORIAN } XCalendarType ; |
---|
14 | |
---|
15 | typedef void * XContextPtr; |
---|
16 | |
---|
17 | // ------------------------- Attributs des contextes ------------------------ |
---|
18 | |
---|
19 | |
---|
20 | void xios_set_context_calendar_type(XContextPtr context_hdl, const char * calendar_type, int calendar_type_size) |
---|
21 | { |
---|
22 | std::string calendar_type_str; |
---|
23 | if (!cstr2string(calendar_type, calendar_type_size, calendar_type_str)) return; |
---|
24 | } |
---|
25 | |
---|
26 | void xios_set_context_start_date(XContextPtr context_hdl, const char * start_date, int start_date_size) |
---|
27 | { |
---|
28 | std::string start_date_str; |
---|
29 | if (!cstr2string(start_date, start_date_size, start_date_str)) return; |
---|
30 | } |
---|
31 | |
---|
32 | void xios_set_context_output_dir(XContextPtr context_hdl, const char * output_dir, int output_dir_size) |
---|
33 | { |
---|
34 | std::string output_dir_str; |
---|
35 | if (!cstr2string(output_dir, output_dir_size, output_dir_str)) return; |
---|
36 | } |
---|
37 | |
---|
38 | // ------------------------ Création des handle ----------------------------- |
---|
39 | |
---|
40 | void xios_context_handle_create (XContextPtr * _ret, const char * _id, int _id_len) |
---|
41 | { |
---|
42 | std::string id; |
---|
43 | if (!cstr2string(_id, _id_len, id)) return; |
---|
44 | } |
---|
45 | |
---|
46 | // ------------------------ Changements de contextes ------------------------ |
---|
47 | |
---|
48 | void xios_context_set_current(XContextPtr context, bool withswap) |
---|
49 | { |
---|
50 | |
---|
51 | } |
---|
52 | |
---|
53 | // ------------------------ Création de contexte ---------------------------- |
---|
54 | |
---|
55 | void xios_context_create(XContextPtr * context, |
---|
56 | const char * context_id, |
---|
57 | int context_id_size, |
---|
58 | XCalendarType calendar_type, |
---|
59 | int year, |
---|
60 | int month, |
---|
61 | int day, |
---|
62 | int hour, |
---|
63 | int minute, |
---|
64 | int second) |
---|
65 | { |
---|
66 | std::string context_id_str; |
---|
67 | if (!cstr2string(context_id, context_id_size, context_id_str)) return; |
---|
68 | |
---|
69 | } |
---|
70 | |
---|
71 | } // extern "C" |
---|