Soar Kernel  9.3.2 08-06-12
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Namespaces | Typedefs | Functions
soar_module.cpp File Reference
#include <portability.h>
#include "soar_module.h"
#include "agent.h"
#include "gdatastructs.h"
#include "instantiations.h"
#include "tempmem.h"
#include "prefmem.h"
#include "mem.h"
#include "print.h"
#include "decide.h"
#include "xml.h"
#include "wmem.h"
#include "soar_TraceNames.h"
#include "wma.h"

Go to the source code of this file.

Namespaces

namespace  soar_module

Typedefs

typedef struct agent_struct agent

Functions

wmesoar_module::add_module_wme (agent *my_agent, Symbol *id, Symbol *attr, Symbol *value)
memory_poolsoar_module::get_memory_pool (agent *my_agent, size_t size)
instantiationsoar_module::make_fake_instantiation (agent *my_agent, Symbol *state, wme_set *conditions, symbol_triple_list *actions)
wmemake_wme (agent *thisAgent, Symbol *id, Symbol *attr, Symbol *value, Bool acceptable)
void soar_module::remove_module_wme (agent *my_agent, wme *w)

Typedef Documentation

typedef struct agent_struct agent

Definition at line 34 of file soar_module.cpp.

Function Documentation

wme* make_wme ( agent thisAgent,
Symbol id,
Symbol attr,
Symbol value,
Bool  acceptable 
)

Definition at line 85 of file wmem.cpp.

Referenced by add_impasse_wme(), add_input_wme(), soar_module::add_module_wme(), decide_context_slot(), decide_non_context_slot(), do_acceptable_preference_wme_changes_for_slot(), and recursive_wme_copy().

{
wme *w;
thisAgent->num_existing_wmes++;
allocate_with_pool (thisAgent, &thisAgent->wme_pool, &w);
w->id = id;
w->attr = attr;
w->value = value;
symbol_add_ref (value);
w->acceptable = acceptable;
w->timetag = thisAgent->current_wme_timetag++;
w->grounds_tc = 0;
w->potentials_tc = 0;
w->locals_tc = 0;
w->next = NIL;
w->prev = NIL;
w->rete_next = NIL;
w->rete_prev = NIL;
/* REW: begin 09.15.96 */
/* When we first create a WME, it had no gds value.
Do this for ALL wmes, regardless of the operand mode, so that no undefined pointers
are floating around. */
w->gds = NIL;
w->gds_prev = NIL;
w->gds_next = NIL;
/* REW: end 09.15.96 */
w->wma_tc_value = 0;
return w;
}