SimpleAI
 All Classes Namespaces Files Functions Variables Typedefs Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ai::Not Class Reference

This condition will just swap the result of the contained condition. More...

#include <Not.h>

Inheritance diagram for ai::Not:
[legend]
Collaboration diagram for ai::Not:
[legend]

Public Member Functions

 Not (const ConditionPtr &condition)
 
bool evaluate (const AIPtr &entity) override
 Checks whether the condition evaluates to true for the given entity. More...
 
- Public Member Functions inherited from ai::ICondition
 ICondition (const std::string &name, const std::string &parameters)
 
const std::string & getName () const
 Returns the short name of the condition - without any related conditions or results.
 
const std::string & getParameters () const
 Returns the raw parameters of the condition.
 
std::string getNameWithConditions (const AIPtr &entity)
 Returns the full condition string with all related conditions and results of the evaluation method. More...
 
- Public Member Functions inherited from ai::_MemObject< AllocatorClass >
void * operator new (size_t size)
 
void * operator new (size_t, void *ptr)
 
void * operator new[] (size_t size)
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 

Protected Member Functions

void getConditionNameWithValue (std::stringstream &s, const AIPtr &entity) override
 Override this method to get a more detailed result in getNameWithConditions() More...
 

Protected Attributes

ConditionPtr _condition
 
- Protected Attributes inherited from ai::ICondition
int _id
 Every node has an id to identify it. It's unique per type.
 
const std::string _name
 
const std::string _parameters
 

Additional Inherited Members

- Static Protected Member Functions inherited from ai::ICondition
static int getNextId ()
 

Detailed Description

This condition will just swap the result of the contained condition.

Member Function Documentation

bool ai::Not::evaluate ( const AIPtr &  entity)
inlineoverridevirtual

Checks whether the condition evaluates to true for the given entity.

Parameters
[in,out]entityThe entity that is used to evaluate the condition
Returns
true if the condition is fulfilled, false otherwise.

Implements ai::ICondition.

void ai::Not::getConditionNameWithValue ( std::stringstream &  s,
const AIPtr &  entity 
)
inlineoverrideprotectedvirtual

Override this method to get a more detailed result in getNameWithConditions()

Parameters
[out]sThe string stream to write your details to
[in,out]entityThe entity that is used to evaluate a condition
See Also
getNameWithConditions()

Reimplemented from ai::ICondition.


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