From 85e65f6bb8f350f150c7e72316e5a36ef051c7ca Mon Sep 17 00:00:00 2001 From: Rasbats Date: Fri, 8 May 2020 11:17:20 +0100 Subject: [PATCH] alpha v0.1 remove more superfluous files --- src/WriteRouteFile.cpp | 36 -------- src/WriteRouteFile.h | 17 ---- src/WriteSperry.cpp | 184 ----------------------------------------- src/WriteSperry.h | 9 -- src/test.cpp | 18 ---- src/test.h | 18 ---- 6 files changed, 282 deletions(-) delete mode 100644 src/WriteRouteFile.cpp delete mode 100644 src/WriteRouteFile.h delete mode 100644 src/WriteSperry.cpp delete mode 100644 src/WriteSperry.h delete mode 100644 src/test.cpp delete mode 100644 src/test.h diff --git a/src/WriteRouteFile.cpp b/src/WriteRouteFile.cpp deleted file mode 100644 index 4f5b7de..0000000 --- a/src/WriteRouteFile.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include -#include "tinyxml2.h" -#include -#include "WriteRouteFile.h" - -using namespace std; -using namespace tinyxml2; - -void WriteSchema() { - - std::ifstream inFile("schema.txt"); - std::ofstream outFile("test.route"); - - outFile << inFile.rdbuf(); - - inFile.close(); - outFile.close(); - -} -/* -void Addpoint(XMLElement* Route, wxString ptlat, wxString ptlon, wxString ptname){ - //add point - //XMLElement * RoutePoint = new XMLElement(); - //RoutePoint->SetAttribute("lon", ptlon.mb_str()); - - //Route->LinkEndChild(RoutePoint); - //done adding point -} -*/ -void CopyOpenRoute() { - - - - -} \ No newline at end of file diff --git a/src/WriteRouteFile.h b/src/WriteRouteFile.h deleted file mode 100644 index ae58bc8..0000000 --- a/src/WriteRouteFile.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _WRITER_IMPL_H_ -#define _WRITER_IMPL_H_ - -#ifdef WX_PRECOMP -#include "wx/wx.h" -#endif - - -#include "tinyxml2.h" - - -void WriteSchema(); -void CopyOpenRoute(); - -//void Addpoint(XMLElement* Route, wxString ptlat, wxString ptlon, wxString ptname); - -#endif \ No newline at end of file diff --git a/src/WriteSperry.cpp b/src/WriteSperry.cpp deleted file mode 100644 index 2074b98..0000000 --- a/src/WriteSperry.cpp +++ /dev/null @@ -1,184 +0,0 @@ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "WriteSperry.h" -#include -#include - -#include - -using namespace xercesc; -using namespace std; - -FILE *ofxml; - -class XStr -{ -public: - XStr(const char* const toTranscode) - { - // Call the private transcoding method - fUnicodeForm = XMLString::transcode(toTranscode); - } - - ~XStr() - { - XMLString::release(&fUnicodeForm); - } - - const XMLCh* unicodeForm() const - { - return fUnicodeForm; - } - -private: - XMLCh* fUnicodeForm; -}; - -#define X(str) XStr(str).unicodeForm() - -int mainWriter(int argc, char* args[]) -{ - ofxml = fopen("dom_xml.txt", "w"); - fclose(ofxml); - - - try - { - XMLPlatformUtils::Initialize(); - } - catch (const XMLException& e) - { - char* message = XMLString::transcode(e.getMessage()); - - wxMessageBox(message, "Error Message"); - //cout << "Error Message: " << message << "\n"; - XMLString::release(&message); - return 1; - } - - int errorCode = 0; - { - - DOMImplementation* impl = DOMImplementationRegistry::getDOMImplementation(X("Core")); - - if (impl != NULL) - { - try - { - xercesc::DOMDocument* doc = impl->createDocument( - 0, // root element namespace URI. - X("company"), // root element name - 0); // document type object (DTD). - - DOMElement* rootElem = doc->getDocumentElement(); - - DOMElement* prodElem = doc->createElement(X("product")); - rootElem->appendChild(prodElem); - - DOMText* prodDataVal = doc->createTextNode(X("Xerces-C")); - prodElem->appendChild(prodDataVal); - - DOMElement* catElem = doc->createElement(X("category")); - rootElem->appendChild(catElem); - - catElem->setAttribute(X("idea"), X("great")); - - DOMText* catDataVal = doc->createTextNode(X("XML Parsing Tools")); - catElem->appendChild(catDataVal); - - DOMElement* devByElem = doc->createElement(X("developedBy")); - rootElem->appendChild(devByElem); - - DOMText* devByDataVal = doc->createTextNode(X("Apache Software Foundation")); - devByElem->appendChild(devByDataVal); - - //OutputXML(doc, "dom_xml.txt"); - - doc->release(); - } - catch (const OutOfMemoryException&) - { - XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl; - errorCode = 5; - } - catch (const DOMException& e) - { - XERCES_STD_QUALIFIER cerr << "DOMException code is: " << e.code << XERCES_STD_QUALIFIER endl; - errorCode = 2; - } - catch (const XMLException& e) - { - char* message = XMLString::transcode(e.getMessage()); - - wxMessageBox(message, "Error Message"); - //cout << "Error Message: " << message << endl; - XMLString::release(&message); - return 1; - } - catch (...) - { - XERCES_STD_QUALIFIER cerr << "An error occurred creating the document" << XERCES_STD_QUALIFIER endl; - errorCode = 3; - } - } // (inpl != NULL) - else - { - XERCES_STD_QUALIFIER cerr << "Requested implementation is not supported" << XERCES_STD_QUALIFIER endl; - errorCode = 4; - } - } - - XMLPlatformUtils::Terminate(); - - return errorCode; -} -/* -void OutputXML(xercesc::DOMDocument* pmyDOMDocument, std::string filePath) -{ - //Return the first registered implementation that has the desired features. In this case, we are after a DOM implementation that has the LS feature... or Load/Save. - static const XMLCh gLS[] = { chLatin_L, chLatin_S, chNull }; - DOMImplementation *implementation = DOMImplementationRegistry::getDOMImplementation(gLS); - - // Create a DOMLSSerializer which is used to serialize a DOM tree into an XML document. - DOMLSSerializer *serializer = ((DOMImplementationLS*)implementation)->createLSSerializer(); - - // Make the output more human readable by inserting line feeds. - if (serializer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true)) - serializer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true); - - // The end-of-line sequence of characters to be used in the XML being written out. - serializer->setNewLine(XMLString::transcode("\r\n")); - - // Convert the path into Xerces compatible XMLCh*. - XMLCh *tempFilePath = XMLString::transcode(filePath.c_str()); - - // Specify the target for the XML output. - XMLFormatTarget *formatTarget = new LocalFileFormatTarget(tempFilePath); - - // Create a new empty output destination object. - DOMLSOutput *output = ((DOMImplementationLS*)implementation)->createLSOutput(); - - // Set the stream to our target. - output->setByteStream(formatTarget); - - // Write the serialized output to the destination. - serializer->write(pmyDOMDocument, output); - - // Cleanup. - serializer->release(); - XMLString::release(&tempFilePath); - delete formatTarget; - output->release(); -}*/ \ No newline at end of file diff --git a/src/WriteSperry.h b/src/WriteSperry.h deleted file mode 100644 index c15c76f..0000000 --- a/src/WriteSperry.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __Sperry__ -#define __Sperry__ - - - -//void OutputXML(xercesc::DOMDocument* pmyDOMDocument, std::string filePath); -int mainWriter(int argc, char* args[]); - -#endif \ No newline at end of file diff --git a/src/test.cpp b/src/test.cpp deleted file mode 100644 index b6ac780..0000000 --- a/src/test.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "test.h" - -test::test() -{ - -} - -test::~test() -{ - -} - -void test::testMessage() { - wxMessageBox("here"); - -} - -; \ No newline at end of file diff --git a/src/test.h b/src/test.h deleted file mode 100644 index bca9a46..0000000 --- a/src/test.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __RTZassist__ -#define __RTZassist__ - -#include - -class test -{ - -public : - - test(); - ~test(); - - void testMessage(); - -}; - -#endif \ No newline at end of file