aGrUM  0.16.0
multiDimReadOnly_tpl.h
Go to the documentation of this file.
1 
30 namespace gum {
31 
32  // Default constructor
33 
34  template < typename GUM_SCALAR >
36  MultiDimImplementation< GUM_SCALAR >() {
37  GUM_CONSTRUCTOR(MultiDimReadOnly);
38  }
39 
40  // Default constructor
41 
42  template < typename GUM_SCALAR >
44  const MultiDimReadOnly< GUM_SCALAR >& from) :
45  MultiDimImplementation< GUM_SCALAR >(from) {
46  GUM_CONS_CPY(MultiDimReadOnly);
47  }
48 
49  // destructor
50 
51  template < typename GUM_SCALAR >
53  GUM_DESTRUCTOR(MultiDimReadOnly);
54  }
55 
56  // @throw OperationNotAllowed Raised because this is a read only table.
57 
58  template < typename GUM_SCALAR >
60  const GUM_SCALAR& value) const {
61  GUM_ERROR(OperationNotAllowed, "Write access to an aggregator");
62  }
63 
64  // @throw OperationNotAllowed Raised because this is a read only table.
65 
66  template < typename GUM_SCALAR >
67  void MultiDimReadOnly< GUM_SCALAR >::fill(const GUM_SCALAR&) const {
68  GUM_ERROR(OperationNotAllowed, "Write access to an aggregator");
69  }
70 
71  // @throw OperationNotAllowed Raised because this is a read only table.
72 
73  template < typename GUM_SCALAR >
75  GUM_ERROR(OperationNotAllowed, "No (unconst) access to an aggregator");
76  }
77 
78 } /* namespace gum */
virtual ~MultiDimReadOnly()
Class destructor.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
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:83
MultiDimReadOnly()
Default constructor.
<agrum/multidim/multiDimImplementation.h>
virtual void set(const Instantiation &i, const GUM_SCALAR &value) const
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55