aGrUM  0.14.2
multiDimReadOnly.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Pierre-Henri WUILLEMIN et Christophe GONZALES *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
27 #ifndef GUM_MULTI_DIM_READONLY_H
28 #define GUM_MULTI_DIM_READONLY_H
29 
31 
32 namespace gum {
33 
43  template < typename GUM_SCALAR >
44  class MultiDimReadOnly : public MultiDimImplementation< GUM_SCALAR > {
45  public:
46  // =========================================================================
48  // =========================================================================
50 
55 
61 
65  virtual ~MultiDimReadOnly();
66 
67  virtual MultiDimContainer< GUM_SCALAR >* newFactory() const = 0;
68 
70  // =========================================================================
72  // =========================================================================
74 
79  virtual void set(const Instantiation& i, const GUM_SCALAR& value) const;
80 
85  virtual void fill(const GUM_SCALAR&) const;
86 
88 
89  protected:
94  virtual GUM_SCALAR& _get(const Instantiation& i) const;
95  };
96 } /* namespace gum */
97 
99 
100 #endif /* GUM_MULTI_DIM_READONLY_H */
virtual MultiDimContainer< GUM_SCALAR > * newFactory() const =0
Default constructor.
virtual ~MultiDimReadOnly()
Class destructor.
Implementation of the MultiDimReadOnly class.
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
Abstract base class for all multi dimensionnal containers.
Headers of gum::MultiDimImplementation.
Abstract base class for all multi dimensionnal read only structure.
virtual GUM_SCALAR & _get(const Instantiation &i) const
virtual void fill(const GUM_SCALAR &) const
Class for assigning/browsing values to tuples of discrete variables.
Definition: instantiation.h:80
MultiDimReadOnly()
Default constructor.
<agrum/multidim/multiDimImplementation.h>