fact.h

00001 /***************************************************************************
00002  *   clipsmm C++ wrapper for the CLIPS c library                           *
00003  *   Copyright (C) 2006 by Rick L. Vinyard, Jr.                            *
00004  *   rvinyard@cs.nmsu.edu                                                  *
00005  *                                                                         *
00006  *   This program is free software; you can redistribute it and/or modify  *
00007  *   it under the terms of version 2 of the GNU General Public License as  *
00008  *   published by the Free Software Foundation.                            *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU Lesser General Public      *
00016  *   License along with this library; if not, write to the                 *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA              *
00019  ***************************************************************************/
00020 #ifndef CLIPSFACT_H
00021 #define CLIPSFACT_H
00022 
00023 #include <string>
00024 #include <vector>
00025 
00026 #include <clipsmm/environmentobject.h>
00027 #include <clipsmm/template.h>
00028 #include <clipsmm/factory.h>
00029 
00030 namespace CLIPS {
00031 
00035 class Fact: public EnvironmentObject {
00036 public:
00037   typedef CLIPSPointer<Fact> pointer;
00038 
00039     Fact( Environment& environment, void* cobj=NULL );
00040 
00041     static Fact::pointer create( Environment& environment, void* cobj=NULL );
00042 
00043     ~Fact();
00044 
00049     bool assign_slot_defaults();
00050 
00052     Template::pointer get_template();
00053 
00058     bool exists();
00059 
00064     long int index();
00065 
00067     std::vector<std::string> slot_names();
00068 
00070     Values slot_value(const std::string& slot_name);
00071 
00073                 Fact::pointer next();
00074 
00076     bool set_slot(const std::string& slot_name, const Values& values);
00077 
00079     bool set_slot(const std::string& slot_name, const Value& value);
00080 
00082                 bool retract();
00083 
00084   protected:
00085 
00086 };
00087 
00088 }
00089 
00090 #endif

Generated on Sun Nov 12 11:55:35 2006 by  doxygen 1.5.1