# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLAISCRIPT::COperatorClass Class Reference

#include <interpret_object_operator.h>

Inheritance diagram for NLAISCRIPT::COperatorClass

Inheritance graph
[legend]
Collaboration diagram for NLAISCRIPT::COperatorClass:

Collaboration graph
[legend]
List of all members.

Public Methods

void setComment (char *)
 Sets the comment for the operator. More...

virtual void setGoal (const NLAIAGENT::CStringVarName &)
 Sets the goal the operator tries to achieve. More...

virtual void setGoal (const NLAIAGENT::IVarName *, std::list<const NLAIAGENT::IVarName *> &)
virtual const NLAILOGIC::CGoalgetGoal ()
virtual bool isValid (NLAILOGIC::CFactBase *)
 Verifies if the preconditions are validated<. More...

void compileFactPattern (NLAILOGIC::CFactPattern *, std::vector<NLAILOGIC::IBaseAssert *> &, std::vector<sint32> &)
 Transforms a CFactPattern in an assert and a list of variable positions in the operator. More...

NLAILOGIC::CFactbuildFromVars (NLAILOGIC::IBaseAssert *, std::vector<sint32> &, NLAILOGIC::CValueSet *)
sint32 getVarPos (NLAILOGIC::IBaseVar *)
 Looks for a variable in the operator's variables vector and returns its position. More...

NLAILOGIC::CValueSetunifyLiaison ( const NLAILOGIC::CValueSet *, NLAILOGIC::CValueSet *, std::vector<sint32> &)
 Tries to unify an instaciation of the operator's variables with a new CFact. More...

void getPosListForward (sint32, sint32, std::vector<sint32> &)
void getPosListBackward (sint32, sint32, std::vector<sint32> &)
void getAssertPos (NLAILOGIC::IBaseAssert *, std::vector<NLAILOGIC::IBaseAssert *> &, std::vector<sint32> &)
NLAILOGIC::CValueSetunifyBackward (std::list<NLAILOGIC::CFact *> &)
NLAILOGIC::CValueSetunifyForward (std::list<NLAILOGIC::CFact *> &)
virtual std::list<NLAILOGIC::CFact *>* test (std::list<NLAILOGIC::CFact *> &)
virtual std::list<NLAILOGIC::CFact *>* backward (std::list<NLAILOGIC::CFact *> &)
virtual std::list<NLAILOGIC::CFact *>* forward (std::list<NLAILOGIC::CFact *> &)
virtual std::list<NLAILOGIC::CFact *>* propagate (std::list<NLAILOGIC::CFact *> &)
virtual float priority () const
 Priority of the operator. More...

virtual void success ()
 Own success and failure functions These functions tell other operators and goals that might be waiting for the completion of this one. More...

virtual void failure ()
virtual void success ( NLAILOGIC::IBaseOperator *)
 Dependencies failure and success notification These functions are called by other operators or goals who failed or succeeded. More...

virtual void failure ( NLAILOGIC::IBaseOperator *)
 COperatorClass (const NLAIAGENT::IVarName &)
 COperatorClass (const NLAIC::CIdentType &)
 COperatorClass (const NLAIAGENT::IVarName &, const NLAIAGENT::IVarName &)
 COperatorClass (const COperatorClass &)
 COperatorClass ()
virtual ~COperatorClass ()
const NLAIC::IBasicTypeclone () const
 This function allow a pointer copy, that mean that the new class have the sam attributs caracteristics as the owne. More...

const NLAIC::IBasicTypenewInstance () const
 This function allow a new instance, that mean that the class is a class factory. More...

void getDebugString (char *t) const
 This is a Debug function, text is an character pointer to receive the debug text output, the debug text containe all think sensible to interset user. More...

virtual NLAIAGENT::IObjectIAbuildNewInstance () const
 Instanciates an object of the class. More...

void addPrecondition (NLAILOGIC::CFactPattern *)
void addPostcondition (NLAILOGIC::CFactPattern *)
void addFirstOrderCond (const NLAIAGENT::IVarName *, std::list<const NLAIAGENT::IVarName *> &)
 Add first order patterns as preconditions or postconditions. More...

void addFirstOrderConc (const NLAIAGENT::IVarName *, std::list<const NLAIAGENT::IVarName *> &)
void addBoolCond (const NLAIAGENT::IVarName *)
 Add first order patterns as preconditions or postconditions. More...

void addBoolConc (const NLAIAGENT::IVarName *)
void addCodeCond (IOpCode *)
 Add first order patterns as preconditions or postconditions PreConditions code must be any piece of code that returns an object that is true or false using the isTrue() function. More...

void addCodeConc (IOpCode *)
 PostConditions code is code that will be executed upon completion of the execution of the operator. More...

void addFuzzyCond (NLAIAGENT::IVarName *, NLAIAGENT::IVarName *)
void buildLogicTables ()
 Compiles the conds and concs internaly. More...

bool isValidFonc (NLAIAGENT::IObjectIA *)
void activatePostConditions (NLAIAGENT::IObjectIA *)
void initialiseFactBase (NLAILOGIC::CFactBase *)
std::vector<NLAIAGENT::IVarName *>& getFuzzyVars ()
std::vector<NLAIAGENT::IVarName *>& getFuzzySets ()

Public Attributes

std::list<const NLAIAGENT::IVarName *> _BooleanConds
 Initialisation from the grammar. More...

std::list<const NLAIAGENT::IVarName *> _BooleanConcs
std::vector<const NLAIAGENT::IVarName *> _CondAsserts
std::vector<const NLAIAGENT::IVarName *> _ConcAsserts
std::vector< std::list<const
NLAIAGENT::IVarName *> *> 
_ClassCondVars
std::vector< std::list<const
NLAIAGENT::IVarName *> *> 
_ClassConcVars
std::vector< IOpCode *> _CondCode
std::vector< IOpCode *> _ConcCode
NLAILOGIC::CFactBase_FactBase
std::vector<NLAIAGENT::IVarName *> _FuzzyVars
std::vector<NLAIAGENT::IVarName *> _FuzzySets

Static Public Attributes

const NLAIC::CIdentType IdOperatorClass

Private Attributes

NLAILOGIC::CGoal_Goal
const NLAIAGENT::IVarName_GoalAssert
 Goal the operator tris to validate. More...

std::list<const NLAIAGENT::IVarName *> _GoalVars
 Name of the goal's assert. More...

std::vector<NLAILOGIC::IBaseVar *> _Vars
 Name of the goal's vars. More...

std::vector< NLAILOGIC::IBaseAssert *> _Conds
 Variables of the operator. More...

std::vector< std::vector<sint32> > _PosVarsCond
 Preconditions asserts. More...

std::vector<NLAILOGIC::IBaseAssert *> _Concs
 Pos of a precondition pattern's vars in the operator's vars table. More...

std::vector< std::vector<sint32> > _PosVarsConc
 Postconditions asserts. More...

char* _Comment
 Pos of a postcondition pattern's vars in the operator's vars table. More...

std::vector<NLAILOGIC::CGoal_Steps
 Description of the operator. More...

std::vector<sint32_StepsMode

Constructor & Destructor Documentation

NLAISCRIPT::COperatorClass::COperatorClass ( const NLAIAGENT::IVarName & n )
 

Definition at line 13 of file logic/interpret_object_operator.cpp.

NLAISCRIPT::COperatorClass::COperatorClass ( const NLAIC::CIdentType & id )
 

Definition at line 22 of file logic/interpret_object_operator.cpp.

NLAISCRIPT::COperatorClass::COperatorClass ( const NLAIAGENT::IVarName & n,
const NLAIAGENT::IVarName & inheritance )
 

Definition at line 31 of file logic/interpret_object_operator.cpp.

NLAISCRIPT::COperatorClass::COperatorClass ( const COperatorClass & c )
 

Definition at line 40 of file logic/interpret_object_operator.cpp.

NLAISCRIPT::COperatorClass::COperatorClass ( )
 

Definition at line 64 of file logic/interpret_object_operator.cpp.

NLAISCRIPT::COperatorClass::~COperatorClass ( ) [virtual]
 

Definition at line 73 of file logic/interpret_object_operator.cpp.


Member Function Documentation

