Change naming convention for C++ interfaces
[alexxy/gromacs.git] / src / gromacs / gmxlib / oenv.cpp
index 3241c0bfc63da12c88edf6b045972e886f5d1188..e835286bf7430e0d2d6c84baa83245158ffbdf30 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, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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.
 
 #include "gromacs/legacyheaders/oenv.h"
 
-#include "gromacs/utility/smalloc.h"
-
-#include "gromacs/utility/programcontext.h"
 #include "gromacs/utility/exceptions.h"
+#include "gromacs/utility/programcontext.h"
+#include "gromacs/utility/smalloc.h"
 
 struct output_env
 {
-    explicit output_env(const gmx::ProgramContextInterface &context)
+    explicit output_env(const gmx::IProgramContext &context)
         : programContext(context)
     {
         time_unit   = time_ps;
@@ -54,7 +53,7 @@ struct output_env
         verbosity   = 0;
     }
 
-    const gmx::ProgramContextInterface  &programContext;
+    const gmx::IProgramContext  &programContext;
 
     /* the time unit, enum defined in oenv.h */
     time_unit_t                          time_unit;
@@ -92,7 +91,7 @@ static const char *time_units_xvgr[] = {
 /***** OUTPUT_ENV MEMBER FUNCTIONS ******/
 
 void output_env_init(output_env_t *oenvp,
-                     const gmx::ProgramContextInterface &context,
+                     const gmx::IProgramContext &context,
                      time_unit_t tmu, gmx_bool view, xvg_format_t xvg_format,
                      int verbosity)
 {
@@ -197,14 +196,18 @@ xvg_format_t output_env_get_xvg_format(const output_env_t oenv)
 
 const char *output_env_get_program_display_name(const output_env_t oenv)
 {
+    const char *displayName = NULL;
+
     try
     {
-        return oenv->programContext.displayName();
+        displayName = oenv->programContext.displayName();
     }
     GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
+
+    return displayName;
 }
 
-const gmx::ProgramContextInterface &
+const gmx::IProgramContext &
 output_env_get_program_context(const output_env_t oenv)
 {
     return oenv->programContext;