SAGA Adaptor CPI v.1.0
|
00001 // Copyright (c) 2009 STFC 00002 // 00003 // Distributed under the Boost Software License, Version 1.0. (See accompanying 00004 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 00005 #define SAGA_NO_IMPORT_ATTRIBUTE 00006 00007 #include <iostream> 00008 00009 #include <saga/saga/isn.hpp> 00010 #include <saga/impl/isn.hpp> 00011 00012 #include <saga/saga/detail/attribute_impl.hpp> 00013 00014 namespace saga 00015 { 00016 namespace isn { 00017 entity_data::entity_data () 00018 : object (new saga::impl::entity_data()) 00019 { 00020 //initialize attribute implementation 00021 this->init(true, true); // arg1: extensible (to allow arbitrary key names) and 00022 // arg2: cache only implementation 00023 } 00024 00025 entity_data::entity_data(saga::impl::entity_data *impl) 00026 : object (impl) 00027 { 00028 } 00029 00030 entity_data::~entity_data (void) 00031 { 00032 } 00033 00035 entity_data::entity_data (saga::object const& o) 00036 : saga::object (o) 00037 { 00038 if (this->get_type() != saga::object::EntityData) 00039 { 00040 SAGA_THROW("Bad type conversion.", saga::BadParameter); 00041 } 00042 } 00043 00044 entity_data &entity_data::operator= (saga::object const& o) 00045 { 00046 return saga::object::operator=(o), *this; 00047 } 00048 00049 } // namespace isn 00050 00052 // implement the attribute functions (we need to explicitly specialize 00053 // the template because the functions are not implemented inline) 00054 template struct SAGA_ISN_PACKAGE_EXPORT_REPEAT saga::detail::attribute<isn::entity_data>; 00055 00056 template struct SAGA_ISN_PACKAGE_EXPORT saga::detail::attribute_priv<saga::isn::entity_data, task_base::Async>; 00057 template struct SAGA_ISN_PACKAGE_EXPORT saga::detail::attribute_priv<saga::isn::entity_data, task_base::Task>; 00058 template struct SAGA_ISN_PACKAGE_EXPORT saga::detail::attribute_priv<saga::isn::entity_data, task_base::Sync>; 00059 00061 } // namespace saga 00062