Bayeux  3.4.1
Core Foundation library for SuperNEMO
i_named.h
Go to the documentation of this file.
1 
3 #ifndef DATATOOLS_I_NAMED_H
4 #define DATATOOLS_I_NAMED_H
5 
6 // Standard Library:
7 #include <string>
8 
9 namespace datatools {
10 
39  class i_named
40  {
41  public:
42 
44  static const std::string & explicit_anonymous_label();
45 
49  virtual std::string fetch_name() const = 0;
50 
51  // Utility functions:
52 
54  static bool is_named(const i_named &);
55 
57  static bool is_unnamed(const i_named &);
58 
60  static bool is_nameless(const i_named &);
61 
63  static bool is_anonymous(const i_named &);
64 
65  };
66 
67 } // end of namespace datatools
68 
69 #endif // DATATOOLS_I_NAMED_H
70 
71 // Local Variables: --
72 // mode: c++ --
73 // c-file-style: "gnu" --
74 // tab-width: 2 --
75 // End: --
A pure abstract class (interface) for named objects, possibly with dynamic name. Example: a class wit...
Definition: i_named.h:39
static bool is_unnamed(const i_named &)
Check if the name is not set.
static bool is_nameless(const i_named &)
Check if the name is not set.
virtual std::string fetch_name() const =0
static bool is_anonymous(const i_named &)
Check if the name is not set or explicitely anonymous.
static bool is_named(const i_named &)
Check if the name is set.
The Bayeux/datatools library top-level namespace.
Definition: algo.h:13
static const std::string & explicit_anonymous_label()
Return the explicit anonymous label.