Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
signature.hh
Go to the documentation of this file.
1 #ifndef VCSN_MISC_SIGNATURE_HH
2 # define VCSN_MISC_SIGNATURE_HH
3 
4 # include <iosfwd>
5 # include <string>
6 # include <vector>
7 
8 # include <vcsn/misc/attributes.hh>
9 # include <vcsn/misc/export.hh>
10 
11 namespace vcsn LIBVCSN_API
12 {
14  struct signature
15  {
16  using sig_t = std::vector<std::string>;
17 
18  signature() = default;
19 
20  signature(const std::initializer_list<std::string>& l)
21  : sig(l)
22  {}
23 
24  std::string to_string() const;
25 
26  ATTRIBUTE_PURE
27  bool operator<(const signature& that) const
28  {
29  return sig < that.sig;
30  }
31 
32  sig_t::const_iterator begin() const
33  {
34  return std::begin(sig);
35  }
36 
37  sig_t::const_iterator end() const
38  {
39  return std::end(sig);
40  }
41 
43  };
44 
46  std::ostream& operator<<(std::ostream& os, const signature& sig);
47 }
48 
49 #endif // !VCSN_MISC_SIGNATURE_HH
ATTRIBUTE_PURE bool operator<(const signature &that) const
Definition: signature.hh:27
std::ostream & operator<<(std::ostream &os, direction d)
Pretty-printing.
Definition: direction.cc:19
sig_t::const_iterator begin() const
Definition: signature.hh:32
Signature of a function call.
Definition: signature.hh:14
std::vector< std::string > sig_t
Definition: signature.hh:16
signature(const std::initializer_list< std::string > &l)
Definition: signature.hh:20
sig_t::const_iterator end() const
Definition: signature.hh:37
std::ostringstream os
The output stream: the corresponding C++ snippet to compile.
Definition: translate.cc:331
#define LIBVCSN_API
Definition: export.hh:9
signature()=default
std::string to_string() const
Definition: signature.cc:9