/** * * OOAS Compiler - C++ AST * * Copyright 2015, AIT Austrian Institute of Technology. * All rights reserved. * * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED. * * If you modify the file please update the list of contributors below to in- * clude your name. Please also stick to the coding convention of using TABs * to do the basic (block-level) indentation and spaces for anything after * that. (Enable the display of special chars and it should be pretty obvious * what this means.) Also, remove all trailing whitespace. * * Contributors: * Willibald Krenn (AIT) * Stephan Zimmerer (AIT) * Christoph Czurda (AIT) * */ #pragma once #include #include #include #include #include #include namespace Ast { /* * General list based on std::deque, also inherits from * TireaisObject. */ template class TiresiasList : public std::deque , public Base::TiresiasObject { protected: // define a default constructor TiresiasList() {} // define a copy constructor that really makes a copy TiresiasList(const TiresiasList& toCopy) { this->insert(this->begin(), toCopy.begin(), toCopy.end()); } public: // define a move assignment operator that moves the lists contents TiresiasList* operator= (TiresiasList&& move) { this->insert(this->begin(), std::make_move_iterator(move.begin()), std::make_move_iterator(move.end())); return this; } }; /* * ParameterList class. */ class ParameterList : public TiresiasList { protected: using TiresiasList::TiresiasList; friend class Ast; }; /* * TypeList class */ class TypeList : public TiresiasList { protected: using TiresiasList::TiresiasList; friend class Ast; }; /* * ExpressionList class */ class Expression; // forward class ExpressionList : public TiresiasList { protected: using TiresiasList::TiresiasList; friend class Ast; }; /* * StatementList class */ class StatementList : public TiresiasList { protected: using TiresiasList::TiresiasList; friend class Ast; }; /* * IdentifierList class */ class IdentifierList : public TiresiasList { protected: using TiresiasList::TiresiasList; friend class Ast; }; /* * FunctionIdentifierList class */ class FunctionIdentifier; // forward class FunctionIdentifierList : public TiresiasList { protected: using TiresiasList::TiresiasList; friend class Ast; }; /* * ActionSystemInstanceList class */ class ActionSystemInstance; // forward class ActionSystemInstanceList : public TiresiasList { protected: using TiresiasList::TiresiasList; friend class Ast; }; } #include #include #include