summaryrefslogtreecommitdiff
path: root/processmodel/processmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'processmodel/processmodel.cpp')
-rw-r--r--processmodel/processmodel.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/processmodel/processmodel.cpp b/processmodel/processmodel.cpp
new file mode 100644
index 0000000..ee75638
--- /dev/null
+++ b/processmodel/processmodel.cpp
@@ -0,0 +1,32 @@
+#include "Poco/Process.h"
+#include "Poco/PipeStream.h"
+#include "Poco/StreamCopier.h"
+#include <fstream>
+#include <iostream>
+using Poco::Process;
+using Poco::ProcessHandle;
+
+//1. make a basic executable that represents a render context
+//get message passing going
+//incorporate in REST server
+//fill in the details
+
+int main(int argc, char** argv)
+{
+ std::string cmd("rendercontext");
+ std::vector<std::string> args;
+ args.push_back("-ax");
+ Poco::Pipe outPipe;
+ Poco::Pipe inPipe;
+ ProcessHandle ph = Process::launch(cmd, args, &inPipe, &outPipe, 0);
+ Poco::PipeInputStream istr(outPipe);
+ Poco::PipeOutputStream ostr(inPipe);
+ //std::ofstream ostr("processes.txt");
+ //
+ while (true){
+ //Poco::StreamCopier::copyStream(istr,std::cout);
+ ostr<<std::cin;
+ std::cout<<istr;
+ }
+ return 0;
+} \ No newline at end of file