IDL compiler front-end library
Loading...
Searching...
No Matches
IV_Base.h
Go to the documentation of this file.
1
2/*
3* Nirvana IDL front-end library.
4*
5* This is a part of the Nirvana project.
6*
7* Author: Igor Popov
8*
9* Copyright (c) 2021 Igor Popov.
10*
11* This program is free software; you can redistribute it and/or modify
12* it under the terms of the GNU Lesser General Public License as published by
13* the Free Software Foundation; either version 3 of the License, or
14* (at your option) any later version.
15*
16* This program is distributed in the hope that it will be useful,
17* but WITHOUT ANY WARRANTY; without even the implied warranty of
18* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19* GNU General Public License for more details.
20*
21* You should have received a copy of the GNU Lesser General Public
22* License along with this library. If not, see <http://www.gnu.org/licenses/>.
23*
24* Send comments and/or bug reports to:
25* popov.nirvana@gmail.com
26*/
27#ifndef IDLFE_AST_IV_BASE_H_
28#define IDLFE_AST_IV_BASE_H_
29#pragma once
30
31#include "ItemScope.h"
32#include "Container.h"
33#include "ForwardDeclarable.h"
34
35namespace AST {
36
38class IV_Base :
39 public ItemScope,
40 public Container,
42{
43protected:
45 ItemScope (kind, builder, name)
46 {}
47
48private:
49 friend class Builder;
50
51 virtual bool prefix (Builder& builder, const std::string& pref, const Location& loc)
52 {
53 if (ItemWithId::prefix (builder, pref, loc))
54 return ItemScope::prefix (builder, pref, loc);
55 else
56 return false;
57 }
58};
59
60typedef std::vector <const IV_Base*> IV_Bases;
61
62}
63
64#endif
The AST builder.
Definition Builder.h:60
Sequential container of the AST items.
Definition Container.h:58
The item that can be forward declared.
The common base for Interface and ValueType.
Definition IV_Base.h:42
Kind
The kind of item.
Definition Item.h:45
Kind kind() const noexcept
Definition Item.h:75
The named item which defines a scope.
Definition ItemScope.h:38
Stores the location information.
Definition Location.h:43
const Identifier & name() const noexcept
Definition NamedItem.h:48
The IDL simple declarator.
Definition Declarators.h:41
Abstract Syntax Tree namespace.
Definition Array.h:34