Skip to content

Commit e9015a2

Browse files
committed
change InfoType to InfoKind
1 parent 8fe719a commit e9015a2

30 files changed

+158
-158
lines changed

include/mrdox/Corpus.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,19 +161,19 @@ get(
161161
assert(I != nullptr);
162162
auto const t = static_cast<T const*>(I);
163163
if constexpr(std::is_same_v<T, NamespaceInfo>)
164-
assert(t->IT == InfoType::IT_namespace);
164+
assert(t->Kind == InfoKind::Namespace);
165165
else if constexpr(std::is_same_v<T, RecordInfo>)
166-
assert(t->IT == InfoType::IT_record);
166+
assert(t->Kind == InfoKind::Record);
167167
else if constexpr(std::is_same_v<T, FunctionInfo>)
168-
assert(t->IT == InfoType::IT_function);
168+
assert(t->Kind == InfoKind::Function);
169169
else if constexpr(std::is_same_v<T, TypedefInfo>)
170-
assert(t->IT == InfoType::IT_typedef);
170+
assert(t->Kind == InfoKind::Typedef);
171171
else if constexpr(std::is_same_v<T, EnumInfo>)
172-
assert(t->IT == InfoType::IT_enum);
172+
assert(t->Kind == InfoKind::Enum);
173173
else if constexpr(std::is_same_v<T, VarInfo>)
174-
assert(t->IT == InfoType::IT_variable);
174+
assert(t->Kind == InfoKind::Variable);
175175
else if constexpr(std::is_same_v<T, FieldInfo>)
176-
assert(t->IT == InfoType::IT_field);
176+
assert(t->Kind == InfoKind::Field);
177177
return *t;
178178
}
179179

include/mrdox/Metadata/Enum.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ struct EnumInfo
8282

8383
//--------------------------------------------
8484

85-
static constexpr InfoType type_id = InfoType::IT_enum;
85+
static constexpr InfoKind kind_id = InfoKind::Enum;
8686

8787
explicit
8888
EnumInfo(
8989
SymbolID ID = SymbolID::zero)
90-
: SymbolInfo(InfoType::IT_enum, ID)
90+
: SymbolInfo(InfoKind::Enum, ID)
9191
{
9292
}
9393
};

include/mrdox/Metadata/Field.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ struct FieldInfo
5656

5757
//--------------------------------------------
5858

59-
static constexpr InfoType type_id = InfoType::IT_field;
59+
static constexpr InfoKind kind_id = InfoKind::Field;
6060

6161
FieldInfo(
6262
SymbolID ID = SymbolID::zero)
63-
: SymbolInfo(InfoType::IT_field, ID)
63+
: SymbolInfo(InfoKind::Field, ID)
6464
{
6565
}
6666
};

include/mrdox/Metadata/Function.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,20 +190,20 @@ struct FunctionInfo
190190

191191
//--------------------------------------------
192192

193-
static constexpr InfoType type_id = InfoType::IT_function;
193+
static constexpr InfoKind kind_id = InfoKind::Function;
194194

195195
explicit
196196
FunctionInfo(
197197
SymbolID ID = SymbolID::zero)
198-
: SymbolInfo(InfoType::IT_function, ID)
198+
: SymbolInfo(InfoKind::Function, ID)
199199
{
200200
}
201201

202202
private:
203203
explicit
204204
FunctionInfo(
205205
std::unique_ptr<TemplateInfo>&& T)
206-
: SymbolInfo(InfoType::IT_function)
206+
: SymbolInfo(InfoKind::Function)
207207
, Template(std::move(T))
208208
{
209209
}

include/mrdox/Metadata/Info.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct Info
3434

3535
/** Kind of declaration.
3636
*/
37-
InfoType IT = InfoType::IT_default;
37+
InfoKind Kind = InfoKind::Default;
3838

3939
/** The unqualified name.
4040
*/
@@ -56,10 +56,10 @@ struct Info
5656

5757
explicit
5858
Info(
59-
InfoType IT = InfoType::IT_default,
59+
InfoKind kind = InfoKind::Default,
6060
SymbolID ID = SymbolID::zero)
6161
: id(ID)
62-
, IT(IT)
62+
, Kind(kind)
6363
{
6464
}
6565

include/mrdox/Metadata/Namespace.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct NamespaceInfo
2828

2929
//--------------------------------------------
3030

31-
static constexpr InfoType type_id = InfoType::IT_namespace;
31+
static constexpr InfoKind kind_id = InfoKind::Namespace;
3232

3333
NamespaceInfo();
3434

include/mrdox/Metadata/Record.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,20 +160,20 @@ struct RecordInfo
160160

161161
//--------------------------------------------
162162

163-
static constexpr InfoType type_id = InfoType::IT_record;
163+
static constexpr InfoKind kind_id = InfoKind::Record;
164164

165165
explicit
166166
RecordInfo(
167167
SymbolID ID = SymbolID::zero)
168-
: SymbolInfo(InfoType::IT_record, ID)
168+
: SymbolInfo(InfoKind::Record, ID)
169169
{
170170
}
171171

172172
private:
173173
explicit
174174
RecordInfo(
175175
std::unique_ptr<TemplateInfo>&& T)
176-
: SymbolInfo(InfoType::IT_record)
176+
: SymbolInfo(InfoKind::Record)
177177
, Template(std::move(T))
178178
{
179179
}

include/mrdox/Metadata/Reference.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct Reference
3434

3535
/** The type of the referenced symbol.
3636
*/
37-
InfoType RefType = InfoType::IT_default;
37+
InfoKind RefKind = InfoKind::Default;
3838

3939
//--------------------------------------------
4040

@@ -46,10 +46,10 @@ struct Reference
4646
Reference(
4747
SymbolID ID = SymbolID::zero,
4848
std::string_view Name = "",
49-
InfoType IT = InfoType::IT_default)
49+
InfoKind kind = InfoKind::Default)
5050
: id(ID)
5151
, Name(Name)
52-
, RefType(IT)
52+
, RefKind(kind)
5353
{
5454
}
5555

@@ -62,8 +62,8 @@ struct Reference
6262
// VFALCO Is this function only needed
6363
// for the old unit tests?
6464
return
65-
std::tie(id, Name, RefType) ==
66-
std::tie(Other.id, Other.Name, Other.RefType);
65+
std::tie(id, Name, RefKind) ==
66+
std::tie(Other.id, Other.Name, Other.RefKind);
6767
}
6868
#endif
6969
};

include/mrdox/Metadata/Symbol.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ struct SymbolInfo
4545

4646
explicit
4747
SymbolInfo(
48-
InfoType IT,
48+
InfoKind kind,
4949
SymbolID ID = SymbolID::zero)
50-
: Info(IT, ID)
50+
: Info(kind, ID)
5151
{
5252
}
5353
};

include/mrdox/Metadata/Symbols.hpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,17 @@ using OptionalSymbolID = Optional<SymbolID>;
107107

108108
/** Info variant discriminator
109109
*/
110-
enum class InfoType
110+
enum class InfoKind
111111
{
112-
IT_default,
113-
IT_namespace,
114-
IT_record,
115-
IT_function,
116-
IT_enum,
117-
IT_typedef,
118-
IT_variable,
119-
IT_field,
120-
IT_specialization
112+
Default,
113+
Namespace,
114+
Record,
115+
Function,
116+
Enum,
117+
Typedef,
118+
Variable,
119+
Field,
120+
Specialization
121121
};
122122

123123
/** Return the result of comparing s0 to s1.

0 commit comments

Comments
 (0)