Project Docs Github
Log in
ittf site docs concepts t wizzimodeldoms modelmodule.html.ittf Edit
  • /ittf/site/docs/concepts/t/wizzimodeldoms/modelmodule.html.ittf
  • /ittf/site/docs/concepts/t/section.html.ittf
  • /ittf/site/docs/t/high-code.html.ittf

/ittf/site/docs/concepts/t/wizzimodeldoms/modelmodule.html.ittf (primary)

edit
                                            
1 $group
2 $
3 var sect = {
4 title: 'The Wizzi Model DOM javascript module'
5 };
6 section( §)
7 p A Wizzi Model DOM module is a single file that contains a javascript class for each
8 \b element defined in its
9 high-code( wfschema )
10 + and some standard base classes.
11 h4 Wizzi Model classes
12 table
13 tr
14 td wzSourceLineInfo
15 td source map item with source file path, row, col of a node
16 tr
17 td {schema-name}Exception
18 td exception object for this Wizzi Model
19 tr
20 td {schema-name}Context
21 td context object for the methods wzInitialize and wzVerify
22 tr
23 td {schema-name}Base
24 td base class for all element classes
25 tr
26 td {element-name}
27 td one class for each element of the `wfschema`
28 p  
29 ittf-panel
30 title The wzSourceLineInfo API
31 ittf
32 class wzSourceLineInfo
33 ctor
34 integer row
35 # 1-based row position of the source ittf node
36 integer col
37 # 1-based column position position of the source ittf node
38 string sourceKey
39 # Key to the source ITTF Document infos stored in the 'loadHistory' object
40 # The 'loadHistory' is a property of the root element
41 m toString
42 { elementInstance?
43 ittf-panel
44 title The {schema-name}Exception API
45 ittf
46 class {schema-name}Exception
47 ctor
48 string message
49 { ittfNode
50 { elementInstance
51 ittf-panel
52 title The {schema-name}Context API
53 ittf
54 class {schema-name}Context
55 boolean schemaIsValid
56 m addError
57 string message
58 { mTreeNode
59 m verifyEnum
60 string valueType
61 string valueName
62 string value
63 [ allowed
64 string allowedValue
65 { mTreeNode
66 ittf-panel
67 title The {schema-name}Base API
68 ittf
69 class {schema-name}Base
70 string wzName
71 string wzTag
72 [ wzChildren
73 ctor
74 string name
75 # the node-value of the source mTreeNode
76 # that becomes the 'wzName' of the newly created element
77 { sourceLineInfo
78 api-ref wizzimodel.wzSourceLineInfo
79 m wzRoot
80 # Return the model root element instance
81 m wzSourceFilepath
82 # Returns the filepath of an ittf source document given its 'sourceKey'
83 string sourceKey
84 m wzAddChild
85 # Add a child node to the wzChildren collection
86 { elementInstance
87 m wzLoadToChildColl
88 # Creates a new element instance given the type of its source mTreeNode
89 # Append it to the collection passed as parameter.
90 # Call the loadFromNode method of the newly created element
91 # with the source mTreeNode as argument.
92 { mTreeNode
93 # the mTreeNode that we are loading
94 { type
95 # the javascript class of the Wizzi Model element
96 # that is the type for mTreeNode given its node-name
97 { coll
98 # the collection to which the newly created element should be appended
99 m wzLoadToChildren
100 # Creates a new element instance given the type of its source mTreeNode
101 # Append it to the wzChildren collection.
102 # Call the loadFromNode method of the newly created element
103 # with the source mTreeNode as argument.
104 { mTreeNode
105 { type
106 m wzLoadOneToOne
107 # Creates a new element instance given the type of its source mTreeNode
108 # Assign it to the `fieldName` property.
109 # Call the loadFromNode method of the newly created element
110 # with the source mTreeNode as argument.
111 { mTreeNode
112 { type
113 string fieldName
114 m error
115 # throw a {schema-name}Exception
116 string message
117 { mTreeNode
118 ittf-panel
119 title The `element-name` API
120 ittf
121 class `element-name`
122 m loadChild
123 # Tests if the mTreeNode name is a valid child element or attribute.
124 # If yes call the proper add method and return true.
125 # If no return false.
126 { mTreeNode
127 m loadFromNode
128 # Calls the loadChild method on this element
129 # for each child node of the mTreeNode to load.
130 { mTreeNode
131 m wzInitialize
132 # Initialize the element
133 # Called after the source mTree has been succesfully loaded.
134 param ctx
135 api-ref {schema-name}Context
136 m wzVerify
137 # Verify if the element is valid
138 # Called after the wzInitialize method.
139 { ctx
140 api-ref {schema-name}Context

/ittf/site/docs/concepts/t/section.html.ittf

edit
                                            
1 $group
2 $params §
3 article
4 . doc-title
5 id ${sect.id}
6 + ${sect.title}
7 . doc-summary
8 $hook

/ittf/site/docs/t/high-code.html.ittf

edit
                                            
1 $group
2 $params text, kind|@@null
3 $if kind != 'nospace'
4 span ${} ${}
5 code
6 class highlight-code
7 + ${text}
8 $if kind != 'nospace'
9 span ${} ${}
Save
Save & Refresh
Cancel