summaryrefslogtreecommitdiffstats
path: root/o3d/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/plugin')
-rw-r--r--o3d/plugin/o3d_binding.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/o3d/plugin/o3d_binding.py b/o3d/plugin/o3d_binding.py
index 7d7490c..c0ae572 100644
--- a/o3d/plugin/o3d_binding.py
+++ b/o3d/plugin/o3d_binding.py
@@ -28,7 +28,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
"""o3d binding model module.
This module implements the glue functions for the o3d binding model, binding
@@ -300,6 +299,21 @@ def CppGetStatic(scope, type_defn, field):
cpp_utils.GetGetterName(field))
+def JSDocTypeString(type_defn):
+ """Gets the representation of a type in JSDoc notation.
+
+ Args:
+ type_defn: a Definition for the type.
+
+ Returns:
+ a string that is the JSDoc notation of type_defn.
+ """
+ type_defn = type_defn.GetFinalType()
+ type_stack = type_defn.GetParentScopeStack()
+ name = type_defn.name
+ return '!' + '.'.join([s.name for s in type_stack[1:]] + [name])
+
+
_binding_glue_header_template = string.Template('')