blob: efab0a5c5809e274fd1455f40142abd0ccec418a (
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
|
/**
** \file ast/object-exp.hh
** \brief Declaration of ast::ObjectExp.
*/
#pragma once
#include <ast/exp.hh>
#include <ast/name-ty.hh>
namespace ast
{
/// ObjectExp.
class ObjectExp : public Exp
{
public:
/** \name Ctor & dtor.
** \{ */
/// Construct an ObjectExp node.
ObjectExp(const Location& location, NameTy* type_name);
ObjectExp(const ObjectExp&) = delete;
ObjectExp& operator=(const ObjectExp&) = delete;
/// Destroy an ObjectExp node.
/** \} */
/// \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 name of the class from which the object is instantiated.
const NameTy& type_name_get() const;
/// Return name of the class from which the object is instantiated.
NameTy& type_name_get();
/** \} */
protected:
/// Name of the class from which the object is instantiated.
NameTy* type_name_;
};
} // namespace ast
#include <ast/object-exp.hxx>
|