Module Synopsis.Parsers.IDL.idlutil

Protected Attributes Summary:
source code
source code
Functions Summary:
  slashName(scopedName, our_scope = [])
references
source code
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 = [])
references
source code
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 = [])
references
source code
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)
references
source code
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.
references
source code
escapifyString(string) -> string Return the given string with any non-printing characters escaped.
  escapifyWString(l, escchar = "u")
references
source code
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)
references
source code
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)
references
source code
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 = [])
references
source code
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 = [])
references
source code
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 = [])
references
source code
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)
references
source code
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']
references
source code
escapifyString(string) -> string Return the given string with any non-printing characters escaped.
  escapifyWString(l, escchar = "u")
references
source code
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)
references
source code
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)
references
source code
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.