Diff of /src/org/esb/hive/CommandInputStream.cpp [07f693] .. [1cff17]  Maximize  Restore

Switch to side-by-side view

--- a/src/org/esb/hive/CommandInputStream.cpp
+++ b/src/org/esb/hive/CommandInputStream.cpp
@@ -5,45 +5,41 @@
 using namespace std;
 using namespace org::esb::hive;
 
-
-CommandInputStream::CommandInputStream(InputStream * is){
-    _source=is;
+CommandInputStream::CommandInputStream(InputStream * is) {
+  _source = is;
 }
 
-
-CommandInputStream::~CommandInputStream(){
+CommandInputStream::~CommandInputStream() {
 
 }
 
-Command & CommandInputStream::readCommand(){
-    char buffer;
-    string b;
-    while(available()>0){
-    	this->read((unsigned char *)&buffer,1);
-		b+=buffer;
-    }
-//	Command * command=new Command();
-//	char com[b.length()+1];
-//	memset(&com,0,b.length()+1);
-//	memcpy(&com, b.c_str(), b.length());
-	_command.setCommand(b);
-    return _command;
+Command & CommandInputStream::readCommand() {
+  char buffer;
+  string b;
+  while (available() > 0) {
+    this->read((unsigned char *) & buffer, 1);
+    b += buffer;
+  }
+  //	Command * command=new Command();
+  //	char com[b.length()+1];
+  //	memset(&com,0,b.length()+1);
+  //	memcpy(&com, b.c_str(), b.length());
+  _command.setCommand(b);
+  return _command;
 }
 
-
-int CommandInputStream::read(vector<unsigned char>&buffer){
-    return _source->read(buffer);
+int CommandInputStream::read(vector<unsigned char>&buffer) {
+  return _source->read(buffer);
 }
 
-int CommandInputStream::read(){
-    return _source->read();
+int CommandInputStream::read() {
+  return _source->read();
 }
 
-int CommandInputStream::read(unsigned char * buffer, int length){
-    return _source->read(buffer,length);
+int CommandInputStream::read(unsigned char * buffer, int length) {
+  return _source->read(buffer, length);
 }
 
-
-int CommandInputStream::available(bool isBlocking){
-    return _source->available(isBlocking);
+int CommandInputStream::available(bool isBlocking) {
+  return _source->available(isBlocking);
 }

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks