wrap
gtwrap
interface_parser
utils.py
Go to the documentation of this file.
1
"""
2
GTSAM Copyright 2010-2020, Georgia Tech Research Corporation,
3
Atlanta, Georgia 30332-0415
4
All Rights Reserved
5
6
See LICENSE for the license information
7
8
Various common utilities.
9
10
Author: Varun Agrawal
11
"""
12
13
14
def
collect_namespaces
(obj):
15
"""
16
Get the chain of namespaces from the lowest to highest for the given object.
17
18
Args:
19
obj: Object of type Namespace, Class, InstantiatedClass, or Enum.
20
"""
21
namespaces = []
22
ancestor = obj.parent
23
while
ancestor
and
ancestor.name:
24
namespaces = [ancestor.name] + namespaces
25
ancestor = ancestor.parent
26
return
[
''
] + namespaces
gtwrap.interface_parser.utils.collect_namespaces
def collect_namespaces(obj)
Definition:
utils.py:14
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:18:23