edits
[iotcloud.git] / version2 / src / C / TransactionPart.h
index 5e2d84a2dd8fe8c66886edb4acb2d249157997a9..d00a01ae5bac4056e882d53880f41d4d714ae0bf 100644 (file)
@@ -7,21 +7,21 @@
 #define TransactionPart_MAX_NON_HEADER_SIZE 512
 
 class TransactionPart : public Entry {
- private:
+private:
        int64_t sequenceNumber = -1;
        int64_t machineId = -1;
        int64_t arbitratorId = -1;
        int64_t clientLocalSequenceNumber = -1;         // Sequence number of the transaction that this is a part of
        int partNumber = -1;    // Parts position in the
        bool isLastPart = false;
-       
-       Pair<int64_t, int64_t> * transactionId = NULL;
-       Pair<int64_t int32_t> * partId = NULL;
-       
-       Array<char> * data = NULL;
 
- public:
- TransactionPart(Slot *s, int64_t _machineId, int64_t _arbitratorId, int64_t _clientLocalSequenceNumber, int _partNumber, Array<char>* _data, bool _isLastPart) : Entry(s),
+       Pair<int64_t, int64_t> *transactionId = NULL;
+       Pair<int64_t int32_t> *partId = NULL;
+
+       Array<char> *data = NULL;
+
+public:
+       TransactionPart(Slot *s, int64_t _machineId, int64_t _arbitratorId, int64_t _clientLocalSequenceNumber, int _partNumber, Array<char> *_data, bool _isLastPart) : Entry(s),
                sequenceNumber(-1),
                machineId( _machineId),
                arbitratorId(_arbitratorId),
@@ -31,16 +31,16 @@ class TransactionPart : public Entry {
                transactionId(new Pair<int64_t, int64_t>(machineId, clientLocalSequenceNumber)),
                partId(new Pair<int64_t int32_t>(clientLocalSequenceNumber, partNumber)),
                data(_data) {
-               }
-       
+       }
+
        int getSize();
        void setSlot(Slot s);
-       Pair<int64_t, int64_t> * getTransactionId();
+       Pair<int64_t, int64_t> *getTransactionId();
        int64_t getArbitratorId();
-       Pair<int64_t int32_t>getPartId();
+       Pair<int64_t int32_t> *getPartId();
        int getPartNumber();
        int getDataSize();
-       Array<char>getData();
+       Array<char> *getData();
        bool isLastPart();
        int64_t getMachineId();
        int64_t getClientLocalSequenceNumber();
@@ -48,8 +48,8 @@ class TransactionPart : public Entry {
        void setSequenceNumber(int64_t _sequenceNumber);
        void encode(ByteBuffer *bb);
        char getType();
-       EntrygetCopy(Slot *s);
+       Entry *getCopy(Slot *s);
 };
 
-Entry * TransactionPart_decode(Slot* s, ByteBuffer* bb);
+Entry *TransactionPart_decode(Slot *s, ByteBuffer *bb);
 #endif