1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/docs/wiki/APIs Tue Apr 11 21:41:22 2017 +0200
1.3 @@ -0,0 +1,25 @@
1.4 += APIs =
1.5 +
1.6 +The principal application programming interfaces (APIs) within Lichen are described below.
1.7 +
1.8 +== Modules ==
1.9 +
1.10 +When [[../Inspection|inspecting]] and [[../Translation|translating]] modules, common abstractions are used so that elements of the program are handled in similar ways. Various useful attributes and methods are provided by the `CommonModule` abstraction for use within `InspectedModule` and `TranslatedModule` methods:
1.11 +
1.12 +{{{#!table
1.13 +'''Attribute or Method''' || '''Purpose'''
1.14 +==
1.15 +`name` ||
1.16 +An attribute providing the module name.
1.17 +==
1.18 +`get_global_path(name)` ||
1.19 +A method returning the qualified name of the given global name within the module being processed.
1.20 +==
1.21 +`get_namespace_path()` ||
1.22 +A method returning the qualified name of the namespace being processed.
1.23 + * For modules, this is the module name
1.24 + * For classes, functions and methods, the path incorporates the module name and namespaces leading to the current namespace itself
1.25 +==
1.26 +`get_object_path(name)` ||
1.27 +A method returning the qualified name of the given local name within the namespace being processed.
1.28 +}}}