From 0b2340d4efadb3018b725aa53e043eeff373c06f Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Thu, 30 Jun 2011 19:09:19 +0200
Subject: [PATCH] Cleanup of header files

Removed several not-necessary inclusions
---
 src/Action.h              | 5 ++---
 src/ActionWithArguments.h | 5 ++---
 src/ActionWithValue.h     | 2 +-
 src/DumpDerivatives.cpp   | 1 +
 src/Log.cpp               | 1 +
 src/Log.h                 | 3 ++-
 src/Print.cpp             | 1 +
 src/Tools.cpp             | 2 +-
 8 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/Action.h b/src/Action.h
index c9a34244c..61c111bbe 100644
--- a/src/Action.h
+++ b/src/Action.h
@@ -3,14 +3,13 @@
 #include <vector>
 #include <string>
 #include <set>
-#include "Log.h"
 #include "Tools.h"
-
-#include "PlumedCommunicator.h"
+#include "Log.h"
 
 namespace PLMD{
 
 class PlumedMain;
+class PlumedCommunicator;
 
 /// This class is used to bring the relevant information to the Action constructor.
 /// Only Action and ActionRegister class can access to its content, which is 
diff --git a/src/ActionWithArguments.h b/src/ActionWithArguments.h
index 45546f5b4..222b46144 100644
--- a/src/ActionWithArguments.h
+++ b/src/ActionWithArguments.h
@@ -1,12 +1,11 @@
 #ifndef __PLUMED_ActionWithArguments_h
 #define __PLUMED_ActionWithArguments_h
 
-#include "Action.h"
 #include <map>
 #include <vector>
 #include <cassert>
-
-#include "ActionWithValue.h"
+#include "Action.h"
+#include "Value.h"
 
 namespace PLMD{
 
diff --git a/src/ActionWithValue.h b/src/ActionWithValue.h
index 45e6742d5..2f5737e57 100644
--- a/src/ActionWithValue.h
+++ b/src/ActionWithValue.h
@@ -1,10 +1,10 @@
 #ifndef __PLUMED_ActionWithValue_h
 #define __PLUMED_ActionWithValue_h
 
-#include "Action.h"
 #include <map>
 #include <vector>
 #include <cassert>
+#include "Action.h"
 #include "Value.h"
 
 namespace PLMD{
diff --git a/src/DumpDerivatives.cpp b/src/DumpDerivatives.cpp
index 9068278bc..03714939c 100644
--- a/src/DumpDerivatives.cpp
+++ b/src/DumpDerivatives.cpp
@@ -1,6 +1,7 @@
 #include "ActionPilot.h"
 #include "ActionWithArguments.h"
 #include "ActionRegister.h"
+#include "PlumedCommunicator.h"
 
 using namespace std;
 
diff --git a/src/Log.cpp b/src/Log.cpp
index 952526285..c4d8ec132 100644
--- a/src/Log.cpp
+++ b/src/Log.cpp
@@ -1,4 +1,5 @@
 #include "Log.h"
+#include "PlumedCommunicator.h"
 #include <cstdarg>
 #include <cassert>
 #include <cstring>
diff --git a/src/Log.h b/src/Log.h
index 2a27ccb13..becbfb5b3 100644
--- a/src/Log.h
+++ b/src/Log.h
@@ -3,10 +3,11 @@
 #include <cstdio>
 #include <string>
 #include <sstream>
-#include "PlumedCommunicator.h"
 
 namespace PLMD{
 
+class PlumedCommunicator;
+
 /// Class containing the log stream.
 ///
 /// It is similar to a FILE stream. It allows a printf() function, and
diff --git a/src/Print.cpp b/src/Print.cpp
index ca722789c..a0ad96632 100644
--- a/src/Print.cpp
+++ b/src/Print.cpp
@@ -1,6 +1,7 @@
 #include "ActionPilot.h"
 #include "ActionWithArguments.h"
 #include "ActionRegister.h"
+#include "PlumedCommunicator.h"
 
 using namespace std;
 
diff --git a/src/Tools.cpp b/src/Tools.cpp
index 361488fb6..d36815f3f 100644
--- a/src/Tools.cpp
+++ b/src/Tools.cpp
@@ -1,6 +1,6 @@
 #include "Tools.h"
 #include <cstring>
-#include <assert.h>
+#include <cassert>
 #include <sstream>
 
 using namespace PLMD;
-- 
GitLab