Functions Summary:
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(list, [list]) -> string
Return a scoped name given as a list of strings as a single string
with the components separated by '::' strings.
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(string) -> string
Return the given string with any non-printing characters escaped.
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(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) -> 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(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(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(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(string) -> string
Return the given string with any non-printing characters escaped.
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(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) -> 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.