-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle namespace aliases on a basic level
- Loading branch information
Showing
4 changed files
with
99 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#ifndef CC_MODEL_CPPNAMESPACEALIAS_H | ||
#define CC_MODEL_CPPNAMESPACEALIAS_H | ||
|
||
#include "cppentity.h" | ||
|
||
namespace cc | ||
{ | ||
namespace model | ||
{ | ||
|
||
#pragma db object | ||
struct CppNamespaceAlias : CppEntity | ||
{ | ||
#pragma db unique | ||
CppAstNodeId aliasedNamespaceNodeId; | ||
|
||
CppAstNodePtr aliasedNamespace; | ||
|
||
std::string toString() const | ||
{ | ||
std::string ret("CppNamespaceAlias"); | ||
|
||
ret | ||
.append("\nid = ").append(std::to_string(id)) | ||
.append("\nentityHash = ").append(std::to_string(entityHash)) | ||
.append("\nqualifiedName = ").append(qualifiedName); | ||
|
||
if (!tags.empty()) | ||
{ | ||
ret.append("\ntags ="); | ||
for (const Tag& tag : tags) | ||
ret.append(' ' + tagToString(tag)); | ||
} | ||
|
||
return ret; | ||
} | ||
}; | ||
|
||
typedef std::shared_ptr<CppNamespaceAlias> CppNamespaceAliasPtr; | ||
|
||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters