Synopsis - Synopsis.Parsers.IDL.idlutil

# Module Synopsis.Parsers.IDL.idlutil

Protected Attributes Summary:
_valid_chars
_valid_unichars
Functions Summary:
slashName(scopedName, our_scope = [])
slashName(list, [list]) -> string Return a scoped name given as a list of strings as a single string with the components separated by '/' characters.
dotName(scopedName, our_scope = [])
dotName(list, [list]) -> string Return a scoped name given as a list of strings as a single string with the components separated by '.' characters.
ccolonName(scopedName, our_scope = [])
ccolonName(list, [list]) -> string Return a scoped name given as a list of strings as a single string with the components separated by '::' strings.
pruneScope(target_scope, our_scope)
pruneScope(list A, list B) -> list Given two lists of strings (scoped names), return a copy of list A with any prefix it shares with B removed.
escapifyString(s)
escapifyString(string) -> string Return the given string with any non-printing characters escaped.
escapifyWString(l, escchar = "u")
escapifyWString(int list) -> string Take a list of integers representing Unicode characters and return an ASCII string with all characters outside that range replaced with \u escapes.
reprFloat(f)
reprFloat(float) -> string Return the string representation of an IDL float type (float, double, long double), with enough precision to completely reconstruct the bit pattern.
relativeScope(fromScope, destScope)
relativeScope(fromScope, destScope) -> list Given two globally-scoped names, return a minimal scoped name list which identifies the destination scope, without clashing with another identifier.
Functions Details:
slashName(scopedName, our_scope = [])
slashName(list, [list]) -> string Return a scoped name given as a list of strings as a single string with the components separated by '/' characters. If a second list is given, remove a common prefix using pruneScope().
dotName(scopedName, our_scope = [])
dotName(list, [list]) -> string Return a scoped name given as a list of strings as a single string with the components separated by '.' characters. If a second list is given, remove a common prefix using pruneScope().
ccolonName(scopedName, our_scope = [])
ccolonName(list, [list]) -> string Return a scoped name given as a list of strings as a single string with the components separated by '::' strings. If a second list is given, remove a common prefix using pruneScope().
pruneScope(target_scope, our_scope)
pruneScope(list A, list B) -> list Given two lists of strings (scoped names), return a copy of list A with any prefix it shares with B removed. e.g. pruneScope(['A', 'B', 'C', 'D'], ['A', 'B', 'D']) -> ['C', 'D']
escapifyString(s)
escapifyString(string) -> string Return the given string with any non-printing characters escaped.
escapifyWString(l, escchar = "u")
escapifyWString(int list) -> string Take a list of integers representing Unicode characters and return an ASCII string with all characters outside that range replaced with \u escapes.
reprFloat(f)
reprFloat(float) -> string Return the string representation of an IDL float type (float, double, long double), with enough precision to completely reconstruct the bit pattern.
relativeScope(fromScope, destScope)
relativeScope(fromScope, destScope) -> list Given two globally-scoped names, return a minimal scoped name list which identifies the destination scope, without clashing with another identifier. For example, given IDL: module M { typedef short A; typedef long B; module N { typedef string B; interface I { void op(in ::M::A x, in ::M::B y); }; }; }; relativeScope(["M", "N", "I"], ["M", "A"]) -> ["A"] relativeScope(["M", "N", "I"], ["M", "B"]) -> ["M", "B"] If the only valid result is a globally-scoped name, the result list is prefixed with None: module O { typedef short C; }; module P { module O { interface J { void op(in ::O::C z); }; }; }; relativeScope(["P", "O", "J"], ["O", "C"]) -> [None, "O", "C"] If either scoped name does not exist, returns None.
Generated on Thu Apr 16 16:26:58 2009 by
synopsis (version devel)