[wsf-c-dev] [C++] How should this be implimented in C++?

Dimuthu Gamage dimuthu at wso2.com
Thu Oct 18 04:31:50 PDT 2007


Hi Senaka,

Here  you can follow the approach in the Java API,

There class hierarchy is

interface org.apache.axiom.om.OMNode

    * interface org.apache.axiom.om.OMComment
    * interface org.apache.axiom.om.OMDocType
    * interface org.apache.axiom.om.OMElement (also extends 
org.apache.axiom.om.OMContainer)
    * interface org.apache.axiom.om.OMProcessingInstruction
    * interface org.apache.axiom.om.OMText

So the C++ users never need to really deal with OMNode directly like it 
happened to axis2/c users(to traverse node), rather they will work 
directly with the subclasses since they have all the node functions as 
well (From inheritance). Then there won't be any requirement to return 
the data element, so the  function you mentioned is not required for C++.

Thanks
Dimuthu


Senaka Fernando wrote:
> The code below is extracted from axiom_node.h, in Axis2/C. How should
> this be implemented in C++? What types are returned? Is it really
> required? Are there any alternative workarounds?
>        /**
>         * get the struct contained in the node
>         * IF the node is on type AXIOM_ELEMENT , this method returns
>         * a pointer to  axiom_element_t struct contained
>         * @param om_node node
>         * @returns pointer to struct contained in the node
>         * returns NULL if no struct is contained
>         */
>         AXIS2_EXTERN void *AXIS2_CALL
>         axiom_node_get_data_element(wsf_axiom_node om_node);
>
> Regards,
> Senaka
>
>
> _______________________________________________
> Wsf-c-dev mailing list
> Wsf-c-dev at wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/wsf-c-dev
>
>   




More information about the Wsf-c-dev mailing list