activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r384894 - in /incubator/activemq/trunk/openwire-cpp/src: command/ marshal/
Date Fri, 10 Mar 2006 19:06:55 GMT
Author: jstrachan
Date: Fri Mar 10 11:06:53 2006
New Revision: 384894

URL: http://svn.apache.org/viewcvs?rev=384894&view=rev
Log:
Refactored the PartialCommand to make it simpler and make LastPartialCommand not contain binary
data

Modified:
    incubator/activemq/trunk/openwire-cpp/src/command/LastPartialCommand.hpp
    incubator/activemq/trunk/openwire-cpp/src/command/PartialCommand.cpp
    incubator/activemq/trunk/openwire-cpp/src/command/PartialCommand.hpp
    incubator/activemq/trunk/openwire-cpp/src/marshal/LastPartialCommandMarshaller.hpp
    incubator/activemq/trunk/openwire-cpp/src/marshal/PartialCommandMarshaller.cpp
    incubator/activemq/trunk/openwire-cpp/src/marshal/PartialCommandMarshaller.hpp

Modified: incubator/activemq/trunk/openwire-cpp/src/command/LastPartialCommand.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/command/LastPartialCommand.hpp?rev=384894&r1=384893&r2=384894&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/command/LastPartialCommand.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/command/LastPartialCommand.hpp Fri Mar 10 11:06:53
2006
@@ -1 +1 @@
-/*
* 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 LastPartialCommand_hpp_
#define LastPartialCommand_hpp_

#include
<string>
#include "command/PartialCommand.hpp"
    

#include "util/ifr/ap.hpp"
#include
"util/ifr/p.hpp"

namespace apache
{
  namespace activemq
  {
    namespace client
    {
     namespace command
      {
        using namespace ifr;
        using namespace std;
       usin
 g namespace apache::activemq::client;

/*
 *
 *  Marshalling code for Open Wire Format for
LastPartialCommand
 *
 *
 *  NOTE!: This file is autogenerated - do not modify!
 *       
 if you need to make a change, please see the Groovy scripts in the
 *         activemq-core
module
 *
 */
class LastPartialCommand : public PartialCommand
{
private:

public:
    const
static int TYPE = 61;

public:
    LastPartialCommand() ;
    virtual ~LastPartialCommand()
;

    virtual int getCommandType() ;


} ;

/* namespace */
      }
    }
  }
}

#endif /*LastPartialCommand_hpp_*/
\ No newline at end of file
+/*
* 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 LastPartialCommand_hpp_
#define LastPartialCommand_hpp_

#include
<string>
#include "command/BaseCommand.hpp"
    

#include "util/ifr/ap.hpp"
#include
"util/ifr/p.hpp"

namespace apache
{
  namespace activemq
  {
    namespace client
    {
     namespace command
      {
        using namespace ifr;
        using namespace std;
       using n
 amespace apache::activemq::client;

/*
 *
 *  Marshalling code for Open Wire Format for LastPartialCommand
*
 *
 *  NOTE!: This file is autogenerated - do not modify!
 *         if you need to make
a change, please see the Groovy scripts in the
 *         activemq-core module
 *
 */
class
LastPartialCommand : public BaseCommand
{
private:

public:
    const static int TYPE = 61;

public:
   LastPartialCommand() ;
    virtual ~LastPartialCommand() ;

    virtual int getCommandType()
;


} ;

/* namespace */
      }
    }
  }
}

#endif /*LastPartialCommand_hpp_*/
\ No newline at end of file

Modified: incubator/activemq/trunk/openwire-cpp/src/command/PartialCommand.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/command/PartialCommand.cpp?rev=384894&r1=384893&r2=384894&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/command/PartialCommand.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/command/PartialCommand.cpp Fri Mar 10 11:06:53
2006
@@ -30,11 +30,23 @@
  */
 PartialCommand::PartialCommand()
 {
+    this->commandId = 0 ;
     this->data = 0 ;
 }
 
 PartialCommand::~PartialCommand()
 {
+}
+
+        
+int PartialCommand::getCommandId()
+{
+    return commandId ;
+}
+
+void PartialCommand::setCommandId(int commandId)
+{
+    this->commandId = commandId ;
 }
 
         

