constify
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Sun, 12 Aug 2007 18:00:15 +0200
changeset 1343 421d8d4712f9
parent 1342 4603fcee4ffb
child 1344 2e0770120285
constify
src/core/callback-trace-source.h
--- a/src/core/callback-trace-source.h	Sun Aug 12 17:59:56 2007 +0200
+++ b/src/core/callback-trace-source.h	Sun Aug 12 18:00:15 2007 +0200
@@ -44,11 +44,11 @@
   CallbackTraceSource ();
   void AddCallback (CallbackBase const & callback, TraceContext const & context);
   void RemoveCallback (CallbackBase const & callback);
-  void operator() (void);
-  void operator() (T1 a1);
-  void operator() (T1 a1, T2 a2);
-  void operator() (T1 a1, T2 a2, T3 a3);
-  void operator() (T1 a1, T2 a2, T3 a3, T4 a4);
+  void operator() (void) const;
+  void operator() (T1 a1) const;
+  void operator() (T1 a1, T2 a2) const;
+  void operator() (T1 a1, T2 a2, T3 a3) const;
+  void operator() (T1 a1, T2 a2, T3 a3, T4 a4) const;
 
 private:
   typedef std::list<Callback<void,TraceContext const &,T1,T2,T3,T4> > CallbackList;
@@ -99,9 +99,9 @@
 template<typename T1, typename T2, 
          typename T3, typename T4>
 void 
-CallbackTraceSource<T1,T2,T3,T4>::operator() (void) 
+CallbackTraceSource<T1,T2,T3,T4>::operator() (void) const
 {
-  for (typename CallbackList::iterator i = m_callbackList.begin ();
+  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
        i != m_callbackList.end (); i++)
     {
       (*i) (m_context);
@@ -110,9 +110,9 @@
 template<typename T1, typename T2, 
          typename T3, typename T4>
 void 
-CallbackTraceSource<T1,T2,T3,T4>::operator() (T1 a1) 
+CallbackTraceSource<T1,T2,T3,T4>::operator() (T1 a1) const
 {
-  for (typename CallbackList::iterator i = m_callbackList.begin ();
+  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
        i != m_callbackList.end (); i++)
     {
       (*i) (m_context, a1);
@@ -121,9 +121,9 @@
 template<typename T1, typename T2, 
          typename T3, typename T4>
 void 
-CallbackTraceSource<T1,T2,T3,T4>::operator() (T1 a1, T2 a2) 
+CallbackTraceSource<T1,T2,T3,T4>::operator() (T1 a1, T2 a2) const
 {
-  for (typename CallbackList::iterator i = m_callbackList.begin ();
+  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
        i != m_callbackList.end (); i++)
     {
       (*i) (m_context, a1, a2);
@@ -132,9 +132,9 @@
 template<typename T1, typename T2, 
          typename T3, typename T4>
 void 
-CallbackTraceSource<T1,T2,T3,T4>::operator() (T1 a1, T2 a2, T3 a3) 
+CallbackTraceSource<T1,T2,T3,T4>::operator() (T1 a1, T2 a2, T3 a3) const
 {
-  for (typename CallbackList::iterator i = m_callbackList.begin ();
+  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
        i != m_callbackList.end (); i++)
     {
       (*i) (m_context, a1, a2, a3);
@@ -143,9 +143,9 @@
 template<typename T1, typename T2, 
          typename T3, typename T4>
 void 
-CallbackTraceSource<T1,T2,T3,T4>::operator() (T1 a1, T2 a2, T3 a3, T4 a4) 
+CallbackTraceSource<T1,T2,T3,T4>::operator() (T1 a1, T2 a2, T3 a3, T4 a4) const
 {
-  for (typename CallbackList::iterator i = m_callbackList.begin ();
+  for (typename CallbackList::const_iterator i = m_callbackList.begin ();
        i != m_callbackList.end (); i++)
     {
       (*i) (m_context, a1, a2, a3, a4);