aGrUM  0.14.2
scheduleOperation_tpl.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  ***************************************************************************/
20 
21 #ifndef DOXYGEN_SHOULD_SKIP_THIS
22 
23 # include <agrum/agrum.h>
24 
25 namespace gum {
26 
28  template < typename GUM_SCALAR >
30  static Idx id = 0;
31  return ++id;
32  }
33 
35  template < typename GUM_SCALAR >
37  __type(t), __id(__newId()) {
38  // for debugging purposes
39  GUM_CONSTRUCTOR(ScheduleOperation);
40  }
41 
43  template < typename GUM_SCALAR >
45  const ScheduleOperation< GUM_SCALAR >& from) :
46  __type(from.__type),
47  __id(from.__id) {
48  // for debugging purposes
49  GUM_CONSTRUCTOR(ScheduleOperation);
50  }
51 
53  template < typename GUM_SCALAR >
55  // for debugging purposes
56  GUM_DESTRUCTOR(ScheduleOperation);
57  }
58 
60  template < typename GUM_SCALAR >
61  INLINE ScheduleOperation< GUM_SCALAR >& ScheduleOperation< GUM_SCALAR >::
62  operator=(const ScheduleOperation< GUM_SCALAR >& from) {
63  __type = from.__type;
64  __id = from.__id;
65  return *this;
66  }
67 
69  template < typename GUM_SCALAR >
72  return __type;
73  }
74 
76  template < typename GUM_SCALAR >
78  return __id;
79  }
80 
81 } /* namespace gum */
82 
83 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
Type type() const
returns the name of the operation
Idx __id
the id corresponding to the operation
Type __type
the name of the operation to perform
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
Idx id() const
returns the id of the operation
Type
the currently supported types of operations
static Idx __newId()
returns a new distinct ID for each operation
ScheduleOperation(Type t)
default constructor
virtual ~ScheduleOperation()
destructor
ScheduleOperation< GUM_SCALAR > & operator=(const ScheduleOperation< GUM_SCALAR > &)
copy operator