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 
7 #include <hilti/ast/type.h>
8 
9 namespace hilti::type {
10 
19 public:
20  Library(std::string cxx_name, Meta m = Meta());
21 
22  const std::string& cxxName() const { return _cxx_name; }
23  bool operator==(const Library& other) const { return _cxx_name == other._cxx_name; }
24 
26  auto isEqual(const Type& other) const {
27  if ( other.cxxID() == _cxx_name )
28  return true;
29 
30  return node::isEqual(this, other);
31  }
32 
34  auto _isResolved(ResolvedState* rstate) const { return true; }
36  auto properties() const { return node::Properties{{"cxx_name", _cxx_name}}; }
37 
38 private:
39  std::string _cxx_name;
40 };
41 
42 } // namespace hilti::type
auto isEqual(const Type &other) const
Definition: library.h:26
auto _isResolved(ResolvedState *rstate) const
Definition: library.h:34
Definition: type.h:38
Definition: meta.h:19
Definition: type.h:160
Definition: library.h:18
const std::optional< ID > & cxxID() const
Definition: type.h:186
std::map< std::string, node::detail::PropertyValue > Properties
Definition: node.h:98
Definition: type.h:206
Definition: type.h:33
auto properties() const
Definition: library.h:36
Definition: type.h:26