Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/sample/Element.cls

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 48 by daruma_kyo, Sun Mar 7 02:06:55 2010 UTC revision 49 by daruma_kyo, Sat Mar 13 12:16:38 2010 UTC
# Line 31  Attribute VB_Exposed = True Line 31  Attribute VB_Exposed = True
31    
32  '===============================================================================  '===============================================================================
33  ' Name: Element  ' Name: Element
34  ' Purpose: Represents the element object.  ' Purpose: エレメントオブジェクトを表現します。
35  ' Remarks: Does not implement all properties, methods and events of the  ' Remarks: 対応するMSXMLのIXMLDOMElementクラスのすべてのプロパティ、メソッド、イベントが実装されているわけではありません。
36  '   corresponding MSXML class IXMLDOMElement. Simulates IXMLDOMNode and  '   IXMLDOMNodeとIXMLDOMAttributeノードを模擬します。
 '   IXMLDOMAttribute nodes.  
37  ' Functions:  ' Functions:
38  ' Properties:  ' Properties:
39  ' Methods:  ' Methods:
40  ' Started: 30.02.2001  ' Started: 2001/02/30
41  ' Modified: 30.02.2001  ' Modified: 2001/02/30
42  '===============================================================================  '===============================================================================
43  Option Explicit  Option Explicit
44    
45  '===============================================================================  '===============================================================================
46  ' Name: Sub setNew  ' Name: Sub setNew
47  ' Input:  ' Input:
48  '   ByVal blnIsNew As Boolean - Specifies whether the object is new one.  '   ByVal blnIsNew As Boolean - エレメントが新規かどうかを指定します。
49  ' Output:  ' Output:
50  '   None  '   なし
51  ' Purpose: Sets the object as newly created object.  ' Purpose: 新たに作成されたオブジェクトとしてオブジェクトを設定します。
52  ' Remarks: Used internally for flagging elements not appended to a existing  ' Remarks: 既存のノードに追加されなかったフラグつきのエレメントに対して内部で使用されます。
53  '   node. This flag is used for deciding whether to INSERT or UPDATE.  '   このフラグはINSERTかUPDATEか決定するために使用されます。
54  '===============================================================================  '===============================================================================
55  Friend Sub setNew(ByVal blnIsNew As Boolean)  Friend Sub setNew(ByVal blnIsNew As Boolean)
56  End Sub  End Sub
# Line 59  End Sub Line 58  End Sub
58  '===============================================================================  '===============================================================================
59  ' Name: Sub setTag  ' Name: Sub setTag
60  ' Input:  ' Input:
61  '   ByVal strTagName As String - Specifies the name of the element.  '   ByVal strTagName As String - エレメントの名前を指定します。
62  ' Output:  ' Output:
63  '   None  '   なし
64  ' Purpose: Sets the name of the element.  ' Purpose: エレメントの名前を設定します。
65  ' Remarks: Used internally for storing the name of the database table.  ' Remarks: データベーステーブルの名前記憶するために内部で使用されます。
66  '===============================================================================  '===============================================================================
67  Friend Sub setTag(ByVal strTagName As String)  Friend Sub setTag(ByVal strTagName As String)
68  End Sub  End Sub
# Line 71  End Sub Line 70  End Sub
70  '===============================================================================  '===============================================================================
71  ' Name: Sub setDefAttribute  ' Name: Sub setDefAttribute
72  ' Input:  ' Input:
73  '   ByVal strAttributeName As String - Specifies the name of the attribute  '   ByVal strAttributeName As String - デフォルトで返される属性の名前を指定します。
 ' returned as default.  
74  ' Output:  ' Output:
75  '   None  '   なし
76  ' Purpose: Sets the name of the attribute returned as element's text.  ' Purpose: エレメントのテキストとして返される属性の名前を設定します。
77  ' Remarks: Used internally for storing the name of the attribute for Attribute  ' Remarks: Attributeノードエミュレーションのために属性の名前を保存するために、内部で使用されます。
78  '   nodes emulation.  '   <p>エレメントテキスト(text())のエミュレートもです. これはあるテキストノードのみありうることを意味します。
 '   <p>Also emulates element text (text()). This means that there caan be only  
 '   one text node.  
79  '===============================================================================  '===============================================================================
80  Friend Sub setDefAttribute(ByVal strAttributeName As String)  Friend Sub setDefAttribute(ByVal strAttributeName As String)
81  End Sub  End Sub
# Line 87  End Sub Line 83  End Sub
83  '===============================================================================  '===============================================================================
84  ' Name: Let id  ' Name: Let id
85  ' Input:  ' Input:
86  '   ByVal strId As String - Specifies the id of the element.  '   ByVal strId As String - エレメントのIDを指定します。
87  ' Output:  ' Output:
88  '   None  '   なし
89  ' Purpose: Sets the id if the element.  ' Purpose: エレメントのIDを設定します。
90  ' Remarks: The id is the primary key of the element in the database. The pair  ' Remarks: IDはデータベース内ではエレメントの主キーです。
91  '   id and tablename identyfy unique the element.  '   IDとテーブル名の組はエレメントを一意に識別します。
92  '===============================================================================  '===============================================================================
93  Friend Property Let id(ByVal strId As String)  Friend Property Let id(ByVal strId As String)
94  End Property  End Property
# Line 100  End Property Line 96  End Property
96  '===============================================================================  '===============================================================================
97  ' Name: Sub restore  ' Name: Sub restore
98  ' Input:  ' Input:
99  '   None  '   なし
100  ' Output:  ' Output:
101  '   None  '   なし
102  ' Purpose: Restores the state of the element previously backe up with backup.  ' Purpose: バックアップを使用して以前にバックアップしたエレメントの状態を回復します。
103  ' Remarks: Used for restoring the state after transaction rollback.  ' Remarks: トランザクションロールバック後に状態を回復するのに使用されます。
104  '===============================================================================  '===============================================================================
105  Friend Sub restore()  Friend Sub restore()
106  End Sub  End Sub
# Line 112  End Sub Line 108  End Sub
108  '===============================================================================  '===============================================================================
109  ' Name: Sub reload  ' Name: Sub reload
110  ' Input:  ' Input:
111  '   None  '   なし
112  ' Output:  ' Output:
113  '   None  '   なし
114  ' Purpose: Reloads the data from the database.  ' Purpose: データベースからデータを再読込みします。
115  ' Remarks: Used for updating the object data before reading or writing any data  ' Remarks: トランザクションのコンテキスト内でデータベースへデータを読み書きする前に
116  '   to the database in the context of a transaction.  '   オブジェクトのデータを更新するのに使用されます。
117  '===============================================================================  '===============================================================================
118  Friend Sub reload()  Friend Sub reload()
119  End Sub  End Sub
# Line 125  End Sub Line 121  End Sub
121  '===============================================================================  '===============================================================================
122  ' Name: Set ownerDocument  ' Name: Set ownerDocument
123  ' Input:  ' Input:
124  '   ByRef doc As Document - Specifies reference to the document object.  '   ByRef doc As Document - ドキュメントオブジェクトへの参照を指定します。
125  ' Output:  ' Output:
126  '   None  '   なし
127  ' Purpose: Sets the reference to the owner document object.  ' Purpose: オーナードキュメントオブジェクトへの参照を設定します。
128  ' Remarks: None  ' Remarks: なし
129  '===============================================================================  '===============================================================================
130  Friend Property Set ownerDocument(ByRef doc As Document)  Friend Property Set ownerDocument(ByRef doc As Document)
131  End Property  End Property
# Line 137  End Property Line 133  End Property
133  '===============================================================================  '===============================================================================
134  ' Name: Get ownerDocument  ' Name: Get ownerDocument
135  ' Input:  ' Input:
136  '   None  '   なし
137  ' Output:  ' Output:
138  '   Document - Reference to the document object.  '   Document - ドキュメントオブジェクトへの参照。
139  ' Purpose: Returns reference to the owner document object.  ' Purpose: オーナードキュメントオブジェクトへの参照を返します。
140  ' Remarks: None  ' Remarks: なし
141  '===============================================================================  '===============================================================================
142  Public Property Get ownerDocument() As Document  Public Property Get ownerDocument() As Document
143  End Property  End Property
# Line 149  End Property Line 145  End Property
145  '===============================================================================  '===============================================================================
146  ' Name: Get text  ' Name: Get text
147  ' Input:  ' Input:
148  '   None  '   なし
149  ' Output:  ' Output:
150  '   String - The text representation of the contents of the node.  '   String - ノードの内容のテキスト表現。
151  ' Purpose: Returns the string representing the text contents of this node.  ' Purpose: このノードのテキストコンテンツを表現する文字列を返します。
152  ' Remarks: None  ' Remarks: なし
153  '===============================================================================  '===============================================================================
154  Public Property Get text() As String  Public Property Get text() As String
155  End Property  End Property
# Line 161  End Property Line 157  End Property
157  '===============================================================================  '===============================================================================
158  ' Name: Let text  ' Name: Let text
159  ' Input:  ' Input:
160  '   ByVal strNewText As String - String representing the text content of this node.  '   ByVal strNewText As String - このノードのテキストコンテンツを表現する文字列。
161  ' This value varies depending on the value of the nodeType.  ' この値はノードタイプの値によって変わります。
162  ' Output:  ' Output:
163  '   None  '   なし
164  ' Purpose: Sets the text contents of this node.  ' Purpose: このノードのテキストコンテンツを設定します。
165  ' Remarks: None  ' Remarks: なし
166  '===============================================================================  '===============================================================================
167  Public Property Let text(ByVal strNewText As String)  Public Property Let text(ByVal strNewText As String)
168  End Property  End Property
# Line 174  End Property Line 170  End Property
170  '===============================================================================  '===============================================================================
171  ' Name: Get parentNode  ' Name: Get parentNode
172  ' Input:  ' Input:
173  '   None  '   なし
174  ' Output:  ' Output:
175  '   Element - Parent of the given node instance. However, if a node has just  '   Element - 与えられたノードインスタンスの親。ただし、ノードが生成された直後で
176  ' been created and not yet added to the tree, or if it has been removed from  ' まだツリーに追加されていない場合、もしくはツリーから削除されている場合は、親はNothingになります。
177  ' the tree, the parent is Nothing.  ' Purpose: 親ノードを返します(親を持つことができるノードに対して)。
178  ' Purpose: Returns the parent node (for nodes that can have parents).  ' Remarks: なし
 ' Remarks: None  
