00001
00002
00003
00004
00007
00009
00010 #ifndef __X3D_H__
00011 #define __X3D_H__
00012
00013 #include <iostream>
00014 #include <xercesc/sax2/XMLReaderFactory.hpp>
00015 #include <xercesc/sax2/SAX2XMLReader.hpp>
00016 #include "H3DApi.h"
00017 #include "Group.h"
00018 #include "DEFNodes.h"
00019 #include "AutoRef.h"
00020 #include "PrototypeVector.h"
00021
00022 using namespace std;
00023 XERCES_CPP_NAMESPACE_USE
00024
00025 namespace H3D {
00026 namespace X3D {
00027
00038 H3DAPI_API Group*createX3DFromStream(
00039 istream &in,
00040 DEFNodes *dn = NULL,
00041 DEFNodes *exported_nodes = NULL,
00042 PrototypeVector *prototypes = NULL,
00043 const XMLCh *const system_id =(const XMLCh *const)L"<stream input>"
00044 );
00045
00055 H3DAPI_API Group* createX3DFromString( const string &str,
00056 DEFNodes *dn = NULL,
00057 DEFNodes *exported_nodes = NULL,
00058 PrototypeVector *prototypes = NULL );
00059
00060
00070 H3DAPI_API Group* createX3DFromURL( const string &urn,
00071 DEFNodes *dn = NULL,
00072 DEFNodes *exported_nodes = NULL,
00073 PrototypeVector *prototypes = NULL );
00074
00085 H3DAPI_API AutoRef<Node> createX3DNodeFromStream(
00086 istream &in,
00087 DEFNodes *dn = NULL,
00088 DEFNodes *exported_nodes = NULL,
00089 PrototypeVector *prototypes = NULL,
00090 const XMLCh *const system_id =(const XMLCh *const)L"<stream input>"
00091 );
00092
00102 H3DAPI_API AutoRef<Node> createX3DNodeFromString(
00103 const string &str,
00104 DEFNodes *dn = NULL,
00105 DEFNodes *exported_nodes = NULL,
00106 PrototypeVector *prototypes = NULL );
00107
00108
00118 H3DAPI_API AutoRef<Node> createX3DNodeFromURL(
00119 const string &urn,
00120 DEFNodes *dn = NULL,
00121 DEFNodes *exported_nodes = NULL,
00122 PrototypeVector *prototypes = NULL );
00123
00124 SAX2XMLReader* getNewXMLParser();
00125
00128 H3DAPI_API void writeNodeAsX3D( ostream& os,
00129 Node *node,
00130 const string& container_field =
00131 "children" );
00132
00133 }
00134 };
00135
00136 #endif