Last change
on this file since 335 was
335,
checked in by ymipsl, 12 years ago
|
Change namespace xmlioserver -> xios
YM
|
File size:
535 bytes
|
Line | |
---|
1 | #ifndef __XIOS_IMPL_HPP__ |
---|
2 | #define __XIOS_IMPL_HPP__ |
---|
3 | |
---|
4 | #include "xmlioserver_spl.hpp" |
---|
5 | #include "variable.hpp" |
---|
6 | |
---|
7 | namespace xios |
---|
8 | { |
---|
9 | template <typename T> |
---|
10 | T CXios::getin(const string& id) |
---|
11 | { |
---|
12 | return CObjectFactory::GetObject<CVariable>("xios",id)->getData<T>() ; |
---|
13 | } |
---|
14 | |
---|
15 | template <typename T> |
---|
16 | T CXios::getin(const string& id, const T& defaultValue) |
---|
17 | { |
---|
18 | if (CObjectFactory::HasObject<CVariable>("xios",id)) |
---|
19 | return CObjectFactory::GetObject<CVariable>("xios",id)->getData<T>() ; |
---|
20 | else return defaultValue ; |
---|
21 | } |
---|
22 | |
---|
23 | |
---|
24 | } |
---|
25 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.