switched enum syntax in core to enum class
This commit is contained in:
@@ -28,14 +28,14 @@ namespace sourcetrail
|
||||
* record an implicit definition kind for those symbols.
|
||||
* If you do not record any definition kind for a symbol, Sourcetrail will show it as "non-indexed".
|
||||
*/
|
||||
enum DefinitionKind
|
||||
enum class DefinitionKind : int
|
||||
{
|
||||
DEFINITION_IMPLICIT = 1,
|
||||
DEFINITION_EXPLICIT = 2
|
||||
IMPLICIT = 1,
|
||||
EXPLICIT = 2
|
||||
};
|
||||
|
||||
int definitionKindToInt(DefinitionKind v);
|
||||
DefinitionKind intToDefinitionKind(int v);
|
||||
int definitionKindToInt(DefinitionKind kind);
|
||||
DefinitionKind intToDefinitionKind(int i);
|
||||
}
|
||||
|
||||
#endif // SOURCETRAIL_DEFINITION_KIND_H
|
||||
|
||||
+19
-19
@@ -28,28 +28,28 @@ namespace sourcetrail
|
||||
* for edges that will be created implicitly. For example edges of type "EDGE_MEMBER" will be created while storing parent
|
||||
* child node relations when recording symbols with hierarchical names (see NameHierarchy).
|
||||
*/
|
||||
enum EdgeKind
|
||||
enum class EdgeKind : int
|
||||
{
|
||||
EDGE_UNKNOWN = 0,
|
||||
EDGE_MEMBER = 1 << 0,
|
||||
EDGE_TYPE_USAGE = 1 << 1,
|
||||
EDGE_USAGE = 1 << 2,
|
||||
EDGE_CALL = 1 << 3,
|
||||
EDGE_INHERITANCE = 1 << 4,
|
||||
EDGE_OVERRIDE = 1 << 5,
|
||||
EDGE_TEMPLATE_ARGUMENT = 1 << 6,
|
||||
EDGE_TYPE_ARGUMENT = 1 << 7,
|
||||
EDGE_TEMPLATE_DEFAULT_ARGUMENT = 1 << 8,
|
||||
EDGE_TEMPLATE_SPECIALIZATION = 1 << 9,
|
||||
EDGE_TEMPLATE_MEMBER_SPECIALIZATION = 1 << 10,
|
||||
EDGE_INCLUDE = 1 << 11,
|
||||
EDGE_IMPORT = 1 << 12,
|
||||
EDGE_AGGREGATION = 1 << 13,
|
||||
EDGE_MACRO_USAGE = 1 << 14,
|
||||
EDGE_ANNOTATION_USAGE = 1 << 15
|
||||
UNKNOWN = 0,
|
||||
MEMBER = 1 << 0,
|
||||
TYPE_USAGE = 1 << 1,
|
||||
USAGE = 1 << 2,
|
||||
CALL = 1 << 3,
|
||||
INHERITANCE = 1 << 4,
|
||||
OVERRIDE = 1 << 5,
|
||||
TEMPLATE_ARGUMENT = 1 << 6,
|
||||
TYPE_ARGUMENT = 1 << 7,
|
||||
TEMPLATE_DEFAULT_ARGUMENT = 1 << 8,
|
||||
TEMPLATE_SPECIALIZATION = 1 << 9,
|
||||
TEMPLATE_MEMBER_SPECIALIZATION = 1 << 10,
|
||||
INCLUDE = 1 << 11,
|
||||
IMPORT = 1 << 12,
|
||||
AGGREGATION = 1 << 13,
|
||||
MACRO_USAGE = 1 << 14,
|
||||
ANNOTATION_USAGE = 1 << 15
|
||||
};
|
||||
|
||||
int edgeKindToInt(EdgeKind edgeKind);
|
||||
int edgeKindToInt(EdgeKind kind);
|
||||
EdgeKind intToEdgeKind(int i);
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -22,21 +22,21 @@ namespace sourcetrail
|
||||
/**
|
||||
* Enum providing all possible values for kinds of locations that can be stored to the Sourcetrail database.
|
||||
*/
|
||||
enum LocationKind
|
||||
enum class LocationKind : int
|
||||
{
|
||||
LOCATION_TOKEN = 0,
|
||||
LOCATION_SCOPE = 1,
|
||||
LOCATION_QUALIFIER = 2,
|
||||
LOCATION_LOCAL_SYMBOL = 3,
|
||||
LOCATION_SIGNATURE = 4,
|
||||
LOCATION_COMMENT = 5,
|
||||
LOCATION_ERROR = 6,
|
||||
LOCATION_FULLTEXT_SEARCH = 7,
|
||||
LOCATION_SCREEN_SEARCH = 8
|
||||
TOKEN = 0,
|
||||
SCOPE = 1,
|
||||
QUALIFIER = 2,
|
||||
LOCAL_SYMBOL = 3,
|
||||
SIGNATURE = 4,
|
||||
COMMENT = 5,
|
||||
ERROR = 6,
|
||||
FULLTEXT_SEARCH = 7,
|
||||
SCREEN_SEARCH = 8
|
||||
};
|
||||
|
||||
int locationKindToInt(LocationKind kind);
|
||||
LocationKind intToLocationKind(int i);
|
||||
int locationKindToInt(LocationKind locationKind);
|
||||
}
|
||||
|
||||
#endif // SOURCETRAIL_LOCATION_KIND_H
|
||||
|
||||
+25
-25
@@ -22,34 +22,34 @@ namespace sourcetrail
|
||||
/**
|
||||
* Enum providing all possible values for kinds of nodes that can be stored to the Sourcetrail database.
|
||||
*/
|
||||
enum NodeKind
|
||||
enum class NodeKind : int
|
||||
{
|
||||
NODE_UNKNOWN = 1 << 0,
|
||||
NODE_TYPE = 1 << 1,
|
||||
NODE_BUILTIN_TYPE = 1 << 2,
|
||||
NODE_MODULE = 1 << 3,
|
||||
NODE_NAMESPACE = 1 << 4,
|
||||
NODE_PACKAGE = 1 << 5,
|
||||
NODE_STRUCT = 1 << 6,
|
||||
NODE_CLASS = 1 << 7,
|
||||
NODE_INTERFACE = 1 << 8,
|
||||
NODE_ANNOTATION = 1 << 9,
|
||||
NODE_GLOBAL_VARIABLE = 1 << 10,
|
||||
NODE_FIELD = 1 << 11,
|
||||
NODE_FUNCTION = 1 << 12,
|
||||
NODE_METHOD = 1 << 13,
|
||||
NODE_ENUM = 1 << 14,
|
||||
NODE_ENUM_CONSTANT = 1 << 15,
|
||||
NODE_TYPEDEF = 1 << 16,
|
||||
NODE_TEMPLATE_PARAMETER = 1 << 17,
|
||||
NODE_TYPE_PARAMETER = 1 << 18,
|
||||
NODE_FILE = 1 << 19,
|
||||
NODE_MACRO = 1 << 20,
|
||||
NODE_UNION = 1 << 21
|
||||
UNKNOWN = 1 << 0,
|
||||
TYPE = 1 << 1,
|
||||
BUILTIN_TYPE = 1 << 2,
|
||||
MODULE = 1 << 3,
|
||||
NAMESPACE = 1 << 4,
|
||||
PACKAGE = 1 << 5,
|
||||
STRUCT = 1 << 6,
|
||||
CLASS = 1 << 7,
|
||||
INTERFACE = 1 << 8,
|
||||
ANNOTATION = 1 << 9,
|
||||
GLOBAL_VARIABLE = 1 << 10,
|
||||
FIELD = 1 << 11,
|
||||
FUNCTION = 1 << 12,
|
||||
METHOD = 1 << 13,
|
||||
ENUM = 1 << 14,
|
||||
ENUM_CONSTANT = 1 << 15,
|
||||
TYPEDEF = 1 << 16,
|
||||
TEMPLATE_PARAMETER = 1 << 17,
|
||||
TYPE_PARAMETER = 1 << 18,
|
||||
FILE = 1 << 19,
|
||||
MACRO = 1 << 20,
|
||||
UNION = 1 << 21
|
||||
};
|
||||
|
||||
int nodeKindToInt(NodeKind v);
|
||||
NodeKind intToNodeKind(int v);
|
||||
int nodeKindToInt(NodeKind kind);
|
||||
NodeKind intToNodeKind(int i);
|
||||
}
|
||||
|
||||
#endif // SOURCETRAIL_NODE_KIND_H
|
||||
|
||||
@@ -24,25 +24,25 @@ namespace sourcetrail
|
||||
/**
|
||||
* Enum providing all possible values for kinds of references that can be recorded using the SourcetrailDBWriter interface.
|
||||
*/
|
||||
enum ReferenceKind
|
||||
enum class ReferenceKind
|
||||
{
|
||||
REFERENCE_TYPE_USAGE,
|
||||
REFERENCE_USAGE,
|
||||
REFERENCE_CALL,
|
||||
REFERENCE_INHERITANCE,
|
||||
REFERENCE_OVERRIDE,
|
||||
REFERENCE_TEMPLATE_ARGUMENT,
|
||||
REFERENCE_TYPE_ARGUMENT,
|
||||
REFERENCE_TEMPLATE_DEFAULT_ARGUMENT,
|
||||
REFERENCE_TEMPLATE_SPECIALIZATION,
|
||||
REFERENCE_TEMPLATE_MEMBER_SPECIALIZATION,
|
||||
REFERENCE_INCLUDE,
|
||||
REFERENCE_IMPORT,
|
||||
REFERENCE_MACRO_USAGE,
|
||||
REFERENCE_ANNOTATION_USAGE
|
||||
TYPE_USAGE,
|
||||
USAGE,
|
||||
CALL,
|
||||
INHERITANCE,
|
||||
OVERRIDE,
|
||||
TEMPLATE_ARGUMENT,
|
||||
TYPE_ARGUMENT,
|
||||
TEMPLATE_DEFAULT_ARGUMENT,
|
||||
TEMPLATE_SPECIALIZATION,
|
||||
TEMPLATE_MEMBER_SPECIALIZATION,
|
||||
INCLUDE,
|
||||
IMPORT,
|
||||
MACRO_USAGE,
|
||||
ANNOTATION_USAGE
|
||||
};
|
||||
|
||||
EdgeKind referenceKindToEdgeKind(ReferenceKind referenceKind);
|
||||
EdgeKind referenceKindToEdgeKind(ReferenceKind kind);
|
||||
}
|
||||
|
||||
#endif // SOURCETRAIL_REFERENCE_KIND_H
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace sourcetrail
|
||||
{
|
||||
StorageSymbol()
|
||||
: id(0)
|
||||
, definitionKind(definitionKindToInt(DEFINITION_EXPLICIT))
|
||||
, definitionKind(definitionKindToInt(DefinitionKind::EXPLICIT))
|
||||
{}
|
||||
|
||||
StorageSymbol(int id, int definitionKind)
|
||||
|
||||
+22
-22
@@ -24,31 +24,31 @@ namespace sourcetrail
|
||||
/**
|
||||
* Enum providing all possible values for kinds of symbols that can be recorded using the SourcetrailDBWriter interface.
|
||||
*/
|
||||
enum SymbolKind
|
||||
enum class SymbolKind
|
||||
{
|
||||
SYMBOL_TYPE,
|
||||
SYMBOL_BUILTIN_TYPE,
|
||||
SYMBOL_MODULE,
|
||||
SYMBOL_NAMESPACE,
|
||||
SYMBOL_PACKAGE,
|
||||
SYMBOL_STRUCT,
|
||||
SYMBOL_CLASS,
|
||||
SYMBOL_INTERFACE,
|
||||
SYMBOL_ANNOTATION,
|
||||
SYMBOL_GLOBAL_VARIABLE,
|
||||
SYMBOL_FIELD,
|
||||
SYMBOL_FUNCTION,
|
||||
SYMBOL_METHOD,
|
||||
SYMBOL_ENUM,
|
||||
SYMBOL_ENUM_CONSTANT,
|
||||
SYMBOL_TYPEDEF,
|
||||
SYMBOL_TEMPLATE_PARAMETER,
|
||||
SYMBOL_TYPE_PARAMETER,
|
||||
SYMBOL_MACRO,
|
||||
SYMBOL_UNION
|
||||
TYPE,
|
||||
BUILTIN_TYPE,
|
||||
MODULE,
|
||||
NAMESPACE,
|
||||
PACKAGE,
|
||||
STRUCT,
|
||||
CLASS,
|
||||
INTERFACE,
|
||||
ANNOTATION,
|
||||
GLOBAL_VARIABLE,
|
||||
FIELD,
|
||||
FUNCTION,
|
||||
METHOD,
|
||||
ENUM,
|
||||
ENUM_CONSTANT,
|
||||
TYPEDEF,
|
||||
TEMPLATE_PARAMETER,
|
||||
TYPE_PARAMETER,
|
||||
MACRO,
|
||||
UNION
|
||||
};
|
||||
|
||||
NodeKind symbolKindToNodeKind(SymbolKind v);
|
||||
NodeKind symbolKindToNodeKind(SymbolKind kind);
|
||||
}
|
||||
|
||||
#endif // SOURCETRAIL_SYMBOL_KIND_H
|
||||
|
||||
Reference in New Issue
Block a user