#include <fact.h>
Public Types | |
typedef CLIPSPointer< Fact > | pointer |
Public Member Functions | |
Fact (Environment &environment, void *cobj=NULL) | |
~Fact () | |
bool | assign_slot_defaults () |
Assigns default values to a fact. | |
Template::pointer | get_template () |
Returns the template associated with a fact. | |
bool | exists () const |
Indicates whether a fact is still in the fact list or has been retracted. | |
long int | index () const |
Returns the fact index of a fact. | |
std::vector< std::string > | slot_names () |
Returns the slot names associated with this fact. | |
Values | slot_value (const std::string &slot_name) |
Return the values contained within a slot. | |
Fact::pointer | next () |
Returns the next fact in the fact list. | |
bool | set_slot (const std::string &slot_name, const Values &values) |
Sets the named slot to a specific value or values. | |
bool | set_slot (const std::string &slot_name, const Value &value) |
Sets the named slot to a specific value or values. | |
bool | retract () |
Retracts a fact from the fact list. | |
bool | operator== (const Fact &other) const |
bool | operator== (const Fact::pointer &other) const |
unsigned int | refcount () const |
![]() | |
EnvironmentObject (Environment &environment, void *cobj=NULL) | |
~EnvironmentObject () | |
Environment & | environment () const |
![]() | |
Object (void *cobj=NULL) | |
~Object () | |
void * | cobj () const |
Returns a pointer to the underlying CLIPS C object. |
Static Public Member Functions | |
static Fact::pointer | create (Environment &environment, void *cobj=NULL) |
static Fact::pointer | create (Environment &environment, Template::pointer temp) |
Additional Inherited Members | |
![]() | |
Environment & | m_environment |
![]() | |
void * | m_cobj |
The underlying CLIPS C object. |
typedef CLIPSPointer<Fact> CLIPS::Fact::pointer |
Reimplemented from CLIPS::Object.
CLIPS::Fact::Fact | ( | Environment & | environment, |
void * | cobj = NULL |
||
) |
References CLIPS::Object::cobj(), CLIPS::Object::m_cobj, and CLIPS::EnvironmentObject::m_environment.
Referenced by create().
CLIPS::Fact::~Fact | ( | ) |
bool CLIPS::Fact::assign_slot_defaults | ( | ) |
Assigns default values to a fact.
References CLIPS::Object::cobj(), CLIPS::Object::m_cobj, and CLIPS::EnvironmentObject::m_environment.
|
static |
References Fact().
Referenced by CLIPS::Environment::assert_fact(), CLIPS::Environment::assert_fact_f(), CLIPS::Environment::get_facts(), get_template(), and next().
|
static |
References CLIPS::Object::cobj(), and Fact().
bool CLIPS::Fact::exists | ( | ) | const |
Indicates whether a fact is still in the fact list or has been retracted.
References CLIPS::Object::cobj(), CLIPS::Object::m_cobj, and CLIPS::EnvironmentObject::m_environment.
Referenced by next().
Template::pointer CLIPS::Fact::get_template | ( | ) |
Returns the template associated with a fact.
References CLIPS::Object::cobj(), create(), CLIPS::Object::m_cobj, and CLIPS::EnvironmentObject::m_environment.
long int CLIPS::Fact::index | ( | ) | const |
Returns the fact index of a fact.
References CLIPS::Object::cobj(), CLIPS::Object::m_cobj, and CLIPS::EnvironmentObject::m_environment.
Referenced by operator==().
Fact::pointer CLIPS::Fact::next | ( | ) |
Returns the next fact in the fact list.
References CLIPS::Object::cobj(), create(), exists(), CLIPS::Object::m_cobj, and CLIPS::EnvironmentObject::m_environment.
bool CLIPS::Fact::operator== | ( | const Fact::pointer & | other | ) | const |
References index().
unsigned int CLIPS::Fact::refcount | ( | ) | const |
References CLIPS::Object::m_cobj.
bool CLIPS::Fact::retract | ( | ) |
Retracts a fact from the fact list.
References CLIPS::Object::cobj(), CLIPS::Object::m_cobj, and CLIPS::EnvironmentObject::m_environment.
bool CLIPS::Fact::set_slot | ( | const std::string & | slot_name, |
const Values & | values | ||
) |
Sets the named slot to a specific value or values.
References CLIPS::Object::cobj(), CLIPS::Object::m_cobj, CLIPS::EnvironmentObject::m_environment, and CLIPS::value_to_data_object().
bool CLIPS::Fact::set_slot | ( | const std::string & | slot_name, |
const Value & | value | ||
) |
Sets the named slot to a specific value or values.
References CLIPS::Object::cobj(), CLIPS::Object::m_cobj, CLIPS::EnvironmentObject::m_environment, and CLIPS::value_to_data_object().
std::vector< std::string > CLIPS::Fact::slot_names | ( | ) |
Returns the slot names associated with this fact.
References CLIPS::Object::cobj(), CLIPS::data_object_to_strings(), CLIPS::Object::m_cobj, and CLIPS::EnvironmentObject::m_environment.
Values CLIPS::Fact::slot_value | ( | const std::string & | slot_name | ) |
Return the values contained within a slot.
References CLIPS::Object::cobj(), CLIPS::data_object_to_values(), CLIPS::Object::m_cobj, and CLIPS::EnvironmentObject::m_environment.