Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Pairs Class Reference

#include <IcePairs.h>

Inheritance diagram for Pairs:
Container

Public Member Functions

 Pairs ()
 
 ~Pairs ()
 
inline_ udword GetNbPairs () const
 
inline_ const PairGetPairs () const
 
inline_ const PairGetPair (udword i) const
 
inline_ BOOL HasPairs () const
 
inline_ void ResetPairs ()
 
inline_ void DeleteLastPair ()
 
inline_ void AddPair (const Pair &p)
 
inline_ void AddPair (udword id0, udword id1)
 

Additional Inherited Members

- Private Member Functions inherited from Container
 Container ()
 
 Container (const Container &object)
 
 Container (udword size, float growth_factor)
 
 ~Container ()
 
inline_ ContainerAdd (udword entry)
 
inline_ ContainerAdd (const udword *entries, udword nb)
 
inline_ ContainerAdd (float entry)
 
inline_ ContainerAdd (const float *entries, udword nb)
 
inline_ ContainerAddUnique (udword entry)
 Add unique [slow]. More...
 
ContainerEmpty ()
 
inline_ void Reset ()
 
inline_ void ForceSize (udword size)
 
bool SetSize (udword nb)
 
bool Refit ()
 
bool Contains (udword entry, udword *location=null) const
 
bool Delete (udword entry)
 
bool DeleteKeepingOrder (udword entry)
 
inline_ void DeleteLastEntry ()
 Deletes the very last entry. More...
 
inline_ void DeleteIndex (udword index)
 Deletes the entry whose index is given. More...
 
ContainerFindNext (udword &entry, FindMode find_mode=FIND_CLAMP)
 
ContainerFindPrev (udword &entry, FindMode find_mode=FIND_CLAMP)
 
inline_ udword GetNbEntries () const
 Returns the current number of entries. More...
 
inline_ udword GetEntry (udword i) const
 Returns ith entry. More...
 
inline_ udwordGetEntries () const
 Returns the list of entries. More...
 
inline_ udword GetFirst () const
 
inline_ udword GetLast () const
 
inline_ float GetGrowthFactor () const
 Returns the growth factor. More...
 
inline_ void SetGrowthFactor (float growth)
 Sets the growth factor. More...
 
inline_ bool IsFull () const
 Checks the container is full. More...
 
inline_ BOOL IsNotEmpty () const
 Checks the container is empty. More...
 
inline_ udword operator[] (udword i) const
 Read-access as an array. More...
 
inline_ udwordoperator[] (udword i)
 Write-access as an array. More...
 
udword GetUsedRam () const
 
void operator= (const Container &object)
 Operator for "Container A = Container B". More...
 
inline_ udword GetNbContainers () const
 
inline_ udword GetTotalBytes () const
 

Detailed Description

Definition at line 25 of file IcePairs.h.

Constructor & Destructor Documentation

Pairs::Pairs ( )
inline

Definition at line 29 of file IcePairs.h.

29 {}
Pairs::~Pairs ( )
inline

Definition at line 30 of file IcePairs.h.

30 {}

Member Function Documentation

inline_ void Pairs::AddPair ( const Pair p)
inline

Definition at line 41 of file IcePairs.h.

References Container::Add(), Pair::id0, and Pair::id1.

Referenced by Opcode::SAP_PairData::DumpPairs().

41 { Add(p.id0).Add(p.id1); }
inline_ void Pairs::AddPair ( udword  id0,
udword  id1 
)
inline

Definition at line 42 of file IcePairs.h.

References Container::Add().

42 { Add(id0).Add(id1); }
inline_ void Pairs::DeleteLastPair ( )
inline

Definition at line 39 of file IcePairs.h.

References Container::DeleteLastEntry().

inline_ udword Pairs::GetNbPairs ( ) const
inline

Definition at line 32 of file IcePairs.h.

References Container::GetNbEntries().

Referenced by Opcode::SweepAndPrune::Init().

32 { return GetNbEntries()>>1; }
inline_ const Pair* Pairs::GetPair ( udword  i) const
inline

Definition at line 34 of file IcePairs.h.

References Container::GetEntries().

Referenced by Opcode::SweepAndPrune::Init().

34 { return (const Pair*)&GetEntries()[i+i]; }
inline_ const Pair* Pairs::GetPairs ( ) const
inline

Definition at line 33 of file IcePairs.h.

References Container::GetEntries().

33 { return (const Pair*)GetEntries(); }
inline_ BOOL Pairs::HasPairs ( ) const
inline

Definition at line 36 of file IcePairs.h.

References Container::IsNotEmpty().

36 { return IsNotEmpty(); }
inline_ void Pairs::ResetPairs ( )
inline

Definition at line 38 of file IcePairs.h.

References Container::Reset().

38 { Reset(); }

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