// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
#define DeclException1(Exception1, type1, outsequence) \
class Exception1 : public dealii::ExceptionBase { \
public: \
- Exception1 (const type1 a1) : arg1 (a1) {}; \
- virtual ~Exception1 () throw () {}; \
+ Exception1 (const type1 a1) : arg1 (a1) {} \
+ virtual ~Exception1 () throw () {} \
virtual void print_info (std::ostream &out) const { \
out outsequence << std::endl; \
- }; \
+ } \
private: \
const type1 arg1; \
}
class Exception2 : public dealii::ExceptionBase { \
public: \
Exception2 (const type1 a1, const type2 a2) : \
- arg1 (a1), arg2(a2) {}; \
- virtual ~Exception2 () throw () {}; \
+ arg1 (a1), arg2(a2) {} \
+ virtual ~Exception2 () throw () {} \
virtual void print_info (std::ostream &out) const { \
out outsequence << std::endl; \
- }; \
+ } \
private: \
const type1 arg1; \
const type2 arg2; \
class Exception3 : public dealii::ExceptionBase { \
public: \
Exception3 (const type1 a1, const type2 a2, const type3 a3) : \
- arg1 (a1), arg2(a2), arg3(a3) {}; \
- virtual ~Exception3 () throw () {}; \
+ arg1 (a1), arg2(a2), arg3(a3) {} \
+ virtual ~Exception3 () throw () {} \
virtual void print_info (std::ostream &out) const { \
out outsequence << std::endl; \
- }; \
+ } \
private: \
const type1 arg1; \
const type2 arg2; \
public: \
Exception4 (const type1 a1, const type2 a2, \
const type3 a3, const type4 a4) : \
- arg1 (a1), arg2(a2), arg3(a3), arg4(a4) {}; \
- virtual ~Exception4 () throw () {}; \
+ arg1 (a1), arg2(a2), arg3(a3), arg4(a4) {} \
+ virtual ~Exception4 () throw () {} \
virtual void print_info (std::ostream &out) const { \
out outsequence << std::endl; \
- }; \
+ } \
private: \
const type1 arg1; \
const type2 arg2; \
public: \
Exception5 (const type1 a1, const type2 a2, const type3 a3, \
const type4 a4, const type5 a5) : \
- arg1 (a1), arg2(a2), arg3(a3), arg4(a4), arg5(a5) {}; \
- virtual ~Exception5 () throw () {}; \
+ arg1 (a1), arg2(a2), arg3(a3), arg4(a4), arg5(a5) {} \
+ virtual ~Exception5 () throw () {} \
virtual void print_info (std::ostream &out) const { \
out outsequence << std::endl; \
- }; \
+ } \
private: \
const type1 arg1; \
const type2 arg2; \
// $Id$
// Version: $Name$
//
-// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
* dummy mutex class, this
* of course does nothing.
*/
- ScopedLock (DummyThreadMutex &) {};
+ ScopedLock (DummyThreadMutex &) {}
/**
* Destructor. Unlock the
* dummy mutex class, this
* of course does nothing.
*/
- ~ScopedLock () {};
+ ~ScopedLock () {}
};
/**
* function does nothing as
* well.
*/
- inline void acquire () const {};
+ inline void acquire () const {}
/**
* Simulate release of the
* function does nothing as
* well.
*/
- inline void release () const {};
+ inline void release () const {}
};
* this function of course does
* nothing.
*/
- inline void signal () {};
+ inline void signal () {}
/**
* Signal to multiple listener
* this function of course does
* nothing.
*/
- inline void broadcast () {};
+ inline void broadcast () {}
/**
* Wait for the condition to be
* of course does nothing, but
* returns immediately.
*/
- inline void wait (DummyThreadMutex &) {};
+ inline void wait (DummyThreadMutex &) {}
};
* i.e. this function is a
* no-op.
*/
- int wait () { return 0; };
+ int wait () { return 0; }
/**
* Dump the state of this
* object. Here: do nothing.
*/
- void dump () {};
+ void dump () {}
/** @addtogroup Exceptions
* @{ */
* Constructor. Lock the
* mutex.
*/
- ScopedLock (PosixThreadMutex &m) : mutex(m) { mutex.acquire(); };
+ ScopedLock (PosixThreadMutex &m) : mutex(m) { mutex.acquire(); }
/**
* Destructor. Unlock the
* dummy mutex class, this
* of course does nothing.
*/
- ~ScopedLock () { mutex.release (); };
+ ~ScopedLock () { mutex.release (); }
private:
/**
/**
* Acquire a mutex.
*/
- inline void acquire () { pthread_mutex_lock(&mutex); };
+ inline void acquire () { pthread_mutex_lock(&mutex); }
/**
* Release the mutex again.
*/
- inline void release () { pthread_mutex_unlock(&mutex); };
+ inline void release () { pthread_mutex_unlock(&mutex); }
private:
/**
* met, i.e. that some data
* will now be available.
*/
- inline void signal () { pthread_cond_signal(&cond); };
+ inline void signal () { pthread_cond_signal(&cond); }
/**
* Signal to multiple listener
* met, i.e. that some data
* will now be available.
*/
- inline void broadcast () { pthread_cond_broadcast(&cond); };
+ inline void broadcast () { pthread_cond_broadcast(&cond); }
/**
* Wait for the condition to be
* mechanisms.
*/
inline void wait (PosixThreadMutex &mutex)
- { pthread_cond_wait(&cond, &mutex.mutex); };
+ { pthread_cond_wait(&cond, &mutex.mutex); }
private:
/**
/**
* Constructor.
*/
- thread_description_base () : was_joined (false) {};
+ thread_description_base () : was_joined (false) {}
/**
* Destructor.
public:
#endif
Thread (const boost::shared_ptr<internal::thread_description<RT> > &td)
- : thread_descriptor (td) {};
+ : thread_descriptor (td) {}
public:
* data created by the
* <tt>spawn</tt> functions.
*/
- Thread () {};
+ Thread () {}
/**
* Join the thread represented
void join () const {
AssertThrow (thread_descriptor, ExcNoThread());
thread_descriptor->join ();
- };
+ }
/**
* Get the return value of the
RT return_value () {
join ();
return thread_descriptor->ret_val.get();
- };
+ }
/**
*/
bool operator == (const Thread &t) {
return thread_descriptor == t.thread_descriptor;
- };
+ }
/** @addtogroup Exceptions
* @{ */
fun_wrapper (FunPtr fun_ptr,
const ArgReferences &args)
: fun_ptr (fun_ptr),
- args (args) {};
+ args (args) {}
private:
/**
* Default constructor. Made
internal::deregister_thread ();
return 0;
- };
+ }
/**
:
c (c),
mem_fun_ptr (mem_fun_ptr),
- args (args) {};
+ args (args) {}
private:
/**
* Default constructor. Made
internal::deregister_thread ();
return 0;
- };
+ }
/**
* Make the base class a
public:
inline mem_fun_encapsulator (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
operator() () {
return mem_fun_wrapper<RT,C,ArgList> (mem_fun_ptr, c,
ArgList()).fire_up ();
- };
+ }
private:
C &c;
public:
inline mem_fun_encapsulator (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
operator() (typename boost::tuples::element<0,ArgList>::type arg1) {
return mem_fun_wrapper<RT,C,ArgList> (mem_fun_ptr, c,
boost::tie(arg1)).fire_up ();
- };
+ }
private:
C &c;
public:
inline mem_fun_encapsulator (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
return mem_fun_wrapper<RT,C,ArgList> (mem_fun_ptr, c,
boost::tie(arg1,
arg2)).fire_up ();
- };
+ }
private:
C &c;
public:
inline mem_fun_encapsulator (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
boost::tie(arg1,
arg2,
arg3)).fire_up ();
- };
+ }
private:
C &c;
public:
inline mem_fun_encapsulator (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
return mem_fun_wrapper<RT,C,ArgList> (mem_fun_ptr, c,
boost::tie(arg1,arg2,
arg3,arg4)).fire_up ();
- };
+ }
private:
C &c;
public:
inline mem_fun_encapsulator (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
boost::tie(arg1,arg2,
arg3,arg4,
arg5)).fire_up ();
- };
+ }
private:
C &c;
public:
inline mem_fun_encapsulator (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
boost::tie(arg1,arg2,
arg3,arg4,
arg5,arg6)).fire_up ();
- };
+ }
private:
C &c;
public:
inline mem_fun_encapsulator (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
arg3,arg4,
arg5,arg6,
arg7)).fire_up ();
- };
+ }
private:
C &c;
public:
inline mem_fun_encapsulator (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
arg3,arg4,
arg5,arg6,
arg7,arg8)).fire_up ();
- };
+ }
private:
C &c;
public:
inline mem_fun_encapsulator (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
arg5,arg6,
arg7,arg8,
arg9)).fire_up ();
- };
+ }
private:
C &c;
public:
inline mem_fun_encapsulator (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
arg5,arg6,
arg7,arg8,
arg9, arg10)).fire_up ();
- };
+ }
private:
C &c;
public:
inline fun_encapsulator (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
operator() () {
return fun_wrapper<RT,ArgList> (fun_ptr,
ArgList()).fire_up ();
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_encapsulator (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
operator() (typename boost::tuples::element<0,ArgList>::type arg1) {
return fun_wrapper<RT,ArgList> (fun_ptr,
boost::tie(arg1)).fire_up ();
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_encapsulator (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
return fun_wrapper<RT,ArgList> (fun_ptr,
boost::tie(arg1,
arg2)).fire_up ();
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_encapsulator (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
boost::tie(arg1,
arg2,
arg3)).fire_up ();
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_encapsulator (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
return fun_wrapper<RT,ArgList> (fun_ptr,
boost::tie(arg1,arg2,
arg3,arg4)).fire_up ();
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_encapsulator (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
boost::tie(arg1,arg2,
arg3,arg4,
arg5)).fire_up ();
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_encapsulator (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
boost::tie(arg1,arg2,
arg3,arg4,
arg5,arg6)).fire_up ();
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_encapsulator (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
arg3,arg4,
arg5,arg6,
arg7)).fire_up ();
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_encapsulator (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
arg3,arg4,
arg5,arg6,
arg7,arg8)).fire_up ();
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_encapsulator (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
arg5,arg6,
arg7,arg8,
arg9)).fire_up ();
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_encapsulator (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
arg5,arg6,
arg7,arg8,
arg9, arg10)).fire_up ();
- };
+ }
private:
FunPtr fun_ptr;
/**
* Default constructor.
*/
- Thread () {};
+ Thread () {}
/**
* Initialize the return value
public:
inline mem_fun_forwarder (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
public:
inline mem_fun_forwarder (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
operator() (typename boost::tuples::element<0,ArgList>::type arg1) {
return Thread<RT> (mem_fun_ptr, c,
boost::tie(arg1));
- };
+ }
private:
C &c;
public:
inline mem_fun_forwarder (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
return Thread<RT> (mem_fun_ptr, c,
boost::tie(arg1,
arg2));
- };
+ }
private:
C &c;
public:
inline mem_fun_forwarder (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
boost::tie(arg1,
arg2,
arg3));
- };
+ }
private:
C &c;
public:
inline mem_fun_forwarder (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
return Thread<RT> (mem_fun_ptr, c,
boost::tie(arg1,arg2,
arg3,arg4));
- };
+ }
private:
C &c;
public:
inline mem_fun_forwarder (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
boost::tie(arg1,arg2,
arg3,arg4,
arg5));
- };
+ }
private:
C &c;
public:
inline mem_fun_forwarder (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
boost::tie(arg1,arg2,
arg3,arg4,
arg5,arg6));
- };
+ }
private:
C &c;
public:
inline mem_fun_forwarder (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
arg3,arg4,
arg5,arg6,
arg7));
- };
+ }
private:
C &c;
public:
inline mem_fun_forwarder (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
arg3,arg4,
arg5,arg6,
arg7,arg8));
- };
+ }
private:
C &c;
public:
inline mem_fun_forwarder (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
arg5,arg6,
arg7,arg8,
arg9));
- };
+ }
private:
C &c;
public:
inline mem_fun_forwarder (C &c, MemFunPtr mem_fun_ptr)
- : c (c), mem_fun_ptr(mem_fun_ptr) {};
+ : c (c), mem_fun_ptr(mem_fun_ptr) {}
inline
Thread<RT>
arg5,arg6,
arg7,arg8,
arg9, arg10));
- };
+ }
private:
C &c;
public:
inline fun_forwarder (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
operator() () {
return Thread<RT> (fun_ptr,
ArgList());
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_forwarder (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
operator() (typename boost::tuples::element<0,ArgList>::type arg1) {
return Thread<RT> (fun_ptr,
boost::tie(arg1));
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_forwarder (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
return Thread<RT> (fun_ptr,
boost::tie(arg1,
arg2));
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_forwarder (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
boost::tie(arg1,
arg2,
arg3));
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_forwarder (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
return Thread<RT> (fun_ptr,
boost::tie(arg1,arg2,
arg3,arg4));
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_forwarder (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
boost::tie(arg1,arg2,
arg3,arg4,
arg5));
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_forwarder (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
boost::tie(arg1,arg2,
arg3,arg4,
arg5,arg6));
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_forwarder (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
arg3,arg4,
arg5,arg6,
arg7));
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_forwarder (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
arg3,arg4,
arg5,arg6,
arg7,arg8));
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_forwarder (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
arg5,arg6,
arg7,arg8,
arg9));
- };
+ }
private:
FunPtr fun_ptr;
public:
inline fun_forwarder (FunPtr fun_ptr)
- : fun_ptr(fun_ptr) {};
+ : fun_ptr(fun_ptr) {}
inline
Thread<RT>
arg5,arg6,
arg7,arg8,
arg9, arg10));
- };
+ }
private:
FunPtr fun_ptr;
ThreadGroup & operator += (const Thread<RT> &t) {
threads.push_back (t);
return *this;
- };
+ }
/**
* Wait for all threads in the
for (typename std::list<Thread<RT> >::const_iterator
t=threads.begin(); t!=threads.end(); ++t)
t->join ();
- };
+ }
private:
/**