00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef CLIPSTEMPLATE_H
00021 #define CLIPSTEMPLATE_H
00022
00023 #include <vector>
00024
00025 #include <clipsmm/environmentobject.h>
00026 #include <clipsmm/value.h>
00027
00028 #undef NO_DEFAULT
00029 #undef STATIC_DEFAULT
00030 #undef DYNAMIC_DEFAULT
00031
00032 namespace CLIPS {
00033
00034 typedef enum DefaultType {
00035 NO_DEFAULT=0,
00036 STATIC_DEFAULT=1,
00037 DYNAMIC_DEFAULT=2,
00038 } DefaultType;
00039
00043 class Template: public EnvironmentObject {
00044 public:
00045 typedef CLIPSPointer<Template> pointer;
00046
00047 Template( Environment& environment, void* cobj=NULL );
00048
00049 static Template::pointer create( Environment& environment, void* cobj=NULL );
00050
00051 ~Template();
00052
00054 std::string name();
00055
00057 std::string module_name();
00058
00059 std::string formatted();
00060
00062 Values slot_allowed_values( const std::string& slot_name );
00063
00065 Values slot_cardinality( const std::string& slot_name );
00066
00068 DefaultType slot_default_type( const std::string& slot_name );
00069
00071 Values slot_default_value( const std::string& slot_name );
00072
00074 Values slot_range( const std::string& slot_name );
00075
00077 bool slot_exists( const std::string& slot_name );
00078
00080 bool is_multifield_slot( const std::string& slot_name );
00081
00083 bool is_single_field_slot( const std::string& slot_name );
00084
00086 std::vector<std::string> slot_names();
00087
00089 bool is_watched();
00090
00091 Template::pointer next();
00092
00093 bool is_deletable();
00094
00095 void set_watch( unsigned state );
00096
00097 bool retract();
00098
00099 protected:
00100
00101 };
00102
00103 }
00104
00105 #endif