Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / utility / binaryinformation.h
index ba4c809b15031fcebe58a23a4bbad37f5dda1c5d..9542305898f82656d6c67ddc3f887fb80aeea653 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -61,59 +61,58 @@ class TextWriter;
  */
 class BinaryInformationSettings
 {
-    public:
-        BinaryInformationSettings();
+public:
+    BinaryInformationSettings();
 
-        //! Set whether to print information about build settings.
-        BinaryInformationSettings &extendedInfo(bool bEnabled)
-        {
-            bExtendedInfo_ = bEnabled;
-            return *this;
-        }
-        //! Set whether to print copyright and license information.
-        BinaryInformationSettings &copyright(bool bEnabled)
-        {
-            bCopyright_ = bEnabled;
-            return *this;
-        }
-        //! Set whether to print the process ID.
-        BinaryInformationSettings &processId(bool bEnabled)
-        {
-            bProcessId_ = bEnabled;
-            return *this;
-        }
-        //! Set whether to print a header line with "Generated by" text (for output files).
-        BinaryInformationSettings &generatedByHeader(bool bEnabled)
-        {
-            bGeneratedByHeader_ = bEnabled;
-            return *this;
-        }
-        //! Prefix each line with this string.
-        BinaryInformationSettings &linePrefix(const char *prefix)
-        {
-            prefix_ = prefix;
-            return *this;
-        }
-        //! Suffix each line with this string.
-        BinaryInformationSettings &lineSuffix(const char *suffix)
-        {
-            suffix_ = suffix;
-            return *this;
-        }
+    //! Set whether to print information about build settings.
+    BinaryInformationSettings& extendedInfo(bool bEnabled)
+    {
+        bExtendedInfo_ = bEnabled;
+        return *this;
+    }
+    //! Set whether to print copyright and license information.
+    BinaryInformationSettings& copyright(bool bEnabled)
+    {
+        bCopyright_ = bEnabled;
+        return *this;
+    }
+    //! Set whether to print the process ID.
+    BinaryInformationSettings& processId(bool bEnabled)
+    {
+        bProcessId_ = bEnabled;
+        return *this;
+    }
+    //! Set whether to print a header line with "Generated by" text (for output files).
+    BinaryInformationSettings& generatedByHeader(bool bEnabled)
+    {
+        bGeneratedByHeader_ = bEnabled;
+        return *this;
+    }
+    //! Prefix each line with this string.
+    BinaryInformationSettings& linePrefix(const char* prefix)
+    {
+        prefix_ = prefix;
+        return *this;
+    }
+    //! Suffix each line with this string.
+    BinaryInformationSettings& lineSuffix(const char* suffix)
+    {
+        suffix_ = suffix;
+        return *this;
+    }
 
-    private:
-        bool        bExtendedInfo_;
-        bool        bCopyright_;
-        bool        bProcessId_;
-        bool        bGeneratedByHeader_;
-        const char *prefix_;
-        const char *suffix_;
+private:
+    bool        bExtendedInfo_;
+    bool        bCopyright_;
+    bool        bProcessId_;
+    bool        bGeneratedByHeader_;
+    const char* prefix_;
+    const char* suffix_;
 
-        //! Needed to read the members without otherwise unnecessary accessors.
-        friend void printBinaryInformation(
-            TextWriter                      *writer,
-            const IProgramContext           &programContext,
-            const BinaryInformationSettings &settings);
+    //! Needed to read the members without otherwise unnecessary accessors.
+    friend void printBinaryInformation(TextWriter*                      writer,
+                                       const IProgramContext&           programContext,
+                                       const BinaryInformationSettings& settings);
 };
 
 /*! \brief
@@ -122,8 +121,7 @@ class BinaryInformationSettings
  * \param     fp             Where to print the information to.
  * \param[in] programContext Program information object to use.
  */
-void printBinaryInformation(FILE                          *fp,
-                            const IProgramContext         &programContext);
+void printBinaryInformation(FILE* fp, const IProgramContext& programContext);
 /*! \brief
  * Print basic information about the executable with custom settings.
  *
@@ -133,9 +131,9 @@ void printBinaryInformation(FILE                          *fp,
  *
  * \see BinaryInformationSettings
  */
-void printBinaryInformation(FILE                            *fp,
-                            const IProgramContext           &programContext,
-                            const BinaryInformationSettings &settings);
+void printBinaryInformation(FILE*                            fp,
+                            const IProgramContext&           programContext,
+                            const BinaryInformationSettingssettings);
 
 /*! \brief
  * Print basic information about the executable with custom settings.
@@ -147,10 +145,10 @@ void printBinaryInformation(FILE                            *fp,
  *
  * \see BinaryInformationSettings
  */
-void printBinaryInformation(TextWriter                      *writer,
-                            const IProgramContext           &programContext,
-                            const BinaryInformationSettings &settings);
+void printBinaryInformation(TextWriter*                      writer,
+                            const IProgramContext&           programContext,
+                            const BinaryInformationSettingssettings);
 
-}     // namespace gmx
+} // namespace gmx
 
 #endif