blob: 0045685d14bcd4894e7c4e4a3b3c0c2b74a8af5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/**
** \file ast/class-ty.hh
** \brief Declaration of ast::ClassTy.
*/
#pragma once
#include <ast/chunk-list.hh>
#include <ast/name-ty.hh>
#include <ast/ty.hh>
namespace ast
{
/// ClassTy.
class ClassTy : public Ty
{
public:
/** \name Ctor & dtor.
** \{ */
/// Construct a ClassTy node.
ClassTy(const Location& location, NameTy* super, ChunkList* chunks);
ClassTy(const ClassTy&) = delete;
ClassTy& operator=(const ClassTy&) = delete;
/// Destroy a ClassTy node.
~ClassTy() override;
/** \} */
/// \name Visitors entry point.
/// \{ */
/// Accept a const visitor \a v.
void accept(ConstVisitor& v) const override;
/// Accept a non-const visitor \a v.
void accept(Visitor& v) override;
/// \}
/** \name Accessors.
** \{ */
/// Return super class.
const NameTy& super_get() const;
/// Return super class.
NameTy& super_get();
/// Return list of declarations.
const ChunkList& chunks_get() const;
/// Return list of declarations.
ChunkList& chunks_get();
/** \} */
protected:
/// Super class.
NameTy* super_;
/// List of declarations.
ChunkList* chunks_;
};
} // namespace ast
#include <ast/class-ty.hxx>
|