Advanced Strategic Command
Public Member Functions | Public Attributes | List of all members
ResourceWatch Class Reference

#include <servicing.h>

Public Member Functions

 ResourceWatch (ContainerBase *container)
ContainerBasegetContainer ()
const Resources amount ()
const Resources avail ()
const Resources limit ()
bool putResource (int resourcetype, int amount)
bool getResource (int resourcetype, int amount)
bool getResources (Resources res)

Public Attributes

sigc::signal< void, int > sigChanged

Detailed Description

Definition at line 30 of file servicing.h.

Constructor & Destructor Documentation

ResourceWatch::ResourceWatch ( ContainerBase container)

Member Function Documentation

const Resources ResourceWatch::amount ( )

Definition at line 70 of file servicing.cpp.

Referenced by ResourceTransferrable::getAmount(), getResource(), and putResource().

const Resources ResourceWatch::avail ( )
ContainerBase * ResourceWatch::getContainer ( )
bool ResourceWatch::getResource ( int  resourcetype,
int  amount 

Definition at line 114 of file servicing.cpp.

References amount(), Resources::resource(), and sigChanged.

Referenced by getResources(), and ResourceTransferrable::transfer().

bool ResourceWatch::getResources ( Resources  res)

Definition at line 124 of file servicing.cpp.

References getResource(), Resources::resource(), and resourceTypeNum.

const Resources ResourceWatch::limit ( )

Definition at line 93 of file servicing.cpp.

References ALL, and getTransferLimitation().

Referenced by avail(), ResourceTransferrable::getMax(), and ResourceTransferrable::getMin().

bool ResourceWatch::putResource ( int  resourcetype,
int  amount 

Definition at line 100 of file servicing.cpp.

References amount(), Resources::resource(), resourceTypeNum, and sigChanged.

Referenced by ResourceTransferrable::transfer().

Member Data Documentation

sigc::signal<void, int> ResourceWatch::sigChanged

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