Bayeux  3.4.1
Core Foundation library for SuperNEMO
access_type.h
Go to the documentation of this file.
1 //
4 // Copyright (c) 2015 by François Mauger <mauger@lpccaen.in2p3.fr>
5 //
6 // This file is part of Datatools.
7 //
8 // Datatools is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation, either version 3 of the License, or
11 // (at your option) any later version.
12 //
13 // Datatools is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with Datatools. If not, see <http://www.gnu.org/licenses/>.
20 
21 #ifndef DATATOOLS_INTROSPECTION_ACCESS_TYPE_H
22 #define DATATOOLS_INTROSPECTION_ACCESS_TYPE_H
23 
24 // Standard library:
25 #include <string>
26 
27 #ifndef Q_MOC_RUN
29 #endif // Q_MOC_RUN
30 
31 namespace datatools {
32 
34  namespace introspection {
35 
37  enum access_type {
41  };
42 
44  const std::string & to_string(access_type);
45 
47  bool from_string(const std::string & label_, access_type & access_);
48 
50  bool is_valid(access_type t_);
51 
53  bool is_input(access_type t_);
54 
56  bool is_output(access_type t_);
57 
58  } // namespace introspection
59 
60 } // namespace datatools
61 
62 #ifndef Q_MOC_RUN
63 // Activate reflection layer:
65 #endif // Q_MOC_RUN
66 
67 #endif // DATATOOLS_INTROSPECTION_ACCESS_TYPE_H
68 
69 // Local Variables: --
70 // mode: c++ --
71 // c-file-style: "gnu" --
72 // tab-width: 2 --
73 // End: --
access_type
Access type associated to a method argument.
Definition: access_type.h:37
bool is_input(access_type t_)
Check if an access type is input.
bool from_string(const std::string &label_, access_type &access_)
Convert a string to an access type.
bool is_output(access_type t_)
Check if an access type is output.
const std::string & to_string(access_type)
Convert an access type to a string.
Input.
Definition: access_type.h:39
Invalid access.
Definition: access_type.h:38
Output.
Definition: access_type.h:40
bool is_valid(access_type t_)
Check the validity of an access type.
The Bayeux/datatools library top-level namespace.
Definition: algo.h:13
#define DR_TYPE_INIT(Introspectable)
Definition: reflection_interface.h:165