ScummVM API documentation
Sci::LocalVariables Struct Reference
Inheritance diagram for Sci::LocalVariables:
Sci::SegmentObj Common::Serializable

Public Member Functions

bool isValidOffset (uint32 offset) const override
 
SegmentRef dereference (reg_t pointer) override
 
reg_t findCanonicAddress (SegManager *segMan, reg_t sub_addr) const override
 
Common::Array< reg_tlistAllOutgoingReferences (reg_t object) const override
 
void saveLoadWithSerializer (Common::Serializer &ser) override
 
- Public Member Functions inherited from Sci::SegmentObj
 SegmentObj (SegmentType type)
 
SegmentType getType () const
 
virtual void freeAtAddress (SegManager *segMan, reg_t sub_addr)
 
virtual Common::Array< reg_tlistAllDeallocatable (SegmentId segId) const
 

Public Attributes

int script_id
 
Common::Array< reg_t_locals
 
- Public Attributes inherited from Sci::SegmentObj
SegmentType _type
 

Additional Inherited Members

- Static Public Member Functions inherited from Sci::SegmentObj
static SegmentObjcreateSegmentObj (SegmentType type)
 

Member Function Documentation

◆ isValidOffset()

bool Sci::LocalVariables::isValidOffset ( uint32  offset) const
inlineoverridevirtual

Check whether the given offset into this memory object is valid, i.e., suitable for passing to dereference.

Implements Sci::SegmentObj.

◆ dereference()

SegmentRef Sci::LocalVariables::dereference ( reg_t  pointer)
overridevirtual

Dereferences a raw memory pointer.

Parameters
regreference to dereference
Returns
the data block referenced

Reimplemented from Sci::SegmentObj.

◆ findCanonicAddress()

reg_t Sci::LocalVariables::findCanonicAddress ( SegManager segMan,
reg_t  sub_addr 
) const
overridevirtual

Finds the canonic address associated with sub_reg. Used by the garbage collector.

For each valid address a, there exists a canonic address c(a) such that c(a) = c(c(a)). This address "governs" a in the sense that deallocating c(a) will deallocate a.

Parameters
sub_addrbase address whose canonic address is to be found

Reimplemented from Sci::SegmentObj.

◆ listAllOutgoingReferences()

Common::Array<reg_t> Sci::LocalVariables::listAllOutgoingReferences ( reg_t  object) const
overridevirtual

Iterates over all references reachable from the specified object. Used by the garbage collector.

Parameters
objectobject (within the current segment) to analyze
Returns
a list of outgoing references within the object
Note
This function may also choose to report numbers (segment 0) as adresses

Reimplemented from Sci::SegmentObj.

Member Data Documentation

◆ script_id

int Sci::LocalVariables::script_id

Script ID this local variable block belongs to


The documentation for this struct was generated from the following file: