Rename cpp_entity_type -> cpp_entity_kind

This commit is contained in:
Jonathan Müller 2017-01-22 12:29:24 +01:00
commit 87aba96c5b
13 changed files with 79 additions and 79 deletions

View file

@ -11,7 +11,7 @@
namespace cppast
{
enum class cpp_entity_type;
enum class cpp_entity_kind;
/// The base class for all entities in the C++ AST.
class cpp_entity : detail::intrusive_list_node<cpp_entity>
@ -22,10 +22,10 @@ namespace cppast
virtual ~cpp_entity() noexcept = default;
/// \returns The type of the entity.
cpp_entity_type type() const noexcept
/// \returns The kind of the entity.
cpp_entity_kind kind() const noexcept
{
return do_get_entity_type();
return do_get_entity_kind();
}
/// \returns The name of the entity.
@ -55,8 +55,8 @@ namespace cppast
}
private:
/// \returns The type of the entity.
virtual cpp_entity_type do_get_entity_type() const noexcept = 0;
/// \returns The kind of the entity.
virtual cpp_entity_kind do_get_entity_kind() const noexcept = 0;
/// \returns The name of the new scope created by the entity, if any.
/// By default, there is no scope created.

View file

@ -2,15 +2,15 @@
// This file is subject to the license terms in the LICENSE file
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_ENTITY_TYPE_HPP_INCLUDED
#define CPPAST_CPP_ENTITY_TYPE_HPP_INCLUDED
#ifndef CPPAST_CPP_ENTITY_KIND_HPP_INCLUDED
#define CPPAST_CPP_ENTITY_KIND_HPP_INCLUDED
#include <cppast/detail/assert.hpp>
namespace cppast
{
/// All possible types of C++ entities.
enum class cpp_entity_type
/// All possible kinds of C++ entities.
enum class cpp_entity_kind
{
file_t,
@ -25,8 +25,8 @@ namespace cppast
count,
};
/// \returns Whether or not a given entity type is a C++ type.
bool is_type(cpp_entity_type type) noexcept;
/// \returns Whether or not a given entity kind is a C++ type.
bool is_type(cpp_entity_kind type) noexcept;
} // namespace cppast
#endif // CPPAST_CPP_ENTITY_TYPE_HPP_INCLUDED
#endif // CPPAST_CPP_ENTITY_KIND_HPP_INCLUDED

View file

@ -15,7 +15,7 @@ namespace cppast
{
public:
/// \effects Creates it giving it the target id and name.
/// \requires An entity of matching type must eventually register in the [cppast::cpp_entity_index]() using that id.
/// \requires An entity of matching kind must eventually register in the [cppast::cpp_entity_index]() using that id.
basic_cpp_entity_ref(cpp_entity_id target_id, std::string target_name)
: target_(std::move(target_id)), name_(std::move(target_name))
{

View file

@ -46,7 +46,7 @@ namespace cppast
{
}
cpp_entity_type do_get_entity_type() const noexcept override;
cpp_entity_kind do_get_entity_kind() const noexcept override;
std::unique_ptr<cpp_expression> value_;
};
@ -104,7 +104,7 @@ namespace cppast
{
}
cpp_entity_type do_get_entity_type() const noexcept override;
cpp_entity_kind do_get_entity_kind() const noexcept override;
/// \returns If the enum is scoped, the name of the enum,
/// otherwise [ts::nullopt]().

View file

@ -50,7 +50,7 @@ namespace cppast
}
/// \returns [cpp_entity_type::file_t]().
cpp_entity_type do_get_entity_type() const noexcept override;
cpp_entity_kind do_get_entity_kind() const noexcept override;
};
} // namespace cppast

View file

@ -8,7 +8,7 @@
#include <cppast/cpp_entity_container.hpp>
#include <cppast/cpp_entity_index.hpp>
#include <cppast/cpp_entity_ref.hpp>
#include <cppast/cpp_entity_type.hpp>
#include <cppast/cpp_entity_kind.hpp>
namespace cppast
{
@ -59,7 +59,7 @@ namespace cppast
{
}
cpp_entity_type do_get_entity_type() const noexcept override;
cpp_entity_kind do_get_entity_kind() const noexcept override;
/// \returns The name of the namespace.
type_safe::optional<std::string> do_get_scope_name() const override
@ -110,7 +110,7 @@ namespace cppast
{
}
cpp_entity_type do_get_entity_type() const noexcept override;
cpp_entity_kind do_get_entity_kind() const noexcept override;
cpp_namespace_ref target_;
};
@ -142,7 +142,7 @@ namespace cppast
{
}
cpp_entity_type do_get_entity_type() const noexcept override;
cpp_entity_kind do_get_entity_kind() const noexcept override;
cpp_entity_id target_;
};
@ -174,7 +174,7 @@ namespace cppast
{
}
cpp_entity_type do_get_entity_type() const noexcept override;
cpp_entity_kind do_get_entity_kind() const noexcept override;
cpp_entity_id target_;
};