#ifndef SAGA_IMPL_PACKAGES_DATA_ADVERT_ADVERT_HPP #define SAGA_IMPL_PACKAGES_DATA_ADVERT_ADVERT_HPP #if defined(__WAVE__) #pragma wave option(preserve: 2, line: 0, output: "preprocessed/advert.hpp") #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 #if defined(_MSC_VER) && (_MSC_VER >= 1200) #pragma once #endif #include #include #include #include #include #include #include #include #include #ifdef SAGA_DEBUG #include #else #if defined(__WAVE__) #pragma wave option(output: "preprocessed/advert.hpp") #endif /////////////////////////////////////////////////////////////////////////////// namespace saga { namespace impl { /** * This class acts as a proxy class, hiding all the nasty Saga stuff * (like creating and using adaptors) for the user. Users just call * the functions of this class like to would on every local object, * and don't have to worry about adaptors. It extends saga::file_cpi. */ class advert : public saga::impl::namespace_entry, // v1_0::advert_cpi public saga::impl::attribute { typedef v1_0::advert_cpi advert_cpi; typedef v1_0::preference_type preference_type; typedef saga::impl::attribute attribute_base; typedef saga::impl::monitorable monitorable_base; // initialize newly attached CPI instance void init(); explicit advert(attribute const& attr); public: /** * Constructor of file, sets the location of the file, and gets * an instance of the Saga engine * * @param url the full path and name of the file * @param s the session handle */ advert (saga::session const& s, std::string const& url, int mode); /*! destructor of advert, destroys file and the adaptor it is * bound to */ ~advert (void); // API functions not covered by namespace_entry SAGA_CALL_IMPL_DECL_1 (saga::void_t, store_object, saga::object) SAGA_CALL_IMPL_DECL_1 (saga::object, retrieve_object, saga::session) SAGA_CALL_IMPL_DECL_1 (saga::void_t, store_string, std::string) SAGA_CALL_IMPL_DECL_0 (std::string, retrieve_string) saga::impl::attribute* get_attributes() { return this; } saga::impl::attribute const* get_attributes() const { return this; } saga::impl::proxy* get_proxy() { return this; } saga::impl::proxy const* get_proxy() const { return this; } // Generate a exact deep copy of this object saga::object clone() const; }; } // namespace impl } // namespace saga /////////////////////////////////////////////////////////////////////////////// #if defined(__WAVE__) #pragma wave option(output: null) #endif #endif // !defined(SAGA_DEBUG) #endif // SAGA_IMPL_PACKAGES_DATA_ADVERT_ADVERT_HPP