+ /*!
+ * Check, if file with overloaded commands is defined by
+ * LIBBATCH_OVERRIDE_CMDS environment variable.
+ * \param theIsDefined in/out parameter; true, if file is defined; false - otherwise
+ * \return the name of file with overloaded commands
+ */
+ const char * CommandsOverloader::isCmdFileDefined(bool & theIsDefined) const
+ {
+ const char * filename = getenv("LIBBATCH_OVERRIDE_CMDS");
+ theIsDefined = (filename != NULL && !string(filename).empty());
+ return filename;
+ }
+
+ /*!
+ * Check, if it is needed to show information about overloaded or not
+ * commands are used. It can be switched ON via the environment
+ * variable LIBBATCH_CHECK_CMDS=1.
+ * \return true, if it is needed to show information; false - otherwise
+ */
+ bool CommandsOverloader::isCheckCmdsDefined() const
+ {
+ char * check_cmds_env = getenv("LIBBATCH_CHECK_CMDS");
+ if (check_cmds_env && atoi(check_cmds_env) == 1)
+ return true;
+ return false;
+ }
+