void NLAISCRIPT::COperatorClass::activatePostConditions ( NLAIAGENT::IObjectIA * c )
 

Definition at line 693 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::addBoolConc ( const NLAIAGENT::IVarName * conc_name )
 

Definition at line 570 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::addBoolCond ( const NLAIAGENT::IVarName * cond_name )
 

Add first order patterns as preconditions or postconditions.

Definition at line 565 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::addCodeConc ( IOpCode * code )
 

PostConditions code is code that will be executed upon completion of the execution of the operator.

Definition at line 583 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::addCodeCond ( IOpCode * code )
 

Add first order patterns as preconditions or postconditions PreConditions code must be any piece of code that returns an object that is true or false using the isTrue() function.

Definition at line 577 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::addFirstOrderConc ( const NLAIAGENT::IVarName * assert_name,
std::list< const NLAIAGENT::IVarName *>& params_list )
 

Definition at line 552 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::addFirstOrderCond ( const NLAIAGENT::IVarName * assert_name,
std::list< const NLAIAGENT::IVarName *>& params_list )
 

Add first order patterns as preconditions or postconditions.

Definition at line 538 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::addFuzzyCond ( NLAIAGENT::IVarName * var_name,
NLAIAGENT::IVarName * fset )
 

Definition at line 769 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::addPostcondition ( NLAILOGIC::CFactPattern * pattern )
 

Definition at line 436 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::addPrecondition ( NLAILOGIC::CFactPattern * pattern )
 

Definition at line 422 of file logic/interpret_object_operator.cpp.

std::list< NLAILOGIC::CFact *>* NLAISCRIPT::COperatorClass::backward ( std::list< NLAILOGIC::CFact *>& facts ) [virtual]
 

Definition at line 283 of file logic/interpret_object_operator.cpp.

NLAILOGIC::CFact * NLAISCRIPT::COperatorClass::buildFromVars ( NLAILOGIC::IBaseAssert * assert,
std::vector< sint32 >& pl,
NLAILOGIC::CValueSet * vars )
 

Definition at line 272 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::buildLogicTables ( )
 

Compiles the conds and concs internaly.

Definition at line 589 of file logic/interpret_object_operator.cpp.

NLAIAGENT::IObjectIA * NLAISCRIPT::COperatorClass::buildNewInstance ( ) const [virtual]
 

Instanciates an object of the class.

Reimplemented from NLAISCRIPT::CAgentClass.

Definition at line 147 of file logic/interpret_object_operator.cpp.

const NLAIC::IBasicType * NLAISCRIPT::COperatorClass::clone ( void ) const [virtual]
 

This function allow a pointer copy, that mean that the new class have the sam attributs caracteristics as the owne.

Reimplemented from NLAISCRIPT::CAgentClass.

Definition at line 122 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::compileFactPattern ( NLAILOGIC::CFactPattern * fp,
std::vector< NLAILOGIC::IBaseAssert *>& patterns,
std::vector< sint32 >& pos_Vars )
 

Transforms a CFactPattern in an assert and a list of variable positions in the operator.

Definition at line 483 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::failure ( NLAILOGIC::IBaseOperator * ) [virtual]
 

Definition at line 413 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::failure ( ) [virtual]
 

Definition at line 405 of file logic/interpret_object_operator.cpp.

std::list< NLAILOGIC::CFact *>* NLAISCRIPT::COperatorClass::forward ( std::list< NLAILOGIC::CFact *>& facts ) [virtual]
 

Definition at line 298 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::getAssertPos ( NLAILOGIC::IBaseAssert * a,
std::vector< NLAILOGIC::IBaseAssert *>& l,
std::vector< sint32 >& pos )
 

Definition at line 387 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::getDebugString ( char * t ) const [virtual]
 

This is a Debug function, text is an character pointer to receive the debug text output, the debug text containe all think sensible to interset user.

Reimplemented from NLAISCRIPT::CAgentClass.

Definition at line 134 of file logic/interpret_object_operator.cpp.

std::vector< NLAIAGENT::IVarName *>& NLAISCRIPT::COperatorClass::getFuzzySets<NLAIAGENT::IVarName *> ( ) [inline]
 

Definition at line 194 of file interpret_object_operator.h.

