nany
interface.h
1 #pragma once
2 #include <yuni/yuni.h>
3 #include <yuni/core/string.h>
4 #include "type.h"
5 #include "funcdef.h"
6 
7 
8 namespace ny {
9 
10 
11 struct ClassdefInterface final {
15  bool empty() const;
16 
20  void clear();
21 
22  bool hasSelf() const;
23 
24  Funcdef& self();
25  const Funcdef& self() const;
26 
28  void print(Yuni::String& out, bool clearBefore = true) const;
29 
30  template<class C> void eachUnresolved(const C& callback);
31 
32 
33 private:
34  // \brief Add a new funcdef as part as the interface of the current classdef
35  void add(Funcdef* funcdef);
36 
37 private:
39  std::vector<yuni::Ref<Funcdef>> pInterface;
41  yuni::Ref<Funcdef> pSelf;
42  friend struct ClassdefTable;
43 
44 }; // struct ClassdefInterface
45 
46 
47 } // namespace ny
48 
49 #include "interface.hxx"
Definition: interface.h:11
bool empty() const
Get if the container is empty.
Definition: interface.hxx:25
Function definition.
Definition: funcdef.h:15
Definition: ast.cpp:6
Definition: classdef-table.h:19
void print(Yuni::String &out, bool clearBefore=true) const
Print.
Definition: interface.cpp:9
void clear()
Empty the interface.
Definition: interface.hxx:30