Class: Thrift::CompactProtocol::CompactTypes

### Home Classes Methods

### In Files

- lib/thrift/protocol/compact_protocol.rb

### Parent

Object

### Methods

- ::get_compact_type
- ::get_ttype
- ::is_bool_type?

### Files

- CHANGELOG
- README
- Makefile

### Class/Module Index

Quicksearch

- Thrift
- Thrift::ApplicationException
- Thrift::BaseProtocol
- Thrift::BaseProtocolFactory
- Thrift::BaseServer
- Thrift::BaseServerTransport
- Thrift::BaseTransport
- Thrift::BaseTransportFactory
- Thrift::BinaryProtocol
- Thrift::BinaryProtocolAcceleratedFactory
- Thrift::BinaryProtocolFactory
- Thrift::BufferedTransport
- Thrift::BufferedTransportFactory
- Thrift::Client
- Thrift::CompactProtocol
- Thrift::CompactProtocol::CompactTypes
- Thrift::CompactProtocolFactory
- Thrift::Deserializer
- Thrift::Exception
- Thrift::FramedTransport
- Thrift::FramedTransportFactory
- Thrift::HTTPClientTransport
- Thrift::IOStreamTransport
- Thrift::MemoryBufferTransport
- Thrift::MessageTypes
- Thrift::MongrelHTTPServer
- Thrift::MongrelHTTPServer::Handler
- Thrift::NonblockingServer
- Thrift::Processor
- Thrift::ProtocolException
- Thrift::Serializer
- Thrift::ServerSocket
- Thrift::SimpleServer
- Thrift::Socket
- Thrift::Struct
- Thrift::Struct_Union
- Thrift::ThreadPoolServer
- Thrift::ThreadedServer
- Thrift::TransportException
- Thrift::TransportUtils
- Thrift::TypeError
- Thrift::Types
- Thrift::UNIXServerSocket
- Thrift::UNIXSocket
- Thrift::Union
- Fixnum

No matching classes.

# Thrift::CompactProtocol::CompactTypes

All of the on-wire type codes.

### Constants

BINARY
BOOLEAN_FALSE
BOOLEAN_TRUE
BYTE
COMPACT_TO_TTYPE
DOUBLE
I16
I32
I64
LIST
MAP
SET
STRUCT
TTYPE_TO_COMPACT

### Public Class Methods

get_compact_type(ttype) click to toggle source

    # File lib/thrift/protocol/compact_protocol.rb, line 89
    def self.get_compact_type(ttype)
      val = TTYPE_TO_COMPACT[ttype]
      raise "don't know what type: #{ttype & 0x0f}" unless val
      val
    end

get_ttype(compact_type) click to toggle source

    # File lib/thrift/protocol/compact_protocol.rb, line 83
    def self.get_ttype(compact_type)
      val = COMPACT_TO_TTYPE[compact_type & 0x0f]
      raise "don't know what type: #{compact_type & 0x0f}" unless val
      val
    end

is_bool_type?(b) click to toggle source

    # File lib/thrift/protocol/compact_protocol.rb, line 48
    def self.is_bool_type?(b)
      (b & 0x0f) == BOOLEAN_TRUE || (b & 0x0f) == BOOLEAN_FALSE
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.