179  '===============================================================================  '===============================================================================
180  Public Property Get parentNode() As Element  Public Property Get parentNode() As Element
181  End Property  End Property
# Line 188  End Property Line 183  End Property
183  '===============================================================================  '===============================================================================
184  ' Name: Function appendChild  ' Name: Function appendChild
185  ' Input:  ' Input:
186  '   ByVal newChild As Element - Reference to the new child node to be appended  '   ByVal newChild As Element - このノードの子のリストの最後に追加する新しい子ノードへの参照。
 ' to the end of the list of children of this node.  
187  ' Output:  ' Output:
188  '   Element - New child node successfully appended to the list. If Nothing,  '   Element - リストへの追加に追加された新しい子ノード(成功時)。
189  '   no object is created.  '   Nothingのときはオブジェクトは生成されていません。
190  ' Purpose: Appends newChild as the last child of this node.  ' Purpose: このノードの最後の子として新しい子を追加します。
191  ' Remarks: Node order is not implemented.  ' Remarks: ノードオーダーは実装されていません。
192  '===============================================================================  '===============================================================================
193  Public Function appendChild(ByVal newChild As Element) As Element  Public Function appendChild(ByVal newChild As Element) As Element
194  End Function  End Function
# Line 202  End Function Line 196  End Function
196  '===============================================================================  '===============================================================================
197  ' Name: Function removeChild  ' Name: Function removeChild
198  ' Input:  ' Input:
199  '   ByVal childNode As Element - Child node to be removed from the list of  '   ByVal childNode As Element - このノードの子ノードのリストから取り除く子ノード。
 ' children of this node.  
200  ' Output:  ' Output:
201  '   Element - Removed child node. If Nothing, no object is removed.  '   Element - 削除した子ノード。Nothingの場合は削除していません。
202  ' Purpose: Removes the specified child node from the list of children and  ' Purpose: 子ノードのリストから指定した子ノードを取り除き、それを返します。
203  '   returns it.  ' Remarks: なし
 ' Remarks: None  
204  '===============================================================================  '===============================================================================
205  Public Function removeChild(ByVal childNode As Element) As Element  Public Function removeChild(ByVal childNode As Element) As Element
206  End Function  End Function
# Line 216  End Function Line 208  End Function
208  '===============================================================================  '===============================================================================
209  ' Name: Function getAttribute  ' Name: Function getAttribute
210  ' Input:  ' Input:
211  '   ByVal name As String - Name of the attribute to return.  '   ByVal name As String - 取得する属性の名前
212  ' Output:  ' Output:
213  '   String - String that contains the attribute value. The empty string is  '   String - 属性値を含む文字列。name属性が指定されていない場合やデフォルト値の場合は空文字となります。
214  ' returned if the named attribute does not have a specified or default value.  ' Purpose: 名前つきの属性の値を取得します。
215  ' Purpose: Retrieves the value of the named attribute.  ' Remarks: なし
 ' Remarks: None  
