You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2006/02/22 00:29:06 UTC
svn commit: r379623 [15/18] - in /incubator/activemq/trunk: ./
activecluster/ activecluster/src/java/org/apache/activecluster/
activecluster/src/java/org/apache/activecluster/group/
activecluster/src/java/org/apache/activecluster/impl/ activeio/ active...
Modified: incubator/activemq/trunk/openwire-cpp/src/io/BinaryWriter.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/io/BinaryWriter.hpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/io/BinaryWriter.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/io/BinaryWriter.hpp Tue Feb 21 15:28:33 2006
@@ -1,70 +1,70 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef BinaryWriter_hpp_
-#define BinaryWriter_hpp_
-
-#include "util/Endian.hpp"
-#include "io/IWriter.hpp"
-#include "util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace client
- {
- namespace io
- {
- using namespace ifr;
-
-/*
- * The BinaryWriter class writes primitive C++ data types to an
- * underlying output stream in a Java compatible way. Strings
- * are written as raw bytes, no character encoding is performed.
- *
- * All numeric data types are written in big endian (network byte
- * order) and if the platform is little endian they are converted
- * automatically.
- *
- * Should any error occur an IOException will be thrown.
- */
-class BinaryWriter : public IWriter
-{
-public:
- BinaryWriter() ;
- virtual ~BinaryWriter() ;
-
- virtual void close() throw(IOException) = 0 ;
- virtual void flush() throw(IOException) = 0 ;
- virtual int write(char* buffer, int size) throw(IOException) = 0 ;
- virtual void writeByte(char v) throw(IOException) ;
- virtual void writeBoolean(bool v) throw(IOException) ;
- virtual void writeDouble(double v) throw(IOException) ;
- virtual void writeFloat(float v) throw(IOException) ;
- virtual void writeShort(short v) throw(IOException) ;
- virtual void writeInt(int v) throw(IOException) ;
- virtual void writeLong(long long v) throw(IOException) ;
- virtual void writeString(p<string> v) throw(IOException) ;
-} ;
-
-/* namespace */
- }
- }
- }
-}
-
-#endif /*BinaryWriter_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef BinaryWriter_hpp_
+#define BinaryWriter_hpp_
+
+#include "util/Endian.hpp"
+#include "io/IWriter.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace client
+ {
+ namespace io
+ {
+ using namespace ifr;
+
+/*
+ * The BinaryWriter class writes primitive C++ data types to an
+ * underlying output stream in a Java compatible way. Strings
+ * are written as raw bytes, no character encoding is performed.
+ *
+ * All numeric data types are written in big endian (network byte
+ * order) and if the platform is little endian they are converted
+ * automatically.
+ *
+ * Should any error occur an IOException will be thrown.
+ */
+class BinaryWriter : public IWriter
+{
+public:
+ BinaryWriter() ;
+ virtual ~BinaryWriter() ;
+
+ virtual void close() throw(IOException) = 0 ;
+ virtual void flush() throw(IOException) = 0 ;
+ virtual int write(char* buffer, int size) throw(IOException) = 0 ;
+ virtual void writeByte(char v) throw(IOException) ;
+ virtual void writeBoolean(bool v) throw(IOException) ;
+ virtual void writeDouble(double v) throw(IOException) ;
+ virtual void writeFloat(float v) throw(IOException) ;
+ virtual void writeShort(short v) throw(IOException) ;
+ virtual void writeInt(int v) throw(IOException) ;
+ virtual void writeLong(long long v) throw(IOException) ;
+ virtual void writeString(p<string> v) throw(IOException) ;
+} ;
+
+/* namespace */
+ }
+ }
+ }
+}
+
+#endif /*BinaryWriter_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/io/BinaryWriter.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/io/IOException.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/io/IOException.hpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/io/IOException.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/io/IOException.hpp Tue Feb 21 15:28:33 2006
@@ -1,52 +1,52 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef IOException_hpp_
-#define IOException_hpp_
-
-#include "TraceException.hpp"
-
-namespace apache
-{
- namespace activemq
- {
- namespace client
- {
- namespace io
- {
- using namespace std ;
-
-/*
- * Signals that an I/O exception of some sort has occurred.
- */
-class IOException : public TraceException
-{
-public:
- IOException() : TraceException()
- { /* no-op */ } ;
- IOException(const char *const& msg) : TraceException(msg)
- { /* no-op */ } ;
- IOException(const char* fileName, int lineNo, const char* msg) : TraceException(msg)
- { /* no-op */ } ;
-} ;
-
-/* namespace */
- }
- }
- }
-}
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef IOException_hpp_
+#define IOException_hpp_
+
+#include "TraceException.hpp"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace client
+ {
+ namespace io
+ {
+ using namespace std ;
+
+/*
+ * Signals that an I/O exception of some sort has occurred.
+ */
+class IOException : public TraceException
+{
+public:
+ IOException() : TraceException()
+ { /* no-op */ } ;
+ IOException(const char *const& msg) : TraceException(msg)
+ { /* no-op */ } ;
+ IOException(const char* fileName, int lineNo, const char* msg) : TraceException(msg)
+ { /* no-op */ } ;
+} ;
+
+/* namespace */
+ }
+ }
+ }
+}
+
#endif /*IOException_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/io/IOException.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/io/IReader.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/io/IReader.hpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/io/IReader.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/io/IReader.hpp Tue Feb 21 15:28:33 2006
@@ -1,68 +1,68 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef IReader_hpp_
-#define IReader_hpp_
-
-// Turn off warning message for ignored exception specification
-#ifdef _MSC_VER
-#pragma warning( disable : 4290 )
-#endif
-
-#include <string>
-#include "io/IOException.hpp"
-#include "util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace client
- {
- namespace io
- {
- using namespace std ;
- using namespace ifr ;
-
-/*
- * The IReader interface provides for reading bytes from a binary stream
- * and reconstructing from them data in any of the C++ primitive types.
- * Strings are read as raw bytes, no character decoding is performed. If
- * any byte cannot be read for any reason, an IOException is thrown.
- */
-struct IReader
-{
- virtual ~IReader() { } ; // Required for SP's
-
- virtual void close() throw(IOException) = 0 ;
- virtual int read(char* buffer, int size) throw(IOException) = 0 ;
- virtual char readByte() throw(IOException) = 0 ;
- virtual bool readBoolean() throw(IOException) = 0 ;
- virtual double readDouble() throw(IOException) = 0 ;
- virtual float readFloat() throw(IOException) = 0 ;
- virtual short readShort() throw(IOException) = 0 ;
- virtual int readInt() throw(IOException) = 0 ;
- virtual long long readLong() throw(IOException) = 0 ;
- virtual p<string> readString() throw(IOException) = 0 ;
-} ;
-
-/* namespace */
- }
- }
- }
-}
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef IReader_hpp_
+#define IReader_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <string>
+#include "io/IOException.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace client
+ {
+ namespace io
+ {
+ using namespace std ;
+ using namespace ifr ;
+
+/*
+ * The IReader interface provides for reading bytes from a binary stream
+ * and reconstructing from them data in any of the C++ primitive types.
+ * Strings are read as raw bytes, no character decoding is performed. If
+ * any byte cannot be read for any reason, an IOException is thrown.
+ */
+struct IReader
+{
+ virtual ~IReader() { } ; // Required for SP's
+
+ virtual void close() throw(IOException) = 0 ;
+ virtual int read(char* buffer, int size) throw(IOException) = 0 ;
+ virtual char readByte() throw(IOException) = 0 ;
+ virtual bool readBoolean() throw(IOException) = 0 ;
+ virtual double readDouble() throw(IOException) = 0 ;
+ virtual float readFloat() throw(IOException) = 0 ;
+ virtual short readShort() throw(IOException) = 0 ;
+ virtual int readInt() throw(IOException) = 0 ;
+ virtual long long readLong() throw(IOException) = 0 ;
+ virtual p<string> readString() throw(IOException) = 0 ;
+} ;
+
+/* namespace */
+ }
+ }
+ }
+}
+
#endif /*IReader_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/io/IReader.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/io/IWriter.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/io/IWriter.hpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/io/IWriter.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/io/IWriter.hpp Tue Feb 21 15:28:33 2006
@@ -1,70 +1,70 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef IWriter_hpp_
-#define IWriter_hpp_
-
-// Turn off warning message for ignored exception specification
-#ifdef _MSC_VER
-#pragma warning( disable : 4290 )
-#endif
-
-#include <string>
-#include "io/IOException.hpp"
-#include "util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace client
- {
- namespace io
- {
- using namespace std ;
- using namespace ifr ;
-
-/*
- * The IWriter interface provides for converting data from any of the
- * C++ primitive types to a series of bytes and writing these bytes to
- * a binary stream. Strings are written as raw bytes, no character
- * encoding is performed. If a byte cannot be written for any reason,
- * an IOException is thrown.
- */
-struct IWriter
-{
- virtual ~IWriter() { } ; // Needed for SP's
-
- virtual void close() throw(IOException) = 0 ;
- virtual void flush() throw(IOException) = 0 ;
- virtual int write(char* buffer, int size) throw(IOException) = 0 ;
- virtual void writeByte(char v) throw(IOException) = 0 ;
- virtual void writeBoolean(bool v) throw(IOException) = 0 ;
- virtual void writeDouble(double v) throw(IOException) = 0 ;
- virtual void writeFloat(float v) throw(IOException) = 0 ;
- virtual void writeShort(short v) throw(IOException) = 0 ;
- virtual void writeInt(int v) throw(IOException) = 0 ;
- virtual void writeLong(long long v) throw(IOException) = 0 ;
- virtual void writeString(p<string> v) throw(IOException) = 0 ;
-} ;
-
-/* namespace */
- }
- }
- }
-}
-
-#endif /*IWriter_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef IWriter_hpp_
+#define IWriter_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <string>
+#include "io/IOException.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace client
+ {
+ namespace io
+ {
+ using namespace std ;
+ using namespace ifr ;
+
+/*
+ * The IWriter interface provides for converting data from any of the
+ * C++ primitive types to a series of bytes and writing these bytes to
+ * a binary stream. Strings are written as raw bytes, no character
+ * encoding is performed. If a byte cannot be written for any reason,
+ * an IOException is thrown.
+ */
+struct IWriter
+{
+ virtual ~IWriter() { } ; // Needed for SP's
+
+ virtual void close() throw(IOException) = 0 ;
+ virtual void flush() throw(IOException) = 0 ;
+ virtual int write(char* buffer, int size) throw(IOException) = 0 ;
+ virtual void writeByte(char v) throw(IOException) = 0 ;
+ virtual void writeBoolean(bool v) throw(IOException) = 0 ;
+ virtual void writeDouble(double v) throw(IOException) = 0 ;
+ virtual void writeFloat(float v) throw(IOException) = 0 ;
+ virtual void writeShort(short v) throw(IOException) = 0 ;
+ virtual void writeInt(int v) throw(IOException) = 0 ;
+ virtual void writeLong(long long v) throw(IOException) = 0 ;
+ virtual void writeString(p<string> v) throw(IOException) = 0 ;
+} ;
+
+/* namespace */
+ }
+ }
+ }
+}
+
+#endif /*IWriter_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/io/IWriter.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryReader.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryReader.cpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryReader.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryReader.cpp Tue Feb 21 15:28:33 2006
@@ -1,77 +1,77 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "io/SocketBinaryReader.hpp"
-
-using namespace apache::activemq::client::io;
-
-/*
- *
- */
-SocketBinaryReader::SocketBinaryReader(apr_socket_t* socket)
-{
- this->socket = socket ;
-}
-
-/*
- *
- */
-SocketBinaryReader::~SocketBinaryReader()
-{
- // no-op
-}
-
-void SocketBinaryReader::close() throw(IOException)
-{
- // no-op
-}
-
-/*
- *
- */
-int SocketBinaryReader::read(char* buffer, int size) throw(IOException)
-{
- apr_size_t length, remaining = size ;
- apr_status_t rc ;
-
- // Loop until requested number of bytes are read
- while( remaining > 0 )
- {
- // Try to read remaining bytes
- length = remaining ;
-
- // Read some bytes from socket
- rc = apr_socket_recv(socket, buffer, &length) ;
-
- // Adjust buffer pointer and remaining number of bytes
- buffer += length ;
- remaining -= length ;
-
- // Exit on any error
- if( rc != APR_SUCCESS )
- {
- string message ;
- char buf[10] ;
-
- // Construct error message
- message.assign("Failed to read from socket. Code = ") ;
- message.append( itoa(rc, buf, 10) ) ;
-
- throw IOException(__FILE__, __LINE__, message.c_str()) ;
- }
- }
- return (int)size ;
-}
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "io/SocketBinaryReader.hpp"
+
+using namespace apache::activemq::client::io;
+
+/*
+ *
+ */
+SocketBinaryReader::SocketBinaryReader(apr_socket_t* socket)
+{
+ this->socket = socket ;
+}
+
+/*
+ *
+ */
+SocketBinaryReader::~SocketBinaryReader()
+{
+ // no-op
+}
+
+void SocketBinaryReader::close() throw(IOException)
+{
+ // no-op
+}
+
+/*
+ *
+ */
+int SocketBinaryReader::read(char* buffer, int size) throw(IOException)
+{
+ apr_size_t length, remaining = size ;
+ apr_status_t rc ;
+
+ // Loop until requested number of bytes are read
+ while( remaining > 0 )
+ {
+ // Try to read remaining bytes
+ length = remaining ;
+
+ // Read some bytes from socket
+ rc = apr_socket_recv(socket, buffer, &length) ;
+
+ // Adjust buffer pointer and remaining number of bytes
+ buffer += length ;
+ remaining -= length ;
+
+ // Exit on any error
+ if( rc != APR_SUCCESS )
+ {
+ string message ;
+ char buf[10] ;
+
+ // Construct error message
+ message.assign("Failed to read from socket. Code = ") ;
+ message.append( itoa(rc, buf, 10) ) ;
+
+ throw IOException(__FILE__, __LINE__, message.c_str()) ;
+ }
+ }
+ return (int)size ;
+}
Propchange: incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryReader.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryReader.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryReader.hpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryReader.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryReader.hpp Tue Feb 21 15:28:33 2006
@@ -1,58 +1,58 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SocketBinaryReader_hpp_
-#define SocketBinaryReader_hpp_
-
-#include <apr_network_io.h>
-#include "io/BinaryReader.hpp"
-#include "util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace client
- {
- namespace io
- {
- using namespace ifr ;
-
-/*
- * SocketBinaryReader reads primitive C++ data types from a
- * socket stream. It currently uses APR sockets for
- * platform independency.
- */
-class SocketBinaryReader : public BinaryReader
-{
-private:
- apr_socket_t* socket ;
-
-public:
- SocketBinaryReader(apr_socket_t* socket) ;
- ~SocketBinaryReader() ;
-
- virtual void close() throw(IOException) ;
- virtual int read(char* buffer, int size) throw(IOException) ;
-} ;
-
-/* namespace */
- }
- }
- }
-}
-
-#endif /*SocketBinaryReader_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef SocketBinaryReader_hpp_
+#define SocketBinaryReader_hpp_
+
+#include <apr_network_io.h>
+#include "io/BinaryReader.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace client
+ {
+ namespace io
+ {
+ using namespace ifr ;
+
+/*
+ * SocketBinaryReader reads primitive C++ data types from a
+ * socket stream. It currently uses APR sockets for
+ * platform independency.
+ */
+class SocketBinaryReader : public BinaryReader
+{
+private:
+ apr_socket_t* socket ;
+
+public:
+ SocketBinaryReader(apr_socket_t* socket) ;
+ ~SocketBinaryReader() ;
+
+ virtual void close() throw(IOException) ;
+ virtual int read(char* buffer, int size) throw(IOException) ;
+} ;
+
+/* namespace */
+ }
+ }
+ }
+}
+
+#endif /*SocketBinaryReader_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryReader.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryWriter.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryWriter.cpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryWriter.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryWriter.cpp Tue Feb 21 15:28:33 2006
@@ -1,82 +1,82 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "io/SocketBinaryWriter.hpp"
-
-using namespace apache::activemq::client::io;
-
-/*
- *
- */
-SocketBinaryWriter::SocketBinaryWriter(apr_socket_t* socket)
-{
- this->socket = socket ;
-}
-
-/*
- *
- */
-SocketBinaryWriter::~SocketBinaryWriter()
-{
- // no-op
-}
-
-void SocketBinaryWriter::close() throw(IOException)
-{
- // no-op
-}
-
-void SocketBinaryWriter::flush() throw(IOException)
-{
- // no-op
-}
-
-/*
- *
- */
-int SocketBinaryWriter::write(char* buffer, int size) throw(IOException)
-{
- apr_size_t length, remaining = size ;
- apr_status_t rc ;
-
- // Loop until requested number of bytes are read
- while( remaining > 0 )
- {
- // Try to read remaining bytes
- length = remaining ;
-
- // Write some bytes to socket
- rc = apr_socket_send(socket, buffer, &length) ;
-
- // Adjust buffer pointer and remaining number of bytes
- buffer += length ;
- remaining -= length ;
-
- // Exit on any error
- if( rc != APR_SUCCESS )
- {
- string message ;
- char buf[10] ;
-
- // Construct error message
- message.assign("Failed to write to socket. Code = ") ;
- message.append( itoa(rc, buf, 10) ) ;
-
- throw IOException(__FILE__, __LINE__, message.c_str()) ;
- }
- }
- return (int)size ;
-}
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "io/SocketBinaryWriter.hpp"
+
+using namespace apache::activemq::client::io;
+
+/*
+ *
+ */
+SocketBinaryWriter::SocketBinaryWriter(apr_socket_t* socket)
+{
+ this->socket = socket ;
+}
+
+/*
+ *
+ */
+SocketBinaryWriter::~SocketBinaryWriter()
+{
+ // no-op
+}
+
+void SocketBinaryWriter::close() throw(IOException)
+{
+ // no-op
+}
+
+void SocketBinaryWriter::flush() throw(IOException)
+{
+ // no-op
+}
+
+/*
+ *
+ */
+int SocketBinaryWriter::write(char* buffer, int size) throw(IOException)
+{
+ apr_size_t length, remaining = size ;
+ apr_status_t rc ;
+
+ // Loop until requested number of bytes are read
+ while( remaining > 0 )
+ {
+ // Try to read remaining bytes
+ length = remaining ;
+
+ // Write some bytes to socket
+ rc = apr_socket_send(socket, buffer, &length) ;
+
+ // Adjust buffer pointer and remaining number of bytes
+ buffer += length ;
+ remaining -= length ;
+
+ // Exit on any error
+ if( rc != APR_SUCCESS )
+ {
+ string message ;
+ char buf[10] ;
+
+ // Construct error message
+ message.assign("Failed to write to socket. Code = ") ;
+ message.append( itoa(rc, buf, 10) ) ;
+
+ throw IOException(__FILE__, __LINE__, message.c_str()) ;
+ }
+ }
+ return (int)size ;
+}
Propchange: incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryWriter.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryWriter.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryWriter.hpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryWriter.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryWriter.hpp Tue Feb 21 15:28:33 2006
@@ -1,59 +1,59 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SocketBinaryWriter_hpp_
-#define SocketBinaryWriter_hpp_
-
-#include <apr_network_io.h>
-#include "io/BinaryWriter.hpp"
-#include "util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace client
- {
- namespace io
- {
- using namespace ifr ;
-
-/*
- * SocketBinaryWriter writes primitive C++ data types to a
- * socket stream. It currently uses APR sockets for
- * platform independency.
- */
-class SocketBinaryWriter : public BinaryWriter
-{
-private:
- apr_socket_t* socket ;
-
-public:
- SocketBinaryWriter(apr_socket_t* socket) ;
- virtual ~SocketBinaryWriter() ;
-
- virtual void close() throw(IOException) ;
- virtual void flush() throw(IOException) ;
- virtual int write(char* buffer, int size) throw(IOException) ;
-} ;
-
-/* namespace */
- }
- }
- }
-}
-
-#endif /*SocketBinaryWriter_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef SocketBinaryWriter_hpp_
+#define SocketBinaryWriter_hpp_
+
+#include <apr_network_io.h>
+#include "io/BinaryWriter.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace client
+ {
+ namespace io
+ {
+ using namespace ifr ;
+
+/*
+ * SocketBinaryWriter writes primitive C++ data types to a
+ * socket stream. It currently uses APR sockets for
+ * platform independency.
+ */
+class SocketBinaryWriter : public BinaryWriter
+{
+private:
+ apr_socket_t* socket ;
+
+public:
+ SocketBinaryWriter(apr_socket_t* socket) ;
+ virtual ~SocketBinaryWriter() ;
+
+ virtual void close() throw(IOException) ;
+ virtual void flush() throw(IOException) ;
+ virtual int write(char* buffer, int size) throw(IOException) ;
+} ;
+
+/* namespace */
+ }
+ }
+ }
+}
+
+#endif /*SocketBinaryWriter_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryWriter.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/marshal/AbstractCommandMarshaller.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/marshal/AbstractCommandMarshaller.cpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/AbstractCommandMarshaller.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/AbstractCommandMarshaller.cpp Tue Feb 21 15:28:33 2006
@@ -1,146 +1,146 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "marshal/AbstractCommandMarshaller.hpp"
-#include "marshal/BrokerInfoMarshaller.hpp"
-#include "marshal/BrokerIdMarshaller.hpp"
-
-
-using namespace apache::activemq::client::marshal;
-
-/*
- *
- */
-AbstractCommandMarshaller::AbstractCommandMarshaller()
-{
-}
-
-AbstractCommandMarshaller::~AbstractCommandMarshaller()
-{
-}
-
-p<ICommand> AbstractCommandMarshaller::readCommand(p<BinaryReader> reader)
-{
- p<ICommand> command = createCommand() ;
- buildCommand(command, reader) ;
- return command ;
-}
-
-
-// Implementation methods -----------------------------------------------------------
-
-p<BrokerError> AbstractCommandMarshaller::readBrokerError(p<BinaryReader> reader)
-{
- p<BrokerError> error = new BrokerError() ;
- error->setExceptionClass( reader->readString()->c_str() ) ;
- error->setStackTrace( reader->readString()->c_str() ) ;
-
- return error ;
-}
-
-void AbstractCommandMarshaller::writeBrokerError(p<BrokerError> command, p<BinaryWriter> writer)
-{
- writer->writeString( command->getExceptionClass() ) ;
- writer->writeString( command->getStackTrace() ) ;
-}
-
-p<IDestination> AbstractCommandMarshaller::readDestination(p<BinaryReader> reader)
-{
- return (p<IDestination>&)CommandMarshallerRegistry::readCommand(reader) ;
-}
-
-void AbstractCommandMarshaller::writeDestination(p<IDestination> command, p<BinaryWriter> writer)
-{
- CommandMarshallerRegistry::writeCommand((p<ICommand>&)command, writer) ;
-}
-
-ap<BrokerId> AbstractCommandMarshaller::readBrokerIds(p<BinaryReader> reader)
-{
- int size = reader->readInt() ;
- p<BrokerIdMarshaller> marshaller = CommandMarshallerRegistry::getBrokerIdMarshaller() ;
-
- ap<BrokerId> brokerIds (size);
- for( int i = 0; i < size; i++ )
- brokerIds[i] = (p<BrokerId>&)marshaller->readCommand(reader) ;
-
- return brokerIds ;
-}
-
-void AbstractCommandMarshaller::writeBrokerIds(ap<BrokerId> commands, p<BinaryWriter> writer)
-{
- int size = (int)commands.size() ;
- p<BrokerIdMarshaller> marshaller = CommandMarshallerRegistry::getBrokerIdMarshaller() ;
-
- writer->writeInt(size) ;
- for( int i = 0; i < size; i++ )
- marshaller->writeCommand(commands[i], writer) ;
-}
-
-ap<BrokerInfo> AbstractCommandMarshaller::readBrokerInfos(p<BinaryReader> reader)
-{
- int size = reader->readInt() ;
- p<BrokerInfoMarshaller> marshaller = CommandMarshallerRegistry::getBrokerInfoMarshaller() ;
-
- ap<BrokerInfo> brokerInfos (size) ;
- for( int i = 0; i < size; i++ )
- brokerInfos[i] = (p<BrokerInfo>&)marshaller->readCommand(reader) ;
-
- return brokerInfos ;
-}
-
-void AbstractCommandMarshaller::writeBrokerInfos(ap<BrokerInfo> commands, p<BinaryWriter> writer)
-{
- int size = (int)commands.size() ;
- p<BrokerInfoMarshaller> marshaller = CommandMarshallerRegistry::getBrokerInfoMarshaller() ;
-
- writer->writeInt(size) ;
- for( int i = 0; i < size; i++ )
- marshaller->writeCommand((p<ICommand>&)commands[i], writer);
-}
-
-ap<IDataStructure> AbstractCommandMarshaller::readDataStructures(p<BinaryReader> reader)
-{
- int size = reader->readInt() ;
-
- ap<IDataStructure> dataStructs (size) ;
- for( int i = 0; i < size; i++ )
- dataStructs[i] = (p<IDataStructure>&)CommandMarshallerRegistry::readCommand(reader) ;
-
- return dataStructs ;
-}
-
-void AbstractCommandMarshaller::writeDataStructures(ap<IDataStructure> commands, p<BinaryWriter> writer)
-{
- int size = (int)commands.size() ;
-
- writer->writeInt(size) ;
- for( int i = 0; i < size; i++ )
- CommandMarshallerRegistry::writeCommand((p<ICommand>&)commands[i], writer) ;
-}
-
-char* AbstractCommandMarshaller::readBytes(p<BinaryReader> reader)
-{
- int size = reader->readInt() ;
- char* buffer = new char[size];
- reader->read(buffer, size) ;
- return buffer ;
-}
-
-void AbstractCommandMarshaller::writeBytes(char* buffer, int size, p<BinaryWriter> writer)
-{
- writer->writeInt(size) ;
- writer->write(buffer, size) ;
-}
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "marshal/AbstractCommandMarshaller.hpp"
+#include "marshal/BrokerInfoMarshaller.hpp"
+#include "marshal/BrokerIdMarshaller.hpp"
+
+
+using namespace apache::activemq::client::marshal;
+
+/*
+ *
+ */
+AbstractCommandMarshaller::AbstractCommandMarshaller()
+{
+}
+
+AbstractCommandMarshaller::~AbstractCommandMarshaller()
+{
+}
+
+p<ICommand> AbstractCommandMarshaller::readCommand(p<BinaryReader> reader)
+{
+ p<ICommand> command = createCommand() ;
+ buildCommand(command, reader) ;
+ return command ;
+}
+
+
+// Implementation methods -----------------------------------------------------------
+
+p<BrokerError> AbstractCommandMarshaller::readBrokerError(p<BinaryReader> reader)
+{
+ p<BrokerError> error = new BrokerError() ;
+ error->setExceptionClass( reader->readString()->c_str() ) ;
+ error->setStackTrace( reader->readString()->c_str() ) ;
+
+ return error ;
+}
+
+void AbstractCommandMarshaller::writeBrokerError(p<BrokerError> command, p<BinaryWriter> writer)
+{
+ writer->writeString( command->getExceptionClass() ) ;
+ writer->writeString( command->getStackTrace() ) ;
+}
+
+p<IDestination> AbstractCommandMarshaller::readDestination(p<BinaryReader> reader)
+{
+ return (p<IDestination>&)CommandMarshallerRegistry::readCommand(reader) ;
+}
+
+void AbstractCommandMarshaller::writeDestination(p<IDestination> command, p<BinaryWriter> writer)
+{
+ CommandMarshallerRegistry::writeCommand((p<ICommand>&)command, writer) ;
+}
+
+ap<BrokerId> AbstractCommandMarshaller::readBrokerIds(p<BinaryReader> reader)
+{
+ int size = reader->readInt() ;
+ p<BrokerIdMarshaller> marshaller = CommandMarshallerRegistry::getBrokerIdMarshaller() ;
+
+ ap<BrokerId> brokerIds (size);
+ for( int i = 0; i < size; i++ )
+ brokerIds[i] = (p<BrokerId>&)marshaller->readCommand(reader) ;
+
+ return brokerIds ;
+}
+
+void AbstractCommandMarshaller::writeBrokerIds(ap<BrokerId> commands, p<BinaryWriter> writer)
+{
+ int size = (int)commands.size() ;
+ p<BrokerIdMarshaller> marshaller = CommandMarshallerRegistry::getBrokerIdMarshaller() ;
+
+ writer->writeInt(size) ;
+ for( int i = 0; i < size; i++ )
+ marshaller->writeCommand(commands[i], writer) ;
+}
+
+ap<BrokerInfo> AbstractCommandMarshaller::readBrokerInfos(p<BinaryReader> reader)
+{
+ int size = reader->readInt() ;
+ p<BrokerInfoMarshaller> marshaller = CommandMarshallerRegistry::getBrokerInfoMarshaller() ;
+
+ ap<BrokerInfo> brokerInfos (size) ;
+ for( int i = 0; i < size; i++ )
+ brokerInfos[i] = (p<BrokerInfo>&)marshaller->readCommand(reader) ;
+
+ return brokerInfos ;
+}
+
+void AbstractCommandMarshaller::writeBrokerInfos(ap<BrokerInfo> commands, p<BinaryWriter> writer)
+{
+ int size = (int)commands.size() ;
+ p<BrokerInfoMarshaller> marshaller = CommandMarshallerRegistry::getBrokerInfoMarshaller() ;
+
+ writer->writeInt(size) ;
+ for( int i = 0; i < size; i++ )
+ marshaller->writeCommand((p<ICommand>&)commands[i], writer);
+}
+
+ap<IDataStructure> AbstractCommandMarshaller::readDataStructures(p<BinaryReader> reader)
+{
+ int size = reader->readInt() ;
+
+ ap<IDataStructure> dataStructs (size) ;
+ for( int i = 0; i < size; i++ )
+ dataStructs[i] = (p<IDataStructure>&)CommandMarshallerRegistry::readCommand(reader) ;
+
+ return dataStructs ;
+}
+
+void AbstractCommandMarshaller::writeDataStructures(ap<IDataStructure> commands, p<BinaryWriter> writer)
+{
+ int size = (int)commands.size() ;
+
+ writer->writeInt(size) ;
+ for( int i = 0; i < size; i++ )
+ CommandMarshallerRegistry::writeCommand((p<ICommand>&)commands[i], writer) ;
+}
+
+char* AbstractCommandMarshaller::readBytes(p<BinaryReader> reader)
+{
+ int size = reader->readInt() ;
+ char* buffer = new char[size];
+ reader->read(buffer, size) ;
+ return buffer ;
+}
+
+void AbstractCommandMarshaller::writeBytes(char* buffer, int size, p<BinaryWriter> writer)
+{
+ writer->writeInt(size) ;
+ writer->write(buffer, size) ;
+}
Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/AbstractCommandMarshaller.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/marshal/AbstractCommandMarshaller.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/marshal/AbstractCommandMarshaller.hpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/AbstractCommandMarshaller.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/AbstractCommandMarshaller.hpp Tue Feb 21 15:28:33 2006
@@ -1,81 +1,81 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef AbstractCommandMarshaller_hpp_
-#define AbstractCommandMarshaller_hpp_
-
-#include "IDestination.hpp"
-#include "BrokerError.hpp"
-#include "command/ICommand.hpp"
-#include "command/IDataStructure.hpp"
-#include "command/BrokerInfo.hpp"
-#include "command/BrokerId.hpp"
-#include "io/BinaryReader.hpp"
-#include "io/BinaryWriter.hpp"
-#include "marshal/CommandMarshallerRegistry.hpp"
-#include "util/ifr/p"
-#include "util/ifr/ap"
-
-namespace apache
-{
- namespace activemq
- {
- namespace client
- {
- namespace marshal
- {
- using namespace ifr ;
- using namespace std ;
- using namespace apache::activemq::client;
- using namespace apache::activemq::client::command;
- using namespace apache::activemq::client::io;
-
-/*
- *
- */
-class AbstractCommandMarshaller
-{
-public:
- AbstractCommandMarshaller() ;
- virtual ~AbstractCommandMarshaller() ;
-
- virtual p<ICommand> createCommand() = 0 ;
- virtual p<ICommand> readCommand(p<BinaryReader> reader) ;
- virtual void buildCommand(p<ICommand> command, p<BinaryReader> reader) = 0 ;
- virtual void writeCommand(p<ICommand> command, p<BinaryWriter> writer) = 0 ;
-
-protected:
- virtual p<BrokerError> readBrokerError(p<BinaryReader> reader) ;
- virtual void writeBrokerError(p<BrokerError> command, p<BinaryWriter> writer) ;
- virtual p<IDestination> readDestination(p<BinaryReader> reader) ;
- virtual void writeDestination(p<IDestination> command, p<BinaryWriter> writer) ;
- virtual ap<BrokerId> readBrokerIds(p<BinaryReader> reader) ;
- virtual void writeBrokerIds(ap<BrokerId> commands, p<BinaryWriter> writer) ;
- virtual ap<BrokerInfo> readBrokerInfos(p<BinaryReader> reader) ;
- virtual void writeBrokerInfos(ap<BrokerInfo> commands, p<BinaryWriter> writer) ;
- virtual ap<IDataStructure> readDataStructures(p<BinaryReader> reader) ;
- virtual void writeDataStructures(ap<IDataStructure> commands, p<BinaryWriter> writer) ;
- virtual char* readBytes(p<BinaryReader> reader) ;
- virtual void writeBytes(char* buffer, int size, p<BinaryWriter> writer) ;
-} ;
-
-/* namespace */
- }
- }
- }
-}
-
-#endif /*AbstractCommandMarshaller_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef AbstractCommandMarshaller_hpp_
+#define AbstractCommandMarshaller_hpp_
+
+#include "IDestination.hpp"
+#include "BrokerError.hpp"
+#include "command/ICommand.hpp"
+#include "command/IDataStructure.hpp"
+#include "command/BrokerInfo.hpp"
+#include "command/BrokerId.hpp"
+#include "io/BinaryReader.hpp"
+#include "io/BinaryWriter.hpp"
+#include "marshal/CommandMarshallerRegistry.hpp"
+#include "util/ifr/p"
+#include "util/ifr/ap"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace client
+ {
+ namespace marshal
+ {
+ using namespace ifr ;
+ using namespace std ;
+ using namespace apache::activemq::client;
+ using namespace apache::activemq::client::command;
+ using namespace apache::activemq::client::io;
+
+/*
+ *
+ */
+class AbstractCommandMarshaller
+{
+public:
+ AbstractCommandMarshaller() ;
+ virtual ~AbstractCommandMarshaller() ;
+
+ virtual p<ICommand> createCommand() = 0 ;
+ virtual p<ICommand> readCommand(p<BinaryReader> reader) ;
+ virtual void buildCommand(p<ICommand> command, p<BinaryReader> reader) = 0 ;
+ virtual void writeCommand(p<ICommand> command, p<BinaryWriter> writer) = 0 ;
+
+protected:
+ virtual p<BrokerError> readBrokerError(p<BinaryReader> reader) ;
+ virtual void writeBrokerError(p<BrokerError> command, p<BinaryWriter> writer) ;
+ virtual p<IDestination> readDestination(p<BinaryReader> reader) ;
+ virtual void writeDestination(p<IDestination> command, p<BinaryWriter> writer) ;
+ virtual ap<BrokerId> readBrokerIds(p<BinaryReader> reader) ;
+ virtual void writeBrokerIds(ap<BrokerId> commands, p<BinaryWriter> writer) ;
+ virtual ap<BrokerInfo> readBrokerInfos(p<BinaryReader> reader) ;
+ virtual void writeBrokerInfos(ap<BrokerInfo> commands, p<BinaryWriter> writer) ;
+ virtual ap<IDataStructure> readDataStructures(p<BinaryReader> reader) ;
+ virtual void writeDataStructures(ap<IDataStructure> commands, p<BinaryWriter> writer) ;
+ virtual char* readBytes(p<BinaryReader> reader) ;
+ virtual void writeBytes(char* buffer, int size, p<BinaryWriter> writer) ;
+} ;
+
+/* namespace */
+ }
+ }
+ }
+}
+
+#endif /*AbstractCommandMarshaller_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/AbstractCommandMarshaller.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerIdMarshaller.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerIdMarshaller.cpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerIdMarshaller.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerIdMarshaller.cpp Tue Feb 21 15:28:33 2006
@@ -1,53 +1,53 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "marshal/BrokerIdMarshaller.hpp"
-
-using namespace apache::activemq::client::marshal;
-
-/*
- *
- */
-BrokerIdMarshaller::BrokerIdMarshaller()
-{
- // no-op
-}
-
-BrokerIdMarshaller::~BrokerIdMarshaller()
-{
- // no-op
-}
-
-p<ICommand> BrokerIdMarshaller::createCommand()
-{
- return new BrokerId() ;
-}
-
-void BrokerIdMarshaller::buildCommand(p<ICommand> command, p<BinaryReader> reader)
-{
- //AbstractCommandMarshaller::buildCommand(command, reader) ;
-
- p<BrokerId> brokerId = (p<BrokerId>&)command ;
- brokerId->setValue( reader->readString()->c_str() ) ;
-}
-
-void BrokerIdMarshaller::writeCommand(p<ICommand> command, p<BinaryWriter> writer)
-{
- //AbstractCommandMarshaller::writeCommand(command, writer) ;
-
- p<BrokerId> brokerId = (p<BrokerId>&)command ;
- writer->writeString( brokerId->getValue() ) ;
-}
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "marshal/BrokerIdMarshaller.hpp"
+
+using namespace apache::activemq::client::marshal;
+
+/*
+ *
+ */
+BrokerIdMarshaller::BrokerIdMarshaller()
+{
+ // no-op
+}
+
+BrokerIdMarshaller::~BrokerIdMarshaller()
+{
+ // no-op
+}
+
+p<ICommand> BrokerIdMarshaller::createCommand()
+{
+ return new BrokerId() ;
+}
+
+void BrokerIdMarshaller::buildCommand(p<ICommand> command, p<BinaryReader> reader)
+{
+ //AbstractCommandMarshaller::buildCommand(command, reader) ;
+
+ p<BrokerId> brokerId = (p<BrokerId>&)command ;
+ brokerId->setValue( reader->readString()->c_str() ) ;
+}
+
+void BrokerIdMarshaller::writeCommand(p<ICommand> command, p<BinaryWriter> writer)
+{
+ //AbstractCommandMarshaller::writeCommand(command, writer) ;
+
+ p<BrokerId> brokerId = (p<BrokerId>&)command ;
+ writer->writeString( brokerId->getValue() ) ;
+}
Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerIdMarshaller.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerIdMarshaller.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerIdMarshaller.hpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerIdMarshaller.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerIdMarshaller.hpp Tue Feb 21 15:28:33 2006
@@ -1,59 +1,59 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef BrokerIdMarshaller_hpp_
-#define BrokerIdMarshaller_hpp_
-
-#include "command/ICommand.hpp"
-#include "command/BrokerId.hpp"
-#include "io/BinaryReader.hpp"
-#include "io/BinaryWriter.hpp"
-#include "marshal/AbstractCommandMarshaller.hpp"
-#include "util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace client
- {
- namespace marshal
- {
- using namespace ifr ;
- using namespace apache::activemq::client::command;
- using namespace apache::activemq::client::io;
-
-/*
- *
- */
-class BrokerIdMarshaller : public AbstractCommandMarshaller
-{
-public:
- BrokerIdMarshaller() ;
- virtual ~BrokerIdMarshaller() ;
-
- virtual p<ICommand> createCommand() ;
- virtual void buildCommand(p<ICommand> command, p<BinaryReader> reader) ;
- virtual void writeCommand(p<ICommand> command, p<BinaryWriter> writer) ;
-} ;
-
-/* namespace */
- }
- }
- }
-}
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef BrokerIdMarshaller_hpp_
+#define BrokerIdMarshaller_hpp_
+
+#include "command/ICommand.hpp"
+#include "command/BrokerId.hpp"
+#include "io/BinaryReader.hpp"
+#include "io/BinaryWriter.hpp"
+#include "marshal/AbstractCommandMarshaller.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace client
+ {
+ namespace marshal
+ {
+ using namespace ifr ;
+ using namespace apache::activemq::client::command;
+ using namespace apache::activemq::client::io;
+
+/*
+ *
+ */
+class BrokerIdMarshaller : public AbstractCommandMarshaller
+{
+public:
+ BrokerIdMarshaller() ;
+ virtual ~BrokerIdMarshaller() ;
+
+ virtual p<ICommand> createCommand() ;
+ virtual void buildCommand(p<ICommand> command, p<BinaryReader> reader) ;
+ virtual void writeCommand(p<ICommand> command, p<BinaryWriter> writer) ;
+} ;
+
+/* namespace */
+ }
+ }
+ }
+}
+
#endif /*BrokerIdMarshaller_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerIdMarshaller.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerInfoMarshaller.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerInfoMarshaller.cpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerInfoMarshaller.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerInfoMarshaller.cpp Tue Feb 21 15:28:33 2006
@@ -1,59 +1,59 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "marshal/BrokerInfoMarshaller.hpp"
-
-using namespace apache::activemq::client::marshal;
-
-/*
- *
- */
-BrokerInfoMarshaller::BrokerInfoMarshaller()
-{
- // no-op
-}
-
-BrokerInfoMarshaller::~BrokerInfoMarshaller()
-{
- // no-op
-}
-
-p<ICommand> BrokerInfoMarshaller::createCommand()
-{
- return new BrokerInfo() ;
-}
-
-void BrokerInfoMarshaller::buildCommand(p<ICommand> command, p<BinaryReader> reader)
-{
- //AbstractCommandMarshaller::buildCommand(command, reader) ;
-
- p<BrokerInfo> brokerInfo = (p<BrokerInfo>&)command ;
- brokerInfo->setBrokerId( (p<BrokerId>&)CommandMarshallerRegistry::getBrokerInfoMarshaller()->readCommand(reader) ) ;
- brokerInfo->setBrokerURL( reader->readString()->c_str() ) ;
- brokerInfo->setPeerBrokerInfo( AbstractCommandMarshaller::readBrokerInfos(reader) ) ;
- brokerInfo->setBrokerName( reader->readString()->c_str() ) ;
-}
-
-void BrokerInfoMarshaller::writeCommand(p<ICommand> command, p<BinaryWriter> writer)
-{
- //AbstractCommandMarshaller::writeCommand(command, writer) ;
-
- p<BrokerInfo> brokerInfo = (p<BrokerInfo>&)command ;
- CommandMarshallerRegistry::getBrokerInfoMarshaller()->writeCommand(brokerInfo->getBrokerId(), writer) ;
- writer->writeString( brokerInfo->getBrokerURL() ) ;
- AbstractCommandMarshaller::writeBrokerInfos( brokerInfo->getPeerBrokerInfo(), writer) ;
- writer->writeString( brokerInfo->getBrokerName() ) ;
-}
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "marshal/BrokerInfoMarshaller.hpp"
+
+using namespace apache::activemq::client::marshal;
+
+/*
+ *
+ */
+BrokerInfoMarshaller::BrokerInfoMarshaller()
+{
+ // no-op
+}
+
+BrokerInfoMarshaller::~BrokerInfoMarshaller()
+{
+ // no-op
+}
+
+p<ICommand> BrokerInfoMarshaller::createCommand()
+{
+ return new BrokerInfo() ;
+}
+
+void BrokerInfoMarshaller::buildCommand(p<ICommand> command, p<BinaryReader> reader)
+{
+ //AbstractCommandMarshaller::buildCommand(command, reader) ;
+
+ p<BrokerInfo> brokerInfo = (p<BrokerInfo>&)command ;
+ brokerInfo->setBrokerId( (p<BrokerId>&)CommandMarshallerRegistry::getBrokerInfoMarshaller()->readCommand(reader) ) ;
+ brokerInfo->setBrokerURL( reader->readString()->c_str() ) ;
+ brokerInfo->setPeerBrokerInfo( AbstractCommandMarshaller::readBrokerInfos(reader) ) ;
+ brokerInfo->setBrokerName( reader->readString()->c_str() ) ;
+}
+
+void BrokerInfoMarshaller::writeCommand(p<ICommand> command, p<BinaryWriter> writer)
+{
+ //AbstractCommandMarshaller::writeCommand(command, writer) ;
+
+ p<BrokerInfo> brokerInfo = (p<BrokerInfo>&)command ;
+ CommandMarshallerRegistry::getBrokerInfoMarshaller()->writeCommand(brokerInfo->getBrokerId(), writer) ;
+ writer->writeString( brokerInfo->getBrokerURL() ) ;
+ AbstractCommandMarshaller::writeBrokerInfos( brokerInfo->getPeerBrokerInfo(), writer) ;
+ writer->writeString( brokerInfo->getBrokerName() ) ;
+}
Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerInfoMarshaller.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerInfoMarshaller.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerInfoMarshaller.hpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerInfoMarshaller.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerInfoMarshaller.hpp Tue Feb 21 15:28:33 2006
@@ -1,60 +1,60 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef BrokerInfoMarshaller_hpp_
-#define BrokerInfoMarshaller_hpp_
-
-#include <string>
-#include "command/ICommand.hpp"
-#include "command/BrokerInfo.hpp"
-#include "io/BinaryReader.hpp"
-#include "io/BinaryWriter.hpp"
-#include "marshal/AbstractCommandMarshaller.hpp"
-#include "util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace client
- {
- namespace marshal
- {
- using namespace ifr ;
- using namespace apache::activemq::client::command;
- using namespace apache::activemq::client::io;
-
-/*
- *
- */
-class BrokerInfoMarshaller : public AbstractCommandMarshaller
-{
-public:
- BrokerInfoMarshaller() ;
- virtual ~BrokerInfoMarshaller() ;
-
- virtual p<ICommand> createCommand() ;
- virtual void buildCommand(p<ICommand> command, p<BinaryReader> reader) ;
- virtual void writeCommand(p<ICommand> command, p<BinaryWriter> writer) ;
-} ;
-
-/* namespace */
- }
- }
- }
-}
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef BrokerInfoMarshaller_hpp_
+#define BrokerInfoMarshaller_hpp_
+
+#include <string>
+#include "command/ICommand.hpp"
+#include "command/BrokerInfo.hpp"
+#include "io/BinaryReader.hpp"
+#include "io/BinaryWriter.hpp"
+#include "marshal/AbstractCommandMarshaller.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace client
+ {
+ namespace marshal
+ {
+ using namespace ifr ;
+ using namespace apache::activemq::client::command;
+ using namespace apache::activemq::client::io;
+
+/*
+ *
+ */
+class BrokerInfoMarshaller : public AbstractCommandMarshaller
+{
+public:
+ BrokerInfoMarshaller() ;
+ virtual ~BrokerInfoMarshaller() ;
+
+ virtual p<ICommand> createCommand() ;
+ virtual void buildCommand(p<ICommand> command, p<BinaryReader> reader) ;
+ virtual void writeCommand(p<ICommand> command, p<BinaryWriter> writer) ;
+} ;
+
+/* namespace */
+ }
+ }
+ }
+}
+
#endif /*BrokerInfoMarshaller_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerInfoMarshaller.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/marshal/CommandMarshallerRegistry.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/marshal/CommandMarshallerRegistry.cpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/CommandMarshallerRegistry.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/CommandMarshallerRegistry.cpp Tue Feb 21 15:28:33 2006
@@ -1,79 +1,79 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "marshal/CommandMarshallerRegistry.hpp"
-#include "marshal/BrokerInfoMarshaller.hpp"
-#include "marshal/BrokerIdMarshaller.hpp"
-
-using namespace apache::activemq::client::marshal;
-
-
-// --- Static initialization ----------------------------------------
-
-p<BrokerInfoMarshaller> CommandMarshallerRegistry::brokerInfo = new BrokerInfoMarshaller() ;
-p<BrokerIdMarshaller> CommandMarshallerRegistry::brokerId = new BrokerIdMarshaller() ;
-
-
-// --- Constructors -------------------------------------------------
-
-/*
- *
- */
-CommandMarshallerRegistry::CommandMarshallerRegistry()
-{
- // no-op
-}
-
-/*
- *
- */
-CommandMarshallerRegistry::~CommandMarshallerRegistry()
-{
- // no-op
-}
-
-
-// --- Attribute methods --------------------------------------------
-
-
-// --- Operation methods --------------------------------------------
-
-/*
- *
- */
-p<ICommand> CommandMarshallerRegistry::readCommand(p<BinaryReader> reader)
-{
- // TODO
- return NULL ;
-}
-
-/*
- *
- */
-void CommandMarshallerRegistry::writeCommand(p<ICommand> command, p<BinaryWriter> writer)
-{
- // TODO
-}
-
-p<BrokerInfoMarshaller> CommandMarshallerRegistry::getBrokerInfoMarshaller()
-{
- return brokerInfo ;
-}
-
-p<BrokerIdMarshaller> CommandMarshallerRegistry::getBrokerIdMarshaller()
-{
- return brokerId ;
-}
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "marshal/CommandMarshallerRegistry.hpp"
+#include "marshal/BrokerInfoMarshaller.hpp"
+#include "marshal/BrokerIdMarshaller.hpp"
+
+using namespace apache::activemq::client::marshal;
+
+
+// --- Static initialization ----------------------------------------
+
+p<BrokerInfoMarshaller> CommandMarshallerRegistry::brokerInfo = new BrokerInfoMarshaller() ;
+p<BrokerIdMarshaller> CommandMarshallerRegistry::brokerId = new BrokerIdMarshaller() ;
+
+
+// --- Constructors -------------------------------------------------
+
+/*
+ *
+ */
+CommandMarshallerRegistry::CommandMarshallerRegistry()
+{
+ // no-op
+}
+
+/*
+ *
+ */
+CommandMarshallerRegistry::~CommandMarshallerRegistry()
+{
+ // no-op
+}
+
+
+// --- Attribute methods --------------------------------------------
+
+
+// --- Operation methods --------------------------------------------
+
+/*
+ *
+ */
+p<ICommand> CommandMarshallerRegistry::readCommand(p<BinaryReader> reader)
+{
+ // TODO
+ return NULL ;
+}
+
+/*
+ *
+ */
+void CommandMarshallerRegistry::writeCommand(p<ICommand> command, p<BinaryWriter> writer)
+{
+ // TODO
+}
+
+p<BrokerInfoMarshaller> CommandMarshallerRegistry::getBrokerInfoMarshaller()
+{
+ return brokerInfo ;
+}
+
+p<BrokerIdMarshaller> CommandMarshallerRegistry::getBrokerIdMarshaller()
+{
+ return brokerId ;
+}
Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/CommandMarshallerRegistry.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/marshal/CommandMarshallerRegistry.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/marshal/CommandMarshallerRegistry.hpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/CommandMarshallerRegistry.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/CommandMarshallerRegistry.hpp Tue Feb 21 15:28:33 2006
@@ -1,64 +1,64 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef CommandMarshallerRegistry_hpp_
-#define CommandMarshallerRegistry_hpp_
-
-#include "command/ICommand.hpp"
-#include "io/BinaryReader.hpp"
-#include "io/BinaryWriter.hpp"
-#include "util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace client
- {
- namespace marshal
- {
- using namespace ifr ;
- using namespace apache::activemq::client::io;
- using namespace apache::activemq::client::command;
- class BrokerInfoMarshaller;
- class BrokerIdMarshaller;
-
-/*
- *
- */
-class CommandMarshallerRegistry
-{
-private:
- static p<BrokerInfoMarshaller> brokerInfo ;
- static p<BrokerIdMarshaller> brokerId ;
-
- CommandMarshallerRegistry() ;
- virtual ~CommandMarshallerRegistry() ;
-
-public:
- static p<ICommand> readCommand(p<BinaryReader> reader) ;
- static void writeCommand(p<ICommand> command, p<BinaryWriter> writer) ;
- static p<BrokerInfoMarshaller> getBrokerInfoMarshaller() ;
- static p<BrokerIdMarshaller> getBrokerIdMarshaller() ;
-} ;
-
-/* namespace */
- }
- }
- }
-}
-
-#endif /*CommandMarshallerRegistry_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef CommandMarshallerRegistry_hpp_
+#define CommandMarshallerRegistry_hpp_
+
+#include "command/ICommand.hpp"
+#include "io/BinaryReader.hpp"
+#include "io/BinaryWriter.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace client
+ {
+ namespace marshal
+ {
+ using namespace ifr ;
+ using namespace apache::activemq::client::io;
+ using namespace apache::activemq::client::command;
+ class BrokerInfoMarshaller;
+ class BrokerIdMarshaller;
+
+/*
+ *
+ */
+class CommandMarshallerRegistry
+{
+private:
+ static p<BrokerInfoMarshaller> brokerInfo ;
+ static p<BrokerIdMarshaller> brokerId ;
+
+ CommandMarshallerRegistry() ;
+ virtual ~CommandMarshallerRegistry() ;
+
+public:
+ static p<ICommand> readCommand(p<BinaryReader> reader) ;
+ static void writeCommand(p<ICommand> command, p<BinaryWriter> writer) ;
+ static p<BrokerInfoMarshaller> getBrokerInfoMarshaller() ;
+ static p<BrokerIdMarshaller> getBrokerIdMarshaller() ;
+} ;
+
+/* namespace */
+ }
+ }
+ }
+}
+
+#endif /*CommandMarshallerRegistry_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/CommandMarshallerRegistry.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/transport/ITransport.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/transport/ITransport.hpp?rev=379623&r1=379622&r2=379623&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/transport/ITransport.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/transport/ITransport.hpp Tue Feb 21 15:28:33 2006
@@ -1,52 +1,52 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ITransport_hpp_
-#define ITransport_hpp_
-
-#include "command/ICommand.hpp"
-#include "command/Response.hpp"
-#include "FutureResponse.hpp"
-#include "util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace client
- {
- namespace transport
- {
- using namespace ifr ;
- using namespace apache::activemq::client::command;
-
-/*
- * Represents the logical networking transport layer
- */
-struct ITransport
-{
- virtual void oneway(p<ICommand> command) = 0 ;
- virtual p<FutureResponse> asyncRequest(p<ICommand> command) = 0 ;
- virtual p<Response> request(p<ICommand> command) = 0 ;
-} ;
-
-/* namespace */
- }
- }
- }
-}
-
-#endif /*ITransport_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef ITransport_hpp_
+#define ITransport_hpp_
+
+#include "command/ICommand.hpp"
+#include "command/Response.hpp"
+#include "FutureResponse.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace client
+ {
+ namespace transport
+ {
+ using namespace ifr ;
+ using namespace apache::activemq::client::command;
+
+/*
+ * Represents the logical networking transport layer
+ */
+struct ITransport
+{
+ virtual void oneway(p<ICommand> command) = 0 ;
+ virtual p<FutureResponse> asyncRequest(p<ICommand> command) = 0 ;
+ virtual p<Response> request(p<ICommand> command) = 0 ;
+} ;
+
+/* namespace */
+ }
+ }
+ }
+}
+
+#endif /*ITransport_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/transport/ITransport.hpp
------------------------------------------------------------------------------
svn:eol-style = native