summaryrefslogtreecommitdiff
path: root/docs/domain.rst
diff options
context:
space:
mode:
authorJuergen Ryannel <juergen.bocklage-ryannel@pelagicore.com>2016-12-09 10:22:45 +0100
committerJuergen Ryannel <juergen.bocklage-ryannel@pelagicore.com>2016-12-09 10:22:45 +0100
commita521a2f66bd0a26be3a45c33fe72968fafec8dfa (patch)
treeb9860beea1c575de5d74a1a69d810d9f0790b674 /docs/domain.rst
parent68373b55131bc4117d5b977d73d854003d1f0e59 (diff)
downloadqtivi-qface-a521a2f66bd0a26be3a45c33fe72968fafec8dfa.tar.gz
converted documentation to use sphinx
Diffstat (limited to 'docs/domain.rst')
-rw-r--r--docs/domain.rst59
1 files changed, 59 insertions, 0 deletions
diff --git a/docs/domain.rst b/docs/domain.rst
new file mode 100644
index 0000000..a3b5311
--- /dev/null
+++ b/docs/domain.rst
@@ -0,0 +1,59 @@
+Domain Model
+============
+
+The domain model resembles the structure of our system as objects. It is build by the parser and is the input into the generator.
+
+It is important to understand the domain model as it is the main input for the template generation.
+
+The IDL is converted into an in memory domain model (see qface/idl/domain.py)
+
+.. code-block:: yaml
+
+ - System
+ - Module
+ - Import
+ - Service
+ - Property
+ - Operation
+ - Event
+ - Enum
+ - Flag
+ - Struct
+
+
+The domain model is the base for the code generation. You traverse the domain tree and trigger your own code generation.
+
+.. code-block:: python
+ from qface.generator import FileSystem
+
+ system = FileSystem.parse_dir('interfaces')
+
+ for module in sytem.modules:
+ print(module.name)
+
+ for interfaces in module.interfaces:
+ print(interfaces.name)
+
+ for struct in module.structs:
+ print(struct.name)
+
+
+Debug
+-----
+
+At any time you can place a debug breakpoint:
+
+.. code-block:: python
+
+ import ipdb; ipd.set_trace()
+
+
+See https://pypi.python.org/pypi/ipdb
+
+
+To see the object members just use:
+
+.. code-block:: python
+
+ dir(module) # list all members of module
+ help(module) # prints the documentation