216  '===============================================================================  '===============================================================================
217  Public Function getAttribute(ByVal name As String) As String  Public Function getAttribute(ByVal name As String) As String
218  End Function  End Function
# Line 229  End Function Line 220  End Function
220  '===============================================================================  '===============================================================================
221  ' Name: Function setAttribute  ' Name: Function setAttribute
222  ' Input:  ' Input:
223  '   ByVal name As String - Name of the attribute to return.  '   ByVal name As String - 設定する属性の名前。
224  '   ByVal value As String -  Name of the attribute. If an attribute with that  '   ByVal value As String -  属性の値。既に存在する属性の場合は値は更新されます。
225  ' name already exists, its value is changed.  ' Output:
226  ' Output:  '   なし
227  '   None  ' Purpose: 名前つきの属性の値を設定します。
228  ' Purpose: Sets the value of the named attribute.  ' Remarks: 存在しない属性の場合、作成されません。
 ' Remarks: If an attribute with that name does not exist, it is NOT created.  
229  '===============================================================================  '===============================================================================
230  Public Sub setAttribute(ByVal name As String, ByVal value As String)  Public Sub setAttribute(ByVal name As String, ByVal value As String)
231  End Sub  End Sub
# Line 243  End Sub Line 233  End Sub
233  '===============================================================================  '===============================================================================
234  ' Name: Function selectNodes  ' Name: Function selectNodes
235  ' Input:  ' Input:
236  '   ByVal queryString As String - XSL or XPath expression that is to be applied  '   ByVal queryString As String - このノードによって定義されるコンテキストに適用されるXSLもしくはXPath式。
237  ' to the context defined by this node. Whether an XSL or XPath query is used is  ' XSLかXPathクエリのどちらが使用されるかはSelectionLanguageプロパティの値によって決定されます。
238  ' determined by the value of the SelectionLanguage property. By default,  ' デフォルトでは式はXSLパターンクエリです。SelectionLanguageプロパティはSetPropertyメソッドで設定できます。
239  ' the expression is an XSL pattern query. The SelectionLanguage property can be  ' Output:
240  ' set with the SetProperty method.  '   NodeList - XSLかXPathによって選択されたノードのリスト。
241  ' Output:  ' もし、クエリによって選択されたノードがない場合、空のノードリストを返します。
242  '   NodeList - List of nodes selected by the XSL or XPath query. If no nodes  ' Purpose: このノードコンテキストへ指定されたパターンマッチング操作を適用し、
243  ' are selected by the query, an empty node list is returned.  '   マッチしたノードのリストを返します。
244  ' Purpose: Applies the specified pattern-matching operation to this node's  ' Remarks: SelectionLanguage と SetProperty プロパティは実装されていません。
 '   context and returns the list of matching nodes.  
 ' Remarks: SelectionLanguage and SetProperty properties are not implemented.  
245  '===============================================================================  '===============================================================================
246  Public Function selectNodes(ByVal queryString As String) As NodeList  Public Function selectNodes(ByVal queryString As String) As NodeList
247  End Function  End Function
# Line 261  End Function Line 249  End Function
249  '===============================================================================  '===============================================================================
250  ' Name: Function selectSingleNode  ' Name: Function selectSingleNode
251  ' Input:  ' Input:
252  '   ByVal queryString As String - String specifying the XSL or XPath query that  '   ByVal queryString As String - このノードによって定義されるコンテキストに適用されるXSLもしくはXPathクエリを指定する文字列。
253  ' is to be applied to the context defined by this node. Whether an XSL or XPath  ' XSLかXPathクエリのどちらが使用されるかはSelectionLanguageプロパティの値によって決定されます。
254  ' query is used is determined by the value of the SelectionLanguage property.  ' デフォルトでは式はXSLパターンクエリです。SelectionLanguageプロパティはSetPropertyメソッドで設定できます。
255  ' By default, the expression is an XSL pattern query. The SelectionLanguage  ' Output:
256  ' property can be set with the SetProperty method.  '   Element - XPathクエリによって選択された最初のノード。クエリから1つも返されなかった場合はNothingを返します。
257  ' Output:  ' Purpose: このノードのコンテキストに指定されたパターンを適用し、
258  '   Element - First node that is selected by the XPath query. If no nodes result  '   最初にマッチしたノードを返します。
259  ' from the query, it returns Nothing.  ' Remarks: SelectionLanguage と SetProperty プロパティは実装されていません。
 ' Purpose: Applies the specified pattern to this node's context and returns  
 '   the first matching node.  
 ' Remarks: SelectionLanguage and SetProperty properties are not implemented.  
