remove \r
[extl.git] / extl / intelligence / ga / fopti / fopti_func_traits.h
blobdc8a2d15e142fbcc9f941646391732543cba9572
1 /* ///////////////////////////////////////////////////////////////////////
2 * File: fopti_func_traits_impl.h
4 * Created: 08.09.09
5 * Updated: 08.11.07
7 * Brief: The fopti_func_traits class
9 * [<Home>]
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
13 #ifndef EXTL_INTELLIGENCE_GA_FOPTI_FUNC_TRAITS_H
14 #define EXTL_INTELLIGENCE_GA_FOPTI_FUNC_TRAITS_H
16 /*!\file fopti_func_traits.h
17 * \brief The fopti_func_traits class
19 #ifndef __cplusplus
20 # error fopti_func_traits.h need be supported by c++.
21 #endif
23 #ifndef EXTL_FOPTI_FUNC_TRAITS_SUPPORT
24 # error fopti_func_traits_impl.h is not supported by current compiler.
25 #endif
27 /* ///////////////////////////////////////////////////////////////////////
28 * Includes
30 #include "../prefix.h"
31 #include "detail/fopti_func_traits_impl.h"
33 /* ///////////////////////////////////////////////////////////////////////
34 * ::extl::intelligence namespace
36 EXTL_INTELLIGENCE_BEGIN_WHOLE_NAMESPACE
38 /*!\brief fopti_func_traits class
40 * \param Idl The individual type
41 * \param Func The function type
43 * \ingroup extl_group_intelligence
45 template< typename_param_k Idl
46 , typename_param_k Func
48 struct fopti_func_traits
49 #if EXTL_WORKAROUND_BORLAND(==, 0x551)
50 : EXTL_NS_DETAIL(fopti_func_traits_impl)<(Idl::variable_count)>::template_qual_k
51 #else
52 : EXTL_NS_DETAIL(fopti_func_traits_impl)<Idl::variable_count>::template_qual_k
53 #endif
54 impl<fopti_func_traits<Idl, Func>, Idl, Func>
56 /// \name Types
57 /// @{
58 public:
59 typedef Func func_type;
60 typedef Idl individual_type;
61 typedef typename_type_k individual_type::float_type float_type;
62 typedef typename_type_k individual_type::scopes_type scopes_type;
63 typedef typename_type_k individual_type::scope_type scope_type;
64 typedef typename_type_k individual_type::size_type size_type;
65 typedef typename_type_k individual_type::bool_type bool_type;
66 typedef typename_type_k individual_type::index_type index_type;
67 typedef typename_type_k individual_type::int_type int_type;
68 /// @}
70 /// \name Members
71 /// @{
72 private:
73 scopes_type m_scopes;
74 func_type m_func;
75 /// @}
77 /// \name Constructors
78 /// @{
79 public:
80 fopti_func_traits()
82 explicit_k fopti_func_traits(func_type const& func)
83 : m_func(func)
85 /// @}
87 /// \name Attributes
88 /// @{
89 public:
90 func_type const& func() const { return m_func; }
91 func_type& func() { return m_func; }
92 void func(func_type const& func) { m_func = func; }
94 scopes_type const& scopes() const { return m_scopes; }
95 scopes_type& scopes() { return m_scopes; }
96 void scopes(scopes_type const& sps) { m_scopes = sps; }
97 /// @}
102 /* ///////////////////////////////////////////////////////////////////////
103 * ::extl::intelligence namespace
105 EXTL_INTELLIGENCE_END_WHOLE_NAMESPACE
107 /* //////////////////////////////////////////////////////////////////// */
108 #endif /* EXTL_INTELLIGENCE_GA_FOPTI_FUNC_TRAITS_H */
109 /* //////////////////////////////////////////////////////////////////// */