Modified: incubator/activemq/trunk/openwire-cpp/src/command/PartialCommand.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/command/PartialCommand.hpp?rev=384894&r1=384893&r2=384894&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/command/PartialCommand.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/command/PartialCommand.hpp Fri Mar 10 11:06:53
2006
@@ -1 +1 @@
-/*
* 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 PartialCommand_hpp_
#define PartialCommand_hpp_

#include
<string>
#include "command/BaseCommand.hpp"
    

#include "util/ifr/ap.hpp"
#include
"util/ifr/p.hpp"

namespace apache
{
  namespace activemq
  {
    namespace client
    {
     namespace command
      {
        using namespace ifr;
        using namespace std;
       using namespace
  apache::activemq::client;

/*
 *
 *  Marshalling code for Open Wire Format for PartialCommand
*
 *
 *  NOTE!: This file is autogenerated - do not modify!
 *         if you need to make
a change, please see the Groovy scripts in the
 *         activemq-core module
 *
 */
class
PartialCommand : public BaseCommand
{
private:
    ap<char> data ;

public:
    const
static int TYPE = 60;

public:
    PartialCommand() ;
    virtual ~PartialCommand() ;

  
 virtual int getCommandType() ;

    virtual ap<char> getData() ;
    virtual void setData(ap<char>
data) ;


} ;

/* namespace */
      }
    }
  }
}

#endif /*PartialCommand_hpp_*/
\ No newline at end of file
+/*
* 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 PartialCommand_hpp_
#define PartialCommand_hpp_

#include
<string>
#include "command/AbstractCommand.hpp"
    

#include "util/ifr/ap.hpp"
#include
"util/ifr/p.hpp"

namespace apache
{
  namespace activemq
  {
    namespace client
    {
     namespace command
      {
        using namespace ifr;
        using namespace std;
       using names
 pace apache::activemq::client;

/*
 *
 *  Marshalling code for Open Wire Format for PartialCommand
*
 *
 *  NOTE!: This file is autogenerated - do not modify!
 *         if you need to make
a change, please see the Groovy scripts in the
 *         activemq-core module
 *
 */
class
PartialCommand : public AbstractCommand
{
private:
    int commandId ;
    ap<char>
data ;

public:
    const static int TYPE = 60;

public:
    PartialCommand() ;
    virtual
~PartialCommand() ;

    virtual int getCommandType() ;

    virtual int getCommandId() ;
   virtual void setCommandId(int commandId) ;

    virtual ap<char> getData() ;
   
virtual void setData(ap<char> data) ;


} ;

/* namespace */
      }
    }
  }
}

#endif
/*PartialCommand_hpp_*/
\ No newline at end of file

Modified: incubator/activemq/trunk/openwire-cpp/src/marshal/LastPartialCommandMarshaller.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/marshal/LastPartialCommandMarshaller.hpp?rev=384894&r1=384893&r2=384894&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/LastPartialCommandMarshaller.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/LastPartialCommandMarshaller.hpp Fri
Mar 10 11:06:53 2006
@@ -1 +1 @@
-/*
* 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 LastPartialCommandMarshaller_hpp_
#define
LastPartialCommandMarshaller_hpp_

#include <string>

#include "command/IDataStructure.hpp"

/*
we could cut this down  - for now include all possible headers */
#include "command/BrokerId.hpp"
#include
"command/ConnectionId.hpp"
#include "command/ConsumerId.hpp"
#include "command/ProducerId.hpp"
#inclu
 de "command/SessionId.hpp"

#include "io/BinaryReader.hpp"
#include "io/BinaryWriter.hpp"

#include
"command/PartialCommandMarshaller.hpp"
#include "util/ifr/p.hpp"

#include "protocol/ProtocolFormat.hpp"

