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