diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-04-23 11:33:49 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-04-23 16:31:33 +0900 |
commit | 44b6044d4b5c84a3ec633a7bc50fde23d23ab7cb (patch) | |
tree | 761f8fd880cc788b4ae193695bcdb046aa18be0a /sphinx/domains/cpp.py | |
parent | 96fa6d2972ea7c77525607ec490daed9e303535d (diff) | |
download | sphinx-git-44b6044d4b5c84a3ec633a7bc50fde23d23ab7cb.tar.gz |
Implement get_full_qualified_name() to CPPDomain (refs: #3630)
Diffstat (limited to 'sphinx/domains/cpp.py')
-rw-r--r-- | sphinx/domains/cpp.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index 2fceeded3..b1e83a041 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -5032,6 +5032,20 @@ class CPPDomain(Domain): newestId = symbol.declaration.get_newest_id() yield (name, name, objectType, docname, newestId, 1) + def get_full_qualified_name(self, node): + # type: (nodes.Node) -> unicode + target = node.get('reftarget', None) + if target is None: + return None + parentKey = node.get("cpp:parent_key", None) + if parentKey is None: + return None + + rootSymbol = self.data['root_symbol'] + parentSymbol = rootSymbol.direct_lookup(parentKey) + parentName = parentSymbol.get_full_nested_name() + return '::'.join([text_type(parentName), target]) + def setup(app): # type: (Sphinx) -> Dict[unicode, Any] |