/* * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef IDLC_ELEMENT_H_ #define IDLC_ELEMENT_H_ #include #include #include #include "idlc/type.h" #include "idlc/parameter.h" namespace tidl { class Element { public: Element(std::string id, BaseType* type, std::string comments, unsigned line); const std::string& GetID() const; const BaseType& GetType() const; const unsigned GetLine() const; const std::string& GetComments() const; private: std::string id_; std::unique_ptr type_; std::string comments_; unsigned line_; }; class Elements { public: void Add(Element* elm); const std::list>& GetElms() const; bool Exist(Element* elm) const; private: std::list> elms_; }; } // namespace tidl #endif // IDLC_ELEMENT_H_