Modules | Files | Inheritance Tree | Inheritance Graph | Name Index | Config
package Synopsis::Parser::C++
class Decoder
Files: Synopsis/Parser/C++/syn/decoder.hh

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:
 constructorDecoder(Builder*)
Constructor [Source]
static codetoCode(char*)
Convert a char* to a 'code' type [Source]
 voidinit(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::stringdecodeName()
Decode a name [Source]
 ScopedNamedecodeQualified()
Decode a qualified name [Source]
 std::stringdecodeName(code_iter)
Decode a name starting from the given iterator. [Source]
 std::stringdecodeName(char*)
Decode a name starting from the given char* [Source]
 voiddecodeQualName(ScopedName& names)
Decode a qualified name with only names in it [Source]
 boolisName(char* ptr)
Returns true if the char* is pointing to a name (that starts with a length). [Source]

Private Data members Summary:
codem_string
The encoded type string currently being decoded [Source]
code_iterm_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:
 Types::Type* decodeType()

Return a Type object from the encoded type.


 Types::Type* decodeQualType()

Decodes a Qualified type. iter must be just after the Q


 Types::Type* decodeTemplate()

Decodes a Template type. iter must be just after the T


 Types::Type* decodeFuncPtr(std::vector<std::string>&)

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


 std::string decodeName(code_iter)

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.


 bool isName(char* ptr)

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