clipsmm - C++ CLIPS Interface Library

clipsmm logo
template.h
Go to the documentation of this file.
1/***************************************************************************
2 * Copyright (C) 2006 by Rick L. Vinyard, Jr. *
3 * rvinyard@cs.nmsu.edu *
4 * *
5 * This file is part of the clipsmm library. *
6 * *
7 * The clipsmm library is free software; you can redistribute it and/or *
8 * modify it under the terms of the GNU General Public License *
9 * version 3 as published by the Free Software Foundation. *
10 * *
11 * The clipsmm library is distributed in the hope that it will be *
12 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty *
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14 * General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this software. If not see <http://www.gnu.org/licenses/>. *
18 ***************************************************************************/
19#ifndef CLIPSTEMPLATE_H
20#define CLIPSTEMPLATE_H
21
22#include <vector>
23
25#include <clipsmm/value.h>
26
27#undef NO_DEFAULT
28#undef STATIC_DEFAULT
29#undef DYNAMIC_DEFAULT
30
31namespace CLIPS {
32
38
43public:
45
47
49
50 ~Template();
51
53 std::string name();
54
56 std::string module_name();
57
58 std::string formatted();
59
61 Values slot_allowed_values( const std::string& slot_name );
62
64 Values slot_cardinality( const std::string& slot_name );
65
67 DefaultType slot_default_type( const std::string& slot_name );
68
70 Values slot_default_value( const std::string& slot_name );
71
73 Values slot_range( const std::string& slot_name );
74
76 bool slot_exists( const std::string& slot_name );
77
79 bool is_multifield_slot( const std::string& slot_name );
80
82 bool is_single_field_slot( const std::string& slot_name );
83
85 std::vector<std::string> slot_names();
86
88 bool is_watched();
89
91
92 bool is_deletable();
93
94 void set_watch( unsigned state );
95
96 bool retract();
97
98 protected:
99
100};
101
102}
103
104#endif
Definition environmentobject.h:32
Environment & environment() const
Definition environmentobject.cpp:33
Definition environment.h:57
void * cobj() const
Returns a pointer to the underlying CLIPS C object.
Definition object.cpp:33
Definition template.h:42
bool slot_exists(const std::string &slot_name)
Determines whether a slot exists in the template.
Definition template.cpp:84
Values slot_cardinality(const std::string &slot_name)
Returns the cardinality information for a slot.
Definition template.cpp:72
bool is_deletable()
Definition template.cpp:166
bool is_watched()
True is this template is being watched.
Definition template.cpp:149
std::vector< std::string > slot_names()
Returns the slot names associated with this template.
Definition template.cpp:111
static Template::pointer create(Environment &environment, void *cobj=NULL)
Definition template.cpp:33
DefaultType slot_default_type(const std::string &slot_name)
Determines whether a slot has a default value.
Definition template.cpp:121
bool is_single_field_slot(const std::string &slot_name)
Determines whether a slot is a single field slot.
Definition template.cpp:102
std::string module_name()
The name of the module this template is in.
Definition template.cpp:46
std::string formatted()
Definition template.cpp:53
Template::pointer next()
Definition template.cpp:155
~Template()
Definition template.cpp:37
bool retract()
Definition template.cpp:177
Values slot_allowed_values(const std::string &slot_name)
Returns the allowed values for a given slot.
Definition template.cpp:60
std::string name()
The name of this template.
Definition template.cpp:39
bool is_multifield_slot(const std::string &slot_name)
Determines whether a slot is a multifield slot.
Definition template.cpp:93
void set_watch(unsigned state)
Definition template.cpp:172
Values slot_range(const std::string &slot_name)
Returns the range information for a slot.
Definition template.cpp:138
CLIPSPointer< Template > pointer
Definition template.h:44
Values slot_default_value(const std::string &slot_name)
Returns the default value for a given slot.
Definition template.cpp:127
Definition activation.cpp:29
std::vector< Value > Values
Definition value.h:278
DefaultType
Definition template.h:33
@ STATIC_DEFAULT
Definition template.h:35
@ DYNAMIC_DEFAULT
Definition template.h:36
@ NO_DEFAULT
Definition template.h:34
#define CLIPSPointer
Definition pointer.h:28

Generated on Wed Jul 19 2023 00:00:00 for clipsmm by doxygen 1.9.8