/**
* Error codes for the various types of exceptions.
*/
- enum TApplicationExceptionType {
- UNKNOWN = 0,
- UNKNOWN_METHOD = 1,
- INVALID_MESSAGE_TYPE = 2,
- WRONG_METHOD_NAME = 3,
- BAD_SEQUENCE_ID = 4,
- MISSING_RESULT = 5,
+ enum TApplicationExceptionType
+ { UNKNOWN = 0
+ , UNKNOWN_METHOD = 1
+ , INVALID_MESSAGE_TYPE = 2
+ , WRONG_METHOD_NAME = 3
+ , BAD_SEQUENCE_ID = 4
+ , MISSING_RESULT = 5
};
TApplicationException() :
*/
class TDebugProtocol : public TWriteOnlyProtocol {
private:
- enum write_state_t {
- UNINIT,
- STRUCT,
- LIST,
- SET,
- MAP_KEY,
- MAP_VALUE,
+ enum write_state_t
+ { UNINIT
+ , STRUCT
+ , LIST
+ , SET
+ , MAP_KEY
+ , MAP_VALUE
};
public:
/**
* Error codes for the various types of exceptions.
*/
- enum TProtocolExceptionType {
- UNKNOWN = 0,
- INVALID_DATA = 1,
- NEGATIVE_SIZE = 2,
- SIZE_LIMIT = 3,
- BAD_VERSION = 4,
- NOT_IMPLEMENTED = 5,
+ enum TProtocolExceptionType
+ { UNKNOWN = 0
+ , INVALID_DATA = 1
+ , NEGATIVE_SIZE = 2
+ , SIZE_LIMIT = 3
+ , BAD_VERSION = 4
+ , NOT_IMPLEMENTED = 5
};
TProtocolException() :
* and will be responsible for freeing it.
* The membory must have been allocated with malloc.
*/
- enum MemoryPolicy {
- OBSERVE = 1,
- COPY = 2,
- TAKE_OWNERSHIP = 3,
+ enum MemoryPolicy
+ { OBSERVE = 1
+ , COPY = 2
+ , TAKE_OWNERSHIP = 3
};
/**
*/
class TFDTransport : public TTransport {
public:
- enum ClosePolicy {
- NO_CLOSE_ON_DESTROY = 0,
- CLOSE_ON_DESTROY = 1,
+ enum ClosePolicy
+ { NO_CLOSE_ON_DESTROY = 0
+ , CLOSE_ON_DESTROY = 1
};
TFDTransport(int fd, ClosePolicy close_policy = NO_CLOSE_ON_DESTROY)
/**
* Error codes for the various types of exceptions.
*/
- enum TTransportExceptionType {
- UNKNOWN = 0,
- NOT_OPEN = 1,
- ALREADY_OPEN = 2,
- TIMED_OUT = 3,
- END_OF_FILE = 4,
- INTERRUPTED = 5,
- BAD_ARGS = 6,
- CORRUPTED_DATA = 7,
- INTERNAL_ERROR = 8,
+ enum TTransportExceptionType
+ { UNKNOWN = 0
+ , NOT_OPEN = 1
+ , ALREADY_OPEN = 2
+ , TIMED_OUT = 3
+ , END_OF_FILE = 4
+ , INTERRUPTED = 5
+ , BAD_ARGS = 6
+ , CORRUPTED_DATA = 7
+ , INTERNAL_ERROR = 8
};
TTransportException() :