Main Page | Class Hierarchy | Class List | File List | Class Members

kernel/Domain.h

00001 // Domain.h -- The interface to domains of CSP variables.
00002 
00003 /*
00004  * Copyright (C) 1997, 1998 Tudor Hulubei <tudor@hulubei.net>.
00005  *
00006  * This library is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU Lesser General Public License as
00008  * published by the Free Software Foundation; either version 2, or (at
00009  * your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA,
00019  * 02111-1307, USA.
00020  */
00021 
00022 /*
00023  * NOTE: This is an interal header file.
00024  * You should not attempt to use it directly.
00025  */
00026 
00027 // $Id: kernel_2Domain_8h-source.html,v 1.1 2005/05/25 12:37:18 tudor Exp $
00028 
00029 #ifndef _CSP_KERNEL_Domain_H
00030 #define _CSP_KERNEL_Domain_H
00031 
00032 
00033 CSP_NAMESPACE_BEGIN(csp);
00034 
00035 
00049 class CSP_API Domain :
00050     public list<Value*>
00051 {
00052   public:
00054     Domain() {}
00055 
00057     Domain(Value& value) { push_back(&value); }
00058 
00060     Domain(const Domain& domain) : list<Value*>(domain) {}
00061 
00063     virtual ~Domain() {}
00064 
00066     Value& value(id_t id);
00067 
00069     const Value& value(id_t id) const;
00070 
00073     bool operator==(const Domain& other) const;
00074 
00081     virtual wostream& print(wostream& wos) const;
00082 
00084     friend CSP_API wostream& operator<<(wostream& wos, const Domain& domain)
00085     {
00086         return domain.print(wos);
00087     }
00088 };
00089 
00090 
00091 CSP_NAMESPACE_END(csp);
00092 
00093 
00094 #endif // _CSP_KERNEL_Domain_H
00095 
00096 // Local Variables:
00097 // mode: C++
00098 // End:

Generated on Wed May 25 12:21:14 2005 for csp.kdevelop by  doxygen 1.3.9.1