Decoder for OCC encodings. This class can be used to decode the names and types encoded by OCC for function and variable types and names.
Public Member functions Summary: | |
constructor | Decoder(Builder*) Constructor [Source] |
static code | toCode(char*) Convert a char* to a 'code' type [Source] |
void | init(char*) Initialise the type decoder [Source] |
code_iter& | iter() Returns the iterator used in decoding [Source] |
Types::Type* | decodeType() Return a Type object from the encoded type. [Source] |
Types::Type* | decodeQualType() Decodes a Qualified type. [Source] |
Types::Type* | decodeTemplate() Decodes a Template type. [Source] |
Types::Type* | decodeFuncPtr(std::vector<std::string>&) Decodes a FuncPtr type. [Source] |
std::string | decodeName() Decode a name [Source] |
ScopedName | decodeQualified() Decode a qualified name [Source] |
std::string | decodeName(code_iter) Decode a name starting from the given iterator. [Source] |
std::string | decodeName(char*) Decode a name starting from the given char* [Source] |
void | decodeQualName(ScopedName& names) Decode a qualified name with only names in it [Source] |
bool | isName(char* ptr) Returns true if the char* is pointing to a name (that starts with a length). [Source] |
Private Data members Summary: | |
code | m_string The encoded type string currently being decoded [Source] |
code_iter | m_iter The current position in m_enc_iter [Source] |
Builder* | m_builder The builder [Source] |
Lookup* | m_lookup The lookup [Source] |
Public Member function Details: |
Return a Type object from the encoded type.
Decodes a Qualified type. iter must be just after the Q
Decodes a Template type. iter must be just after the T
Decodes a FuncPtr type. iter must be just after the F. The vector is the postmod - if it contains a * then it will be removed and given to the funcptr instead
Decode a name starting from the given iterator. Note the iterator passed need not be from the currently decoding string since this is a simple method.
Returns true if the char* is pointing to a name (that starts with a length). This is needed since char can be signed or unsigned, and explicitly casting to one or the other is ugly