std::vector< NLAIAGENT::IVarName *>& NLAISCRIPT::COperatorClass::getFuzzyVars<NLAIAGENT::IVarName *> ( ) [inline]
 

Definition at line 189 of file interpret_object_operator.h.

const NLAILOGIC::CGoal * NLAISCRIPT::COperatorClass::getGoal ( ) [virtual]
 

Definition at line 417 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::getPosListBackward ( sint32,
sint32,
std::vector< sint32 >& )
 

void NLAISCRIPT::COperatorClass::getPosListForward ( sint32,
sint32,
std::vector< sint32 >& )
 

sint32 NLAISCRIPT::COperatorClass::getVarPos ( NLAILOGIC::IBaseVar * var )
 

Looks for a variable in the operator's variables vector and returns its position.

Definition at line 522 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::initialiseFactBase ( NLAILOGIC::CFactBase * inst__FactBase )
 

Definition at line 722 of file logic/interpret_object_operator.cpp.

bool NLAISCRIPT::COperatorClass::isValid ( NLAILOGIC::CFactBase * fb ) [virtual]
 

Verifies if the preconditions are validated<.

Definition at line 160 of file logic/interpret_object_operator.cpp.

bool NLAISCRIPT::COperatorClass::isValidFonc ( NLAIAGENT::IObjectIA * c )
 

Definition at line 655 of file logic/interpret_object_operator.cpp.

const NLAIC::IBasicType * NLAISCRIPT::COperatorClass::newInstance ( void ) const [virtual]
 

This function allow a new instance, that mean that the class is a class factory.

Reimplemented from NLAISCRIPT::CAgentClass.

Definition at line 128 of file logic/interpret_object_operator.cpp.

float NLAISCRIPT::COperatorClass::priority ( ) const [virtual]
 

Priority of the operator.

Definition at line 396 of file logic/interpret_object_operator.cpp.

std::list< NLAILOGIC::CFact *>* NLAISCRIPT::COperatorClass::propagate ( std::list< NLAILOGIC::CFact *>& facts ) [virtual]
 

Definition at line 316 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::setComment ( char * c )
 

Sets the comment for the operator.

Definition at line 759 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::setGoal ( const NLAIAGENT::IVarName * assert,
std::list< const NLAIAGENT::IVarName *>& args ) [virtual]
 

Definition at line 632 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::setGoal ( const NLAIAGENT::CStringVarName & g ) [virtual]
 

Sets the goal the operator tries to achieve.

Definition at line 626 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::success ( NLAILOGIC::IBaseOperator * ) [virtual]
 

Dependencies failure and success notification These functions are called by other operators or goals who failed or succeeded.

Definition at line 409 of file logic/interpret_object_operator.cpp.

void NLAISCRIPT::COperatorClass::success ( ) [virtual]
 

Own success and failure functions These functions tell other operators and goals that might be waiting for the completion of this one.

Definition at line 401 of file logic/interpret_object_operator.cpp.

std::list< NLAILOGIC::CFact *>* NLAISCRIPT::COperatorClass::test<NLAILOGIC::CFact *> ( std::list< NLAILOGIC::CFact *>& ) [inline, virtual]
 

Definition at line 94 of file interpret_object_operator.h.

NLAILOGIC::CValueSet * NLAISCRIPT::COperatorClass::unifyBackward ( std::list< NLAILOGIC::CFact *>& facts )
 

Definition at line 194 of file logic/interpret_object_operator.cpp.

NLAILOGIC::CValueSet * NLAISCRIPT::COperatorClass::unifyForward ( std::list< NLAILOGIC::CFact *>& facts )
 

Definition at line 233 of file logic/interpret_object_operator.cpp.

NLAILOGIC::CValueSet * NLAISCRIPT::COperatorClass::unifyLiaison ( const NLAILOGIC::CValueSet * fp,
NLAILOGIC::CValueSet * vals,
std::vector< sint32 >& pos_vals )
 

Tries to unify an instaciation of the operator's variables with a new CFact.

Definition at line 374 of file logic/interpret_object_operator.cpp.


Member Data Documentation

const NLAIC::CIdentType NLAISCRIPT::COperatorClass::IdOperatorClass [static]
 