namespace
apache
{
  namespace activemq
  {
    namespace client
    {
      namespace marshal
    
 {
        using namespace ifr ;
        using namespace apache::activemq::client::command;
       using namespace apache::activemq::client::io;
        using namespace apache::activemq::client::protocol;

/*
*
 */
class LastPartialCommandMarshaller : public PartialCommandMarshaller
{
public:
    LastPartialCommandMarshaller()
;
    virtual ~LastPartialCommandMarshaller() ;

    virtual IDataStructure* createCommand()
;
    virtual char getDataStructureType() ;
    
    virtual void unmarshal(ProtocolFormat&
wireFormat, Object o, BinaryReader& dataIn, BooleanStream& bs) ;
    virtual int marshal1(ProtocolFormat&
wireFormat, Object& o, BooleanStream& bs) ;
    virtual void 
 marshal2(ProtocolFormat& wireFormat, Object& o, BinaryWriter& dataOut, BooleanStream&
bs) ;
} ;

/* namespace */
     }
    }
  }
}
#endif /*LastPartialCommandMarshaller_hpp_*/
\ No newline at end of file
+/*
* 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 LastPartialCommandMarshaller_hpp_
#define
LastPartialCommandMarshaller_hpp_

#include <string>

#include "command/IDataStructure.hpp"

/*
we could cut this down  - for now include all possible headers */
#include "command/BrokerId.hpp"
#include
"command/ConnectionId.hpp"
#include "command/ConsumerId.hpp"
#include "command/ProducerId.hpp"
#inclu
 de "command/SessionId.hpp"

#include "io/BinaryReader.hpp"
#include "io/BinaryWriter.hpp"

#include
"command/BaseCommandMarshaller.hpp"
#include "util/ifr/p.hpp"

#include "protocol/ProtocolFormat.hpp"

namespace
apache
{
  namespace activemq
  {
    namespace client
    {
      namespace marshal
    
 {
        using namespace ifr ;
        using namespace apache::activemq::client::command;
       using namespace apache::activemq::client::io;
        using namespace apache::activemq::client::protocol;

/*
*
 */
class LastPartialCommandMarshaller : public BaseCommandMarshaller
{
public:
    LastPartialCommandMarshaller()
;
    virtual ~LastPartialCommandMarshaller() ;

    virtual IDataStructure* createCommand()
;
    virtual char getDataStructureType() ;
    
    virtual void unmarshal(ProtocolFormat&
wireFormat, Object o, BinaryReader& dataIn, BooleanStream& bs) ;
    virtual int marshal1(ProtocolFormat&
wireFormat, Object& o, BooleanStream& bs) ;
    virtual void marsha
 l2(ProtocolFormat& wireFormat, Object& o, BinaryWriter& dataOut, BooleanStream&
bs) ;
} ;

/* namespace */
     }
    }
  }
}
#endif /*LastPartialCommandMarshaller_hpp_*/
\ No newline at end of file

Modified: incubator/activemq/trunk/openwire-cpp/src/marshal/PartialCommandMarshaller.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/marshal/PartialCommandMarshaller.cpp?rev=384894&r1=384893&r2=384894&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/PartialCommandMarshaller.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/PartialCommandMarshaller.cpp Fri Mar
10 11:06:53 2006
@@ -56,6 +56,7 @@
     base.unmarshal(wireFormat, o, dataIn, bs);
 
     PartialCommand& info = (PartialCommand&) o;
+        info.setCommandId(dataIn.readInt());
         info.setData(tightUnmarshalByteArray(dataIn, bs));
 
 }
@@ -68,10 +69,10 @@
     PartialCommand& info = (PartialCommand&) o;
 
     int rc = base.marshal1(wireFormat, info, bs);
-    bs.writeBoolean(info.getData()!=null);
+        bs.writeBoolean(info.getData()!=null);
     rc += info.getData()==null ? 0 : info.getData().Length+4;
 
