#if defined(__WAVE__) #pragma wave option(preserve: 2, line: 0, output: "preprocessed/advert.cpp") #endif // Copyright (c) 2005-2007 Hartmut Kaiser (hartmut.kaiser@gmail.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #if defined(__WAVE__) #pragma wave option(preserve: 0, output: null) #endif #include #include #include #include #include #ifdef SAGA_DEBUG #include #else #if defined(__WAVE__) #pragma wave option(preserve: 2, output: "preprocessed/advert.cpp") #endif /////////////////////////////////////////////////////////////////////////////// namespace saga { namespace impl { advert::advert (saga::session const& s, std::string const& url, int mode) : namespace_entry (saga::object::Advert, s) { // initialize the instance data typedef adaptors::v1_0::advert_cpi_instance_data instance_data_type; typedef adaptors::instance_data advert_instance_data; { advert_instance_data data; data.init_data (this, TR1::shared_ptr ( new instance_data_type (url, mode))); } // lock goes out of scope } advert::advert (attribute const& rhs_attr) : saga::impl::namespace_entry(saga::object::Advert), attribute_base(rhs_attr) { } void advert::init() { // initialize a CPI instance and execute required functions (such as // creating the file etc.) this->initcpi(saga::adaptors::advert_cpi); } advert::~advert (void) { // free the instance data typedef adaptors::v1_0::advert_cpi_instance_data instance_data_type; typedef adaptors::instance_data advert_instance_data; advert_instance_data data; data.release_data (this); } // API methods not covered by namespace_entry SAGA_CALL_IMPL_IMPL_1 (advert, advert_cpi, saga::void_t, store_object, saga::object) SAGA_CALL_IMPL_IMPL_1 (advert, advert_cpi, saga::object, retrieve_object, saga::session) SAGA_CALL_IMPL_IMPL_1 (advert, advert_cpi, saga::void_t, store_string, std::string) SAGA_CALL_IMPL_IMPL_0 (advert, advert_cpi, std::string, retrieve_string) // Generate a exact deep copy of this object saga::object advert::clone() const { return saga::advert( new advert(static_cast(*this))); } }} // namespace saga::impl /////////////////////////////////////////////////////////////////////////////// #endif