260  '===============================================================================  '===============================================================================
261  Public Function selectSingleNode(ByVal queryString As String) As Element  Public Function selectSingleNode(ByVal queryString As String) As Element
262  End Function  End Function
# Line 279  End Function Line 264  End Function
264  '===============================================================================  '===============================================================================
265  ' Name: Sub load  ' Name: Sub load
266  ' Input:  ' Input:
267  '   None  '   なし
268  ' Output:  ' Output:
269  '   None  '   なし
270  ' Purpose: Loads the attribute names, values and types from the database.  ' Purpose: データベースから属性名、値、型を読み込みます。
271  ' Remarks: None  ' Remarks: なし
272  '===============================================================================  '===============================================================================
273  Private Sub load()  Private Sub load()
274  End Sub  End Sub
# Line 291  End Sub Line 276  End Sub
276  '===============================================================================  '===============================================================================
277  ' Name: Sub insertElement  ' Name: Sub insertElement
278  ' Input:  ' Input:
279  '   None  '   なし
280  ' Output:  ' Output:
281  '   None  '   なし
282  ' Purpose: Inserts a new record in the database with the data from attribute  ' Purpose: 属性値のコレクションからのデータからデータベースに新規のレコードを挿入します。
283  '   values collection.  ' Remarks: なし
 ' Remarks: None  
284  '===============================================================================  '===============================================================================
285  Private Sub insertElement()  Private Sub insertElement()
286  End Sub  End Sub
# Line 304  End Sub Line 288  End Sub
288  '===============================================================================  '===============================================================================
289  ' Name: Sub updateElement  ' Name: Sub updateElement
290  ' Input:  ' Input:
291  '   None  '   なし
292  ' Output:  ' Output:
293  '   None  '   なし
294  ' Purpose: Updates the data in the database with that in the object.  ' Purpose: オブジェクト内のデータからデータベースを更新します。
295  ' Remarks: None  ' Remarks: なし
296  '===============================================================================  '===============================================================================
297  Private Sub updateElement()  Private Sub updateElement()
298  End Sub  End Sub
# Line 316  End Sub Line 300  End Sub
300  '===============================================================================  '===============================================================================
301  ' Name: Sub deleteElement  ' Name: Sub deleteElement
302  ' Input:  ' Input:
303  '   None  '   なし
304  ' Output:  ' Output:
305  '   None  '   なし
306  ' Purpose: Deletes the node from the database.  ' Purpose: データベースからノードを削除します。
307  ' Remarks: Not used  ' Remarks: 未使用
308  '===============================================================================  '===============================================================================
309  Private Sub deleteElement()  Private Sub deleteElement()
310  End Sub  End Sub
# Line 328  End Sub Line 312  End Sub
312  '===============================================================================  '===============================================================================
313  ' Name: Sub updateAttribute  ' Name: Sub updateAttribute
314  ' Input:  ' Input:
315  '   ByVal strName As String - Name of attribute to update.  '   ByVal strName As String - 更新する属性の名前
316  ' Output:  ' Output:
317  '   None  '   なし
318  ' Purpose: Updates the value of named attribute in the database.  ' Purpose: データベース上にある名前付きの属性の値を更新します。
319  ' Remarks: If the id attribute is changed then the cache in the document object  ' Remarks: id属性が変更されていれば、
320  '   is updated.  '   ドキュメントオブジェクトのキャッシュを更新します。
321  '===============================================================================  '===============================================================================
322  Private Sub updateAttribute(ByVal strName As String)  Private Sub updateAttribute(ByVal strName As String)
323  End Sub  End Sub
# Line 341  End Sub Line 325  End Sub
325  '===============================================================================  '===============================================================================
326  ' Name: Sub backup  ' Name: Sub backup
327  ' Input:  ' Input:
328  '   ByVal toBackup As Boolean - If True the current object data is stored in  '   ByVal toBackup As Boolean - Trueの場合は現在のオブジェクトデータが静的変数に保存されます。
329  ' a static variables. If False, it is restored from the static storage.  ' Falseの場合は静的ストレージから回復されます。
330  ' Output:  ' Output:
331  '   None  '   なし
332  ' Purpose: Backups and restores the object state.  ' Purpose: オブジェクトの状態をバックアップ、リストアします。
333  ' Remarks: Used for transaction rollback for avoiding database roundtrip.  ' Remarks: データベースの往復遅延回避のためトランザクションロールバックに対して使用されます。
334  '===============================================================================  '===============================================================================
335  Private Sub backup(ByVal toBackup As Boolean)  Private Sub backup(ByVal toBackup As Boolean)
336  End Sub  End Sub

Legend:
Removed from v.48  
changed lines
  Added in v.49

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26