Tactics: Western Philosophers Vs. Musicians  0.12
A turn-based tactical game combining rules and gameplay elements inspired by Final Fantasy Tactics and the Mayfair Exponential Game System. Unlike most games of this type, motion is in full, grid-less 3D.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
OpenSkyNet::AI::Premise Class Reference

#include <AIBase.h>

Inheritance diagram for OpenSkyNet::AI::Premise:
OpenSkyNet::AI::Action OpenSkyNet::AI::Record

Public Member Functions

 Premise ()
 
 Premise (const std::vector< int > &params_)
 
virtual bool operator== (const Premise &rhs_) const
 
virtual bool equals (const Premise &rhs_, unsigned int numParamsToCheck_) const
 
Premiseoperator= (int param_)
 
Premiseoperator+= (int param_)
 
virtual int serialize (std::ofstream &fout_) const
 
virtual int assemble (std::ifstream &fin_)
 
virtual ~Premise ()
 empty destructor More...
 

Public Attributes

std::vector< int > _params
 _params[0] must be the premise ID More...
 
float _entryTime
 

of secs elapsed from time program started to time entered in a KB

More...
 
bool _negated
 look for absence of this premise in a KB More...
 

Detailed Description

Premise is the base class for all game related statements.

Constructor & Destructor Documentation

OpenSkyNet::AI::Premise::Premise ( )
inline

default constructor

OpenSkyNet::AI::Premise::Premise ( const std::vector< int > &  params_)
inline

constructor

Parameters
params_parameters to initialize with
virtual OpenSkyNet::AI::Premise::~Premise ( )
inlinevirtual

empty destructor

Member Function Documentation

int Premise::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()
bool Premise::equals ( const Premise rhs_,
unsigned int  numParamsToCheck_ 
) const
virtual

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

See Also
operator==()
Premise& OpenSkyNet::AI::Premise::operator+= ( int  param_)
inline

adds a parameter

See Also
operator=()
Premise& OpenSkyNet::AI::Premise::operator= ( int  param_)
inline

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

See Also
operator+=()
bool Premise::operator== ( const Premise rhs_) const
virtual

must have same number and all equal parameters to return true

See Also
equals()
int Premise::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()

Member Data Documentation

float OpenSkyNet::AI::Premise::_entryTime

of secs elapsed from time program started to time entered in a KB

bool OpenSkyNet::AI::Premise::_negated

look for absence of this premise in a KB

std::vector<int> OpenSkyNet::AI::Premise::_params

_params[0] must be the premise ID


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