clipsmm - C++ CLIPS Interface Library

clipsmm logo
Public Types | Public Member Functions | Static Public Member Functions | List of all members
CLIPS::Fact Class Reference

#include <fact.h>

Inheritance diagram for CLIPS::Fact:
Inheritance graph
[legend]

Public Types

typedef CLIPSPointer< Factpointer
 
- Public Types inherited from CLIPS::Object
typedef CLIPSPointer< Objectpointer
 

Public Member Functions

 Fact (Environment &environment, void *cobj=NULL)
 
 ~Fact ()
 
bool assign_slot_defaults ()
 Assigns default values to a fact. More...
 
Template::pointer get_template ()
 Returns the template associated with a fact. More...
 
bool exists () const
 Indicates whether a fact is still in the fact list or has been retracted. More...
 
long int index () const
 Returns the fact index of a fact. More...
 
std::vector< std::string > slot_names ()
 Returns the slot names associated with this fact. More...
 
Values slot_value (const std::string &slot_name)
 Return the values contained within a slot. More...
 
Fact::pointer next ()
 Returns the next fact in the fact list. More...
 
bool set_slot (const std::string &slot_name, const Values &values)
 Sets the named slot to a specific value or values. More...
 
bool set_slot (const std::string &slot_name, const Value &value)
 Sets the named slot to a specific value or values. More...
 
bool retract ()
 Retracts a fact from the fact list. More...
 
bool operator== (const Fact &other) const
 
bool operator== (const Fact::pointer &other) const
 
unsigned int refcount () const
 
- Public Member Functions inherited from CLIPS::EnvironmentObject
 EnvironmentObject (Environment &environment, void *cobj=NULL)
 
 ~EnvironmentObject ()
 
Environmentenvironment () const
 
- Public Member Functions inherited from CLIPS::Object
 Object (void *cobj=NULL)
 
 ~Object ()
 
void * cobj () const
 Returns a pointer to the underlying CLIPS C object. More...
 

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

- Protected Attributes inherited from CLIPS::EnvironmentObject
Environmentm_environment
 
- Protected Attributes inherited from CLIPS::Object
void * m_cobj
 The underlying CLIPS C object. More...
 

Detailed Description

Author
Rick L. Vinyard, Jr. rviny.nosp@m.ard@.nosp@m.cs.nm.nosp@m.su.e.nosp@m.du

Member Typedef Documentation

◆ pointer

Constructor & Destructor Documentation

◆ Fact()

CLIPS::Fact::Fact ( Environment environment,
void *  cobj = NULL 
)

◆ ~Fact()

CLIPS::Fact::~Fact ( )

Member Function Documentation

◆ assign_slot_defaults()

bool CLIPS::Fact::assign_slot_defaults ( )

Assigns default values to a fact.

Returns
true if the default values were successfully set, false otherwise

References CLIPS::Object::cobj(), CLIPS::Object::m_cobj, and CLIPS::EnvironmentObject::m_environment.

◆ create() [1/2]

Fact::pointer CLIPS::Fact::create ( Environment environment,
Template::pointer  temp 
)
static

◆ create() [2/2]

Fact::pointer CLIPS::Fact::create ( Environment environment,
void *  cobj = NULL 
)
static

◆ exists()

bool CLIPS::Fact::exists ( ) const

Indicates whether a fact is still in the fact list or has been retracted.

Returns
true if the fact is still in the fact list, false otherwise

◆ get_template()

Template::pointer CLIPS::Fact::get_template ( )

Returns the template associated with a fact.

References CLIPS::Object::cobj(), CLIPS::Object::m_cobj, and CLIPS::EnvironmentObject::m_environment.

◆ index()

long int CLIPS::Fact::index ( ) const

Returns the fact index of a fact.

Returns
the index of the fact or -1 if this fact object is uninitialized

References CLIPS::Object::m_cobj.

Referenced by set_slot().

◆ next()

Fact::pointer CLIPS::Fact::next ( )

Returns the next fact in the fact list.

References CLIPS::Object::cobj(), CLIPS::Object::m_cobj, and CLIPS::EnvironmentObject::m_environment.

◆ operator==() [1/2]

bool CLIPS::Fact::operator== ( const Fact other) const

◆ operator==() [2/2]

bool CLIPS::Fact::operator== ( const Fact::pointer other) const

◆ refcount()

unsigned int CLIPS::Fact::refcount ( ) const

◆ retract()

bool CLIPS::Fact::retract ( )

Retracts a fact from the fact list.

◆ set_slot() [1/2]

bool CLIPS::Fact::set_slot ( const std::string &  slot_name,
const Value value 
)

Sets the named slot to a specific value or values.

◆ set_slot() [2/2]

bool CLIPS::Fact::set_slot ( const std::string &  slot_name,
const Values values 
)

Sets the named slot to a specific value or values.

References index().

◆ slot_names()

std::vector< std::string > CLIPS::Fact::slot_names ( )

Returns the slot names associated with this fact.

◆ slot_value()

Values CLIPS::Fact::slot_value ( const std::string &  slot_name)

Return the values contained within a slot.


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

Generated on Mon Jul 27 2020 00:00:00 for clipsmm by doxygen 1.8.18