decompiler  1.0.0
Public Member Functions | Private Attributes | List of all members
ProtoStoreInternal Class Reference

A collection of parameter descriptions without backing symbols. More...

#include <fspec.hh>

Inheritance diagram for ProtoStoreInternal:
ProtoStore

Public Member Functions

 ProtoStoreInternal (Datatype *vt)
 Constructor. More...
 
virtual ProtoParametersetInput (int4 i, const string &nm, const ParameterPieces &pieces)
 Establish name, data-type, storage of a specific input parameter. More...
 
virtual void clearInput (int4 i)
 Clear the input parameter at the specified slot. More...
 
virtual void clearAllInputs (void)
 Clear all input parameters (and any backing symbols)
 
virtual int4 getNumInputs (void) const
 Get the number of input parameters for this prototype.
 
virtual ProtoParametergetInput (int4 i)
 Get the i-th input parameter (or NULL if it doesn't exist)
 
virtual ProtoParametersetOutput (const ParameterPieces &piece)
 Establish the data-type and storage of the return value. More...
 
virtual void clearOutput (void)
 Clear the return value to TYPE_VOID.
 
virtual ProtoParametergetOutput (void)
 Get the return-value description.
 
virtual ProtoStoreclone (void) const
 Clone the entire collection of parameter descriptions.
 
virtual void saveXml (ostream &s) const
 Save any parameters that are not backed by symbols to an XML stream. More...
 
virtual void restoreXml (const Element *el, ProtoModel *model)
 Restore any internal parameter descriptions from an XML stream. More...
 
- Public Member Functions inherited from ProtoStore
virtual ~ProtoStore (void)
 Constructor.
 

Private Attributes

Datatypevoidtype
 Cached reference to the void data-type.
 
vector< ProtoParameter * > inparam
 Descriptions of input parameters.
 
ProtoParameteroutparam
 Description of the return value.
 

Detailed Description

A collection of parameter descriptions without backing symbols.

Parameter descriptions are stored internally to the object and are not mirrored by a symbol table.

Constructor & Destructor Documentation

ProtoStoreInternal::ProtoStoreInternal ( Datatype vt)

Constructor.

Parameters
vtis the void data-type used for an unspecified return value

References ParameterPieces::flags, setOutput(), and ParameterPieces::type.

Member Function Documentation

void ProtoStoreInternal::clearInput ( int4  i)
virtual

Clear the input parameter at the specified slot.

The parameter is excised, any following parameters are shifted to fill its spot. If there is a backing Symbol, it is removed from the SymbolTable

Parameters
iis the specified parameter slot to remove

Implements ProtoStore.

void ProtoStoreInternal::restoreXml ( const Element el,
ProtoModel model 
)
virtual
void ProtoStoreInternal::saveXml ( ostream &  s) const
virtual

Save any parameters that are not backed by symbols to an XML stream.

Symbols are stored elsewhere, so symbol backed parameters are not serialized. If there are any internal parameters an <internallist> tag is emitted.

Parameters
sis the output stream

Implements ProtoStore.

References a_v(), a_v_b(), ProtoParameter::getAddress(), ProtoParameter::getName(), ProtoParameter::getType(), ProtoParameter::isHiddenReturn(), ProtoParameter::isIndirectStorage(), ProtoParameter::isNameLocked(), ProtoParameter::isThisPointer(), ProtoParameter::isTypeLocked(), Address::saveXml(), and Datatype::saveXml().

ProtoParameter * ProtoStoreInternal::setInput ( int4  i,
const string &  nm,
const ParameterPieces pieces 
)
virtual

Establish name, data-type, storage of a specific input parameter.

This either allocates a new parameter or replaces the existing one at the specified input slot. If there is a backing symbol table, a Symbol is created or modified.

Parameters
iis the specified input slot
nmis the (optional) name of the parameter
piecesholds the raw storage address and data-type to set
Returns
the new/modified ProtoParameter

Implements ProtoStore.

References ParameterPieces::addr, ParameterPieces::flags, and ParameterPieces::type.

ProtoParameter * ProtoStoreInternal::setOutput ( const ParameterPieces piece)
virtual

Establish the data-type and storage of the return value.

This either allocates a new parameter or replaces the existing one. A void return value can be specified with an invalid address and TYPE_VOID data-type.

Parameters
pieceholds the raw storage address and data-type to set
Returns
the new/modified ProtoParameter

Implements ProtoStore.

References ParameterPieces::addr, ParameterPieces::flags, and ParameterPieces::type.

Referenced by FuncProto::paramShift(), and ProtoStoreInternal().


The documentation for this class was generated from the following files: