Skip to content

Commit

Permalink
Bump version to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dpmcmlxxvi committed May 30, 2015
1 parent 80cb262 commit c0c7473
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
30 changes: 23 additions & 7 deletions src/clistats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,30 @@
*/
struct ApplicationProperties
{
/**
* Application version
* @returns Version string
*/
static
std::string
version()
{
return ApplicationProperties::VERSION_MAJOR + "." +
ApplicationProperties::VERSION_MINOR + "." +
ApplicationProperties::VERSION_PATCH;
}
static std::string NAME;
static std::string AUTHOR;
static std::string VERSION_MAJOR;
static std::string VERSION_MINOR;
static std::string VERSION_PATCH;
};

std::string ApplicationProperties::NAME = "clistats";
std::string ApplicationProperties::AUTHOR = "[email protected]";
std::string ApplicationProperties::VERSION_MAJOR = "0";
std::string ApplicationProperties::VERSION_MINOR = "1";
std::string ApplicationProperties::VERSION_MAJOR = "1";
std::string ApplicationProperties::VERSION_MINOR = "0";
std::string ApplicationProperties::VERSION_PATCH = "0";

/**
* @struct Logger
Expand Down Expand Up @@ -1655,8 +1669,9 @@ class CommandLineParser
/**
* Print software usage
*/
static
void
printUsage() const
printUsage()
{
std::cout << std::endl;
std::cout << "NAME" << std::endl;
Expand Down Expand Up @@ -1888,10 +1903,11 @@ class CommandLineParser
/**
* Print software version
*/
static
void
printVersion() const
printVersion()
{
std::cout << ApplicationProperties::VERSION_MAJOR << "." << ApplicationProperties::VERSION_MINOR << std::endl;
std::cout << ApplicationProperties::version() << std::endl;
}

/**
Expand Down Expand Up @@ -4009,12 +4025,12 @@ pdrv(int argc,
CommandLineParser parser(argc, argv);
if (parser.showUsage())
{
parser.printUsage();
CommandLineParser::printUsage();
return AppStatus::SUCCESS;
}
else if (parser.showVersion())
{
parser.printVersion();
CommandLineParser::printVersion();
return AppStatus::SUCCESS;
}
options = parser.options;
Expand Down
2 changes: 1 addition & 1 deletion test/clistatstest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ main(int argc,
// Display header
// ----------------------------------------------------------------------
std::cout << std::endl;
std::cout << " Testing " << ApplicationProperties::NAME << " " << ApplicationProperties::VERSION_MAJOR << "." << ApplicationProperties::VERSION_MINOR << std::endl;
std::cout << " Testing " << ApplicationProperties::NAME << " " << ApplicationProperties::version() << std::endl;
std::cout << std::endl;

std::cout << header << std::endl;
Expand Down

0 comments on commit c0c7473

Please sign in to comment.