Skip to content

Commit

Permalink
Separate version control.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Ahrenkiel authored and Phil Ahrenkiel committed Nov 20, 2023
1 parent 3c82620 commit bf190b6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ set(headers
)

set(source
HPWHversion.cc
HPWH.cc
HPWHHeatSources.cc
HPWHHeatingLogics.cc
Expand Down
11 changes: 0 additions & 11 deletions src/HPWH.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ void HPWH::setMinutesPerStep(const double minutesPerStep_in)
hoursPerStep = minutesPerStep / 60.0;
};

//ugh, this should be in the header
const std::string HPWH::version_maint = HPWHVRSN_META;

// public HPWH functions
HPWH::HPWH(): messageCallback(NULL),messageCallbackContextPtr(NULL),hpwhVerbosity(VRB_silent)
{
Expand Down Expand Up @@ -269,14 +266,6 @@ HPWH & HPWH::operator=(const HPWH &hpwh) {
HPWH::~HPWH() {
}

string HPWH::getVersion() {
std::stringstream version;

version << version_major << '.' << version_minor << '.' << version_patch << version_maint;

return version.str();
}

int HPWH::runOneStep(double drawVolume_L,
double tankAmbientT_C,double heatSourceAmbientT_C,
DRMODES DRstatus,
Expand Down
17 changes: 17 additions & 0 deletions src/HPWHversion.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Version control
*/

#include "HPWHVersion.hh"
#include "HPWH.hh"

//ugh, this should be in the header
const std::string HPWH::version_maint = HPWHVRSN_META;

std::string HPWH::getVersion() {
std::stringstream version;

version << version_major << '.' << version_minor << '.' << version_patch << version_maint;

return version.str();
}

0 comments on commit bf190b6

Please sign in to comment.