-    return rc + 0;
+    return rc + 1;
 }
 
 /* 
@@ -81,6 +82,7 @@
     base.marshal2(wireFormat, o, dataOut, bs);
 
     PartialCommand& info = (PartialCommand&) o;
+    DataStreamMarshaller.writeInt(info.getCommandId(), dataOut);
     if(bs.readBoolean()) {
        DataStreamMarshaller.writeInt(info.getData().Length, dataOut);
        dataOut.write(info.getData());

Modified: incubator/activemq/trunk/openwire-cpp/src/marshal/PartialCommandMarshaller.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/marshal/PartialCommandMarshaller.hpp?rev=384894&r1=384893&r2=384894&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/PartialCommandMarshaller.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/PartialCommandMarshaller.hpp Fri Mar
10 11:06:53 2006
@@ -1 +1 @@
-/*
* 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 PartialCommandMarshaller_hpp_
#define PartialCommandMarshaller_hpp_

#include
<string>

#include "command/IDataStructure.hpp"

/* we could cut this down  - for now
include all possible headers */
#include "command/BrokerId.hpp"
#include "command/ConnectionId.hpp"
#include
"command/ConsumerId.hpp"
#include "command/ProducerId.hpp"
#include "comm
 and/SessionId.hpp"

#include "io/BinaryReader.hpp"
#include "io/BinaryWriter.hpp"

#include
"command/BaseCommandMarshaller.hpp"
#include "util/ifr/p.hpp"

#include "protocol/ProtocolFormat.hpp"

namespace
apache
{
  namespace activemq
  {
    namespace client
    {
      namespace marshal
    
 {
        using namespace ifr ;
        using namespace apache::activemq::client::command;
       using namespace apache::activemq::client::io;
        using namespace apache::activemq::client::protocol;

/*
*
 */
class PartialCommandMarshaller : public BaseCommandMarshaller
{
public:
    PartialCommandMarshaller()
;
    virtual ~PartialCommandMarshaller() ;

    virtual IDataStructure* createCommand() ;
   virtual char getDataStructureType() ;
    
    virtual void unmarshal(ProtocolFormat&
wireFormat, Object o, BinaryReader& dataIn, BooleanStream& bs) ;
    virtual int marshal1(ProtocolFormat&
wireFormat, Object& o, BooleanStream& bs) ;
    virtual void marshal2(ProtocolFormat&
w
 ireFormat, Object& o, BinaryWriter& dataOut, BooleanStream& bs) ;
} ;

/* namespace
*/
     }
    }
  }
}
#endif /*PartialCommandMarshaller_hpp_*/
\ No newline at end of file
+/*
* 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 PartialCommandMarshaller_hpp_
#define PartialCommandMarshaller_hpp_

#include
<string>

#include "command/IDataStructure.hpp"

/* we could cut this down  - for now
include all possible headers */
#include "command/BrokerId.hpp"
#include "command/ConnectionId.hpp"
#include
"command/ConsumerId.hpp"
#include "command/ProducerId.hpp"
#include "comm
 and/SessionId.hpp"

#include "io/BinaryReader.hpp"
#include "io/BinaryWriter.hpp"

#include
"command/BaseDataStreamMarshaller.hpp"
#include "util/ifr/p.hpp"

#include "protocol/ProtocolFormat.hpp"

namespace
apache
{
  namespace activemq
  {
    namespace client
    {
      namespace marshal
    
 {
        using namespace ifr ;
        using namespace apache::activemq::client::command;
       using namespace apache::activemq::client::io;
        using namespace apache::activemq::client::protocol;

/*
*
 */
class PartialCommandMarshaller : public BaseDataStreamMarshaller
{
public:
    PartialCommandMarshaller()
;
    virtual ~PartialCommandMarshaller() ;

    virtual IDataStructure* createCommand() ;
   virtual char getDataStructureType() ;
    
    virtual void unmarshal(ProtocolFormat&
wireFormat, Object o, BinaryReader& dataIn, BooleanStream& bs) ;
    virtual int marshal1(ProtocolFormat&
wireFormat, Object& o, BooleanStream& bs) ;
    virtual void marshal2(ProtocolFor
 mat& wireFormat, Object& o, BinaryWriter& dataOut, BooleanStream& bs) ;
}
;

/* namespace */
     }
    }
  }
}
#endif /*PartialCommandMarshaller_hpp_*/
\ No newline at end of file



Mime
View raw message