See More

// Copyright (C) 2017-2019 Jonathan Müller // This file is subject to the license terms in the LICENSE file // found in the top-level directory of this distribution. #ifndef CPPAST_CPP_CLASS_TEMPLATE_HPP_INCLUDED #define CPPAST_CPP_CLASS_TEMPLATE_HPP_INCLUDED #include #include namespace cppast { /// A [cppast::cpp_entity]() modelling a class template. class cpp_class_template final : public cpp_template { public: static cpp_entity_kind kind() noexcept; /// Builder for [cppast::cpp_class_template](). class builder : public basic_builder { public: using basic_builder::basic_builder; }; /// A reference to the class that is being templated. const cpp_class& class_() const noexcept { return static_cast(*begin()); } private: cpp_class_template(std::unique_ptr func) : cpp_template(std::unique_ptr(func.release())) {} cpp_entity_kind do_get_entity_kind() const noexcept override; friend basic_builder; }; /// A [cppast::cpp_entity]() modelling a class template specialization. class cpp_class_template_specialization final : public cpp_template_specialization { public: static cpp_entity_kind kind() noexcept; /// Builder for [cppast::cpp_class_template_specialization](). class builder : public specialization_builder { public: using specialization_builder::specialization_builder; }; /// A reference to the class that is being specialized. const cpp_class& class_() const noexcept { return static_cast(*begin()); } private: cpp_class_template_specialization(std::unique_ptr func, cpp_template_ref primary) : cpp_template_specialization(std::unique_ptr(func.release()), primary) {} cpp_entity_kind do_get_entity_kind() const noexcept override; friend specialization_builder; }; } // namespace cppast #endif // CPPAST_CPP_CLASS_TEMPLATE_HPP_INCLUDED