epoc32/include/stdapis/boost/serialization/is_abstract.hpp
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
#ifndef BOOST_SERIALIZATION_IS_ABSTRACT_CLASS_HPP
williamr@4
     2
#define BOOST_SERIALIZATION_IS_ABSTRACT_CLASS_HPP
williamr@2
     3
williamr@4
     4
// MS compatible compilers support #pragma once
williamr@2
     5
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
williamr@2
     6
# pragma once
williamr@2
     7
#endif
williamr@2
     8
williamr@2
     9
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
williamr@2
    10
// is_abstract_class.hpp:
williamr@4
    11
williamr@4
    12
// (C) Copyright 2002 Rani Sharoni (rani_sharoni@hotmail.com) and Robert Ramey
williamr@4
    13
// Use, modification and distribution is subject to the Boost Software
williamr@4
    14
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
williamr@4
    15
// http://www.boost.org/LICENSE_1_0.txt)
williamr@4
    16
williamr@2
    17
//  See http://www.boost.org for updates, documentation, and revision history.
williamr@2
    18
williamr@4
    19
#include <boost/config.hpp>
williamr@4
    20
#include <boost/mpl/bool.hpp>
williamr@4
    21
#include <boost/type_traits/is_abstract.hpp>
williamr@2
    22
williamr@2
    23
namespace boost {
williamr@4
    24
namespace serialization {
williamr@4
    25
    template<class T>
williamr@4
    26
    struct is_abstract {
williamr@4
    27
        // default to false if not supported
williamr@4
    28
        #ifdef BOOST_NO_IS_ABSTRACT
williamr@4
    29
            typedef BOOST_DEDUCED_TYPENAME mpl::bool_<false> type;
williamr@4
    30
            BOOST_STATIC_CONSTANT(bool, value = false); 
williamr@4
    31
        #else
williamr@4
    32
            typedef BOOST_DEDUCED_TYPENAME boost::is_abstract<T>::type type;
williamr@4
    33
            BOOST_STATIC_CONSTANT(bool, value = type::value); 
williamr@4
    34
        #endif
williamr@4
    35
    };
williamr@4
    36
} // namespace serialization
williamr@2
    37
} // namespace boost
williamr@2
    38
williamr@4
    39
// define a macro to make explicit designation of this more transparent
williamr@4
    40
#define BOOST_IS_ABSTRACT(T)                          \
williamr@4
    41
namespace boost {                                     \
williamr@4
    42
namespace serialization {                             \
williamr@4
    43
template<>                                            \
williamr@4
    44
struct is_abstract< T > {                             \
williamr@4
    45
    typedef mpl::bool_<true> type;                    \
williamr@4
    46
    BOOST_STATIC_CONSTANT(bool, value = true);        \
williamr@4
    47
};                                                    \
williamr@4
    48
}                                                     \
williamr@4
    49
}                                                     \
williamr@4
    50
/**/
williamr@2
    51
williamr@4
    52
#endif //BOOST_SERIALIZATION_IS_ABSTRACT_CLASS_HPP