Definition at line 62 of file interpret_object_operator.h.

std::list< const NLAIAGENT::IVarName *> NLAISCRIPT::COperatorClass::_BooleanConcs
 

Definition at line 137 of file interpret_object_operator.h.

std::list< const NLAIAGENT::IVarName *> NLAISCRIPT::COperatorClass::_BooleanConds
 

Initialisation from the grammar.

Definition at line 136 of file interpret_object_operator.h.

std::vector< std::list< const NLAIAGENT::IVarName *>*> NLAISCRIPT::COperatorClass::_ClassConcVars
 

Definition at line 141 of file interpret_object_operator.h.

std::vector< std::list< const NLAIAGENT::IVarName *>*> NLAISCRIPT::COperatorClass::_ClassCondVars
 

Definition at line 140 of file interpret_object_operator.h.

char * NLAISCRIPT::COperatorClass::_Comment [private]
 

Pos of a postcondition pattern's vars in the operator's vars table.

Definition at line 56 of file interpret_object_operator.h.

std::vector< const NLAIAGENT::IVarName *> NLAISCRIPT::COperatorClass::_ConcAsserts
 

Definition at line 139 of file interpret_object_operator.h.

std::vector< IOpCode *> NLAISCRIPT::COperatorClass::_ConcCode
 

Definition at line 143 of file interpret_object_operator.h.

std::vector< NLAILOGIC::IBaseAssert *> NLAISCRIPT::COperatorClass::_Concs [private]
 

Pos of a precondition pattern's vars in the operator's vars table.

Definition at line 50 of file interpret_object_operator.h.

std::vector< const NLAIAGENT::IVarName *> NLAISCRIPT::COperatorClass::_CondAsserts
 

Definition at line 138 of file interpret_object_operator.h.

std::vector< IOpCode *> NLAISCRIPT::COperatorClass::_CondCode
 

Definition at line 142 of file interpret_object_operator.h.

std::vector< NLAILOGIC::IBaseAssert *> NLAISCRIPT::COperatorClass::_Conds [private]
 

Variables of the operator.

Definition at line 47 of file interpret_object_operator.h.

NLAILOGIC::CFactBase * NLAISCRIPT::COperatorClass::_FactBase
 

Definition at line 145 of file interpret_object_operator.h.

std::vector< NLAIAGENT::IVarName *> NLAISCRIPT::COperatorClass::_FuzzySets
 

Definition at line 148 of file interpret_object_operator.h.

std::vector< NLAIAGENT::IVarName *> NLAISCRIPT::COperatorClass::_FuzzyVars
 

Definition at line 147 of file interpret_object_operator.h.

NLAILOGIC::CGoal * NLAISCRIPT::COperatorClass::_Goal [private]
 

Definition at line 40 of file interpret_object_operator.h.

const NLAIAGENT::IVarName * NLAISCRIPT::COperatorClass::_GoalAssert [private]
 

Goal the operator tris to validate.

Definition at line 42 of file interpret_object_operator.h.

std::list< const NLAIAGENT::IVarName *> NLAISCRIPT::COperatorClass::_GoalVars [private]
 

Name of the goal's assert.

Definition at line 43 of file interpret_object_operator.h.

std::vector< std::vector< sint32 > > NLAISCRIPT::COperatorClass::_PosVarsConc [private]
 

Postconditions asserts.

Definition at line 51 of file interpret_object_operator.h.

std::vector< std::vector< sint32 > > NLAISCRIPT::COperatorClass::_PosVarsCond [private]
 

Preconditions asserts.

Definition at line 48 of file interpret_object_operator.h.

std::vector< NLAILOGIC::CGoal > NLAISCRIPT::COperatorClass::_Steps [private]
 

Description of the operator.

Definition at line 58 of file interpret_object_operator.h.

std::vector< sint32 > NLAISCRIPT::COperatorClass::_StepsMode [private]
 

Definition at line 59 of file interpret_object_operator.h.

std::vector< NLAILOGIC::IBaseVar *> NLAISCRIPT::COperatorClass::_Vars [private]
 

Name of the goal's vars.

Definition at line 45 of file interpret_object_operator.h.


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