Spicy
library.h
1 // Copyright (c) 2020-2021 by the Zeek Project. See LICENSE for details.
2 
3 #pragma once
4 
5 #include <string>
6 #include <utility>
7 
8 #include <hilti/ast/type.h>
9 
10 namespace hilti {
11 namespace type {
12 
21 public:
22  Library(std::string cxx_name, Meta m = Meta()) : TypeBase(std::move(m)), _cxx_name(std::move(cxx_name)) {}
23 
24  const std::string& cxxName() const { return _cxx_name; }
25  bool operator==(const Library& other) const { return _cxx_name == other._cxx_name; }
26 
28  auto isEqual(const Type& other) const {
29  if ( other.cxxID() == _cxx_name )
30  return true;
31 
32  return node::isEqual(this, other);
33  }
34 
36  auto properties() const { return node::Properties{{"cxx_name", _cxx_name}}; }
37 
38 private:
39  std::string _cxx_name;
40 };
41 
42 } // namespace type
43 } // namespace hilti
auto isEqual(const Type &other) const
Definition: library.h:28
Definition: type.h:27
Definition: meta.h:18
Definition: library.h:20
std::map< std::string, node::detail::PropertyValue > Properties
Definition: node.h:83
Definition: type.h:152
Definition: type.h:23
auto properties() const
Definition: library.h:36