Skip to content

Commit 75ac617

Browse files
committed
rename to Scope
1 parent 9a2f44e commit 75ac617

File tree

9 files changed

+28
-34
lines changed

9 files changed

+28
-34
lines changed

source/lib/AsciidocGenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ listTypedefs(
468468
void
469469
listScope(
470470
Config const& cfg,
471-
ScopeChildren const& scope,
471+
Scope const& scope,
472472
llvm::raw_ostream& os)
473473
{
474474
listNamespaces(cfg, scope.Namespaces, os);

source/lib/Representation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "jad/Namespace.hpp"
2424
#include "jad/Record.hpp"
2525
#include "jad/Reference.hpp"
26-
#include "jad/ScopeChildren.hpp"
26+
#include "jad/Scope.hpp"
2727
#include "jad/Symbol.hpp"
2828
#include "jad/TemplateParam.hpp"
2929
#include "jad/Type.hpp"

source/lib/Serialize.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -215,31 +215,31 @@ shouldSerializeInfo(
215215
// refer to them.
216216
//
217217
// See MakeAndInsertIntoParent().
218-
static void InsertChild(ScopeChildren& Scope, const NamespaceInfo& Info) {
219-
Scope.Namespaces.emplace_back(Info.USR, Info.Name, InfoType::IT_namespace,
218+
static void InsertChild(Scope& scope, const NamespaceInfo& Info) {
219+
scope.Namespaces.emplace_back(Info.USR, Info.Name, InfoType::IT_namespace,
220220
Info.Name, getInfoRelativePath(Info.Namespace));
221221
}
222222

223-
static void InsertChild(ScopeChildren& Scope, const RecordInfo& Info) {
224-
Scope.Records.emplace_back(Info.USR, Info.Name, InfoType::IT_record,
223+
static void InsertChild(Scope& scope, const RecordInfo& Info) {
224+
scope.Records.emplace_back(Info.USR, Info.Name, InfoType::IT_record,
225225
Info.Name, getInfoRelativePath(Info.Namespace));
226226
}
227227

228-
static void InsertChild(ScopeChildren& Scope, EnumInfo Info) {
229-
Scope.Enums.push_back(std::move(Info));
228+
static void InsertChild(Scope& scope, EnumInfo Info) {
229+
scope.Enums.push_back(std::move(Info));
230230
}
231231

232232
static
233233
void
234234
InsertChild(
235-
ScopeChildren& Scope,
235+
Scope& scope,
236236
FunctionInfo Info)
237237
{
238-
Scope.functions.insert(std::move(Info));
238+
scope.functions.insert(std::move(Info));
239239
}
240240

241-
static void InsertChild(ScopeChildren& Scope, TypedefInfo Info) {
242-
Scope.Typedefs.push_back(std::move(Info));
241+
static void InsertChild(Scope& scope, TypedefInfo Info) {
242+
scope.Typedefs.push_back(std::move(Info));
243243
}
244244

245245
// Creates a parent of the correct type for the given child and inserts it into

source/lib/jad/AccessScope.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef MRDOX_JAD_ACCESSSCOPE_HPP
1818
#define MRDOX_JAD_ACCESSSCOPE_HPP
1919

20-
#include "jad/ScopeChildren.hpp"
20+
#include "jad/Scope.hpp"
2121
#include <clang/Basic/Specifiers.h>
2222

2323
namespace clang {
@@ -27,11 +27,11 @@ namespace mrdox {
2727
*/
2828
struct AccessScope
2929
{
30-
ScopeChildren& pub;
31-
ScopeChildren& prot;
32-
ScopeChildren& priv;
30+
Scope& pub;
31+
Scope& prot;
32+
Scope& priv;
3333

34-
ScopeChildren&
34+
Scope&
3535
get(clang::AccessSpecifier access)
3636
{
3737
assert(access != clang::AccessSpecifier::AS_none);
@@ -50,7 +50,7 @@ struct AccessScope
5050
}
5151

5252
private:
53-
ScopeChildren v_[3];
53+
Scope v_[3];
5454
};
5555

5656
} // mrdox

source/lib/jad/Namespace.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define MRDOX_JAD_NAMESPACE_HPP
1414

1515
#include "jad/Info.hpp"
16-
#include "jad/ScopeChildren.hpp"
16+
#include "jad/Scope.hpp"
1717

1818
namespace clang {
1919
namespace mrdox {
@@ -23,7 +23,7 @@ namespace mrdox {
2323
struct NamespaceInfo
2424
: public Info
2525
{
26-
ScopeChildren Children;
26+
Scope Children;
2727

2828
NamespaceInfo(
2929
SymbolID USR = SymbolID(),

source/lib/jad/Record.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ RecordInfo(
2323
StringRef Name,
2424
StringRef Path)
2525
: SymbolInfo(InfoType::IT_record, USR, Name, Path)
26-
, scope()
2726
{
2827
}
2928

source/lib/jad/Record.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "jad/AccessScope.hpp"
1616
#include "jad/MemberType.hpp"
1717
#include "jad/Reference.hpp"
18-
#include "jad/ScopeChildren.hpp"
18+
#include "jad/Scope.hpp"
1919
#include "jad/Symbol.hpp"
2020
#include "jad/Template.hpp"
2121
#include "jad/Types.hpp"
@@ -64,8 +64,8 @@ struct RecordInfo : public SymbolInfo
6464

6565
std::vector<BaseRecordInfo> Bases; // List of base/parent records; this includes inherited methods and attributes
6666

67-
ScopeChildren Children;
68-
AccessScope scope;
67+
Scope Children;
68+
//AccessScope scope;
6969
};
7070

7171
//------------------------------------------------

source/lib/jad/ScopeChildren.hpp renamed to source/lib/jad/Scope.hpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@
99
// Official repository: https://github.com/cppalliance/mrdox
1010
//
1111

12-
//
13-
// This file defines the internal representations of different declaration
14-
// types for the clang-doc tool.
15-
//
16-
17-
#ifndef MRDOX_JAD_SCOPECHILDREN_HPP
18-
#define MRDOX_JAD_SCOPECHILDREN_HPP
12+
#ifndef MRDOX_JAD_SCOPE_HPP
13+
#define MRDOX_JAD_SCOPE_HPP
1914

2015
#include "jad/Enum.hpp"
2116
#include "jad/Function.hpp"
@@ -31,7 +26,7 @@ struct TypedefInfo;
3126

3227
/** A container for the declaration in a namespace.
3328
*/
34-
struct ScopeChildren
29+
struct Scope
3530
{
3631
// VFALCO REMOVE
3732
clang::AccessSpecifier access;
@@ -49,7 +44,7 @@ struct ScopeChildren
4944
std::vector<EnumInfo> Enums;
5045
std::vector<TypedefInfo> Typedefs;
5146

52-
ScopeChildren(
47+
Scope(
5348
clang::AccessSpecifier access_ =
5449
clang::AccessSpecifier::AS_public) noexcept
5550
: access(access_)

source/lib/jad/TemplateParams.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "jad/Location.hpp"
2424
#include "jad/Namespace.hpp"
2525
#include "jad/Reference.hpp"
26-
#include "jad/ScopeChildren.hpp"
26+
#include "jad/Scope.hpp"
2727
#include "jad/Symbol.hpp"
2828
#include "jad/Types.hpp"
2929
#include <clang/AST/Type.h>

0 commit comments

Comments
 (0)