ICabNode::Insert Method

From PDF XChange PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
m (Automatic page editing by robot)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
__NOTOC__
 
[[Category:Editor]]
 
[[Category:Editor]]
 
{{#customTitle:ICabNode::Insert Method}}
 
{{#customTitle:ICabNode::Insert Method}}
{{#parentPage:PXV:ICabNode|Insert Method|method}}
+
{{#parentPage:PXV:ICabNode#Methods|Insert|method}}
 
{{ToWrite}}
 
{{ToWrite}}
 
{{ToReview}}
 
{{ToReview}}
  
The method of interface of PDF-XChange Editor SDK.
+
Inserts a new subnode into the container node.
  
 
== Syntax ==
 
== Syntax ==
<pre class="brush:cpp;gutter:false">HRESULT Insert([in, optional]                  VARIANT*      itemIdentity,
+
<pre class="brush:cpp;gutter:false">HRESULT Insert([in, optional]                  VARIANT       itemIdentity,
               [in, defaultvalue(dt_Invalid)]  CabDataTypeID  Type,
+
               [in, defaultvalue(dt_Invalid)]  CabDataTypeID  nType,
               [out, retval]                  ICabNode**    ppNode);</pre>
+
               [out, retval]                  ICabNode**    pNode);</pre>
  
 
== Parameters ==
 
== Parameters ==
 
;itemIdentity
 
;itemIdentity
:[in, optional]  Pointer to VARIANT*.
+
:[in, optional]  VARIANT.
;Type
+
Specifies the new node position. For array containers it is interpreted as an integer index the new node has to be inserted before.
 +
For dictionary containers it specifies a string key to associate with the new node. If the dictionary already has a node with this key, the existing node will be returned.
 +
 
 +
;nType
 
:[in, defaultvalue(dt_Invalid)]  Value of [[PXV:CabDataTypeID|CabDataTypeID]].
 
:[in, defaultvalue(dt_Invalid)]  Value of [[PXV:CabDataTypeID|CabDataTypeID]].
;ppNode
+
Specifies the node type.
 +
 
 +
For templatized containers the type is checked against the container template.
 +
When <code>itemIdentity</code> identifies an existing dictionary node, the type is checked against the existing node type.
 +
 
 +
If the type value is <code>dt_Undefined</code>, the type check semantics is actually a type resolution - the resulting node type is the type the checking is made against.
 +
 
 +
 
 +
;pNode
 
:[out, retval]  Pointer to [[PXV:ICabNode|ICabNode]].
 
:[out, retval]  Pointer to [[PXV:ICabNode|ICabNode]].
 +
The address of a pointer variable that receives the pointer to the resulting cab node.
  
 
== Return Value ==
 
== Return Value ==
Line 24: Line 37:
  
 
== See Also ==
 
== See Also ==
See also [[PXV:ICabNode|ICabNode]].
+
[[PXV:ICabNode|ICabNode]]

Latest revision as of 03:13, 15 June 2015


Inserts a new subnode into the container node.

Syntax

HRESULT Insert([in, optional]                  VARIANT        itemIdentity,
               [in, defaultvalue(dt_Invalid)]  CabDataTypeID  nType,
               [out, retval]                   ICabNode**     pNode);

Parameters

itemIdentity
[in, optional] VARIANT.

Specifies the new node position. For array containers it is interpreted as an integer index the new node has to be inserted before. For dictionary containers it specifies a string key to associate with the new node. If the dictionary already has a node with this key, the existing node will be returned.

nType
[in, defaultvalue(dt_Invalid)] Value of CabDataTypeID.

Specifies the node type.

For templatized containers the type is checked against the container template. When itemIdentity identifies an existing dictionary node, the type is checked against the existing node type.

If the type value is dt_Undefined, the type check semantics is actually a type resolution - the resulting node type is the type the checking is made against.


pNode
[out, retval] Pointer to ICabNode.

The address of a pointer variable that receives the pointer to the resulting cab node.

Return Value

Returns S_OK if operation was successful or error code in other cases.

See Also

ICabNode