X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a6680ce3d763763a6010c81c8a5a8f7a1ce052db..8582d7dfe21e7225d4a715501d70c2649268228f:/projects/sgconf/action.h diff --git a/projects/sgconf/action.h b/projects/sgconf/action.h index 940ea7f6..bd3555ed 100644 --- a/projects/sgconf/action.h +++ b/projects/sgconf/action.h @@ -18,8 +18,7 @@ * Author : Maxim Mamontov */ -#ifndef __STG_SGCONF_ACTION_H__ -#define __STG_SGCONF_ACTION_H__ +#pragma once #include #include @@ -37,21 +36,17 @@ class ACTION public: virtual ~ACTION() {} - virtual ACTION * Clone() const = 0; virtual std::string ParamDescription() const = 0; virtual std::string DefaultDescription() const = 0; virtual OPTION_BLOCK & Suboptions() = 0; virtual PARSER_STATE Parse(int argc, char ** argv, void * data = NULL) = 0; virtual void ParseValue(const std::string &) {} - class ERROR : public std::runtime_error + struct ERROR : std::runtime_error { - public: - ERROR(const std::string & message) - : std::runtime_error(message.c_str()) {} + explicit ERROR(const std::string & message) + : std::runtime_error(message.c_str()) {} }; }; } // namespace SGCONF - -#endif