Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

AIPremise Class Reference

#include <AIBase.h>

Inheritance diagram for AIPremise:

AIAction AIException List of all members.

Public Member Functions

 AIPremise (std::vector< int > params_=std::vector< int >())
virtual bool operator== (const AIPremise &rhs) const
virtual bool equals (const AIPremise &rhs, int numparamstocheck_) const
AIPremiseoperator= (int param_)
AIPremiseoperator+= (int param_)
virtual int serialize (std::ofstream &fout_) const
virtual int assemble (std::ifstream &fin_)
virtual ~AIPremise ()
 empty destructor


Public Attributes

std::vector< int > params
 params[0] must be the premise ID

float entrytime
 # of secs elapsed from time program started to time entered in an AIKB

bool negated
 look for absence of this premise in an AIKB


Detailed Description

AIPremise is the base class for all game related statements.


Constructor & Destructor Documentation

AIPremise::AIPremise std::vector< int >  params_ = std::vector< int >()  ) 
 

constructor

Parameters:
params_ defaults to an empty vector


Member Function Documentation

virtual int AIPremise::assemble std::ifstream &  fin_  )  [virtual]
 

assigns this object to one read from a binary file and returns the number of bytes read

Parameters:
fin_ the file stream to read from (opened for binary input)
See also:
serialize()

virtual bool AIPremise::equals const AIPremise rhs,
int  numparamstocheck_
const [virtual]
 

use equals rather than operator== to check a certain # of parameters

See also:
operator==()

AIPremise& AIPremise::operator+= int  param_  )  [inline]
 

adds a parameter

See also:
operator=()

Reimplemented in AIAction, and AIException.

AIPremise& AIPremise::operator= int  param_  )  [inline]
 

clears all parameters, resets other vars, and sets the first parameter (the ID) to param_

See also:
operator+=()

Reimplemented in AIAction, and AIException.

virtual bool AIPremise::operator== const AIPremise rhs  )  const [virtual]
 

must have same number and all equal parameters to return true

See also:
equals()

virtual int AIPremise::serialize std::ofstream &  fout_  )  const [virtual]
 

writes this object to a binary file and returns the number of bytes written

Parameters:
fout_ the file stream to write to (opened for binary output)
See also:
assemble()


The documentation for this class was generated from the following file:
Generated on Sun Apr 11 05:05:56 2004 for FSM_API by doxygen 1.3.6