Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
rgoap.common.Condition Class Reference

known as state More...

List of all members.

Public Member Functions

def __init__
def __repr__
def __str__
def add
def get
def get_value
def initialize_worldstate
def print_dict

Private Member Functions

def _update_value

Private Attributes

 _state_name

Static Private Attributes

dictionary _conditions_dict = {}

Detailed Description

known as state

The object that makes any kind of robot or system state available.

This class, at least its static part, is a multiton:
* For each state_name only one instance is allowed to be in the
  _conditions_dict mapping.
* If there is no mapping for a get(state_name) call an assertion is
  triggered, as creating a new instance makes no sense here.

self._state_name: id name of condition, must not be changed

Definition at line 113 of file common.py.


Constructor & Destructor Documentation

def rgoap.common.Condition.__init__ (   self,
  state_name 
)

Definition at line 125 of file common.py.


Member Function Documentation

Definition at line 133 of file common.py.

Definition at line 130 of file common.py.

def rgoap.common.Condition._update_value (   self,
  worldstate 
) [private]
Update the condition's current value to the given worldstate.

Definition at line 140 of file common.py.

def rgoap.common.Condition.add (   cls,
  condition 
)

Definition at line 149 of file common.py.

def rgoap.common.Condition.get (   cls,
  state_name 
)

Definition at line 155 of file common.py.

Returns the current value, hopefully not blocking.

Definition at line 136 of file common.py.

def rgoap.common.Condition.initialize_worldstate (   cls,
  worldstate 
)
Initialize the given worldstate with all known conditions and their current values.

Definition at line 164 of file common.py.

Definition at line 160 of file common.py.


Member Data Documentation

dictionary rgoap::common.Condition::_conditions_dict = {} [static, private]

Definition at line 146 of file common.py.

Definition at line 125 of file common.py.


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


rgoap
Author(s): Felix Kolbe
autogenerated on Sun Oct 5 2014 23:53:02