Skip to content

Commit

Permalink
corrected usage instructions, made EnumerateCosts return a string ins…
Browse files Browse the repository at this point in the history
…tead of printing to std::cout
  • Loading branch information
dean-krueger committed Nov 4, 2024
1 parent 5a4ae0e commit 5cf2eab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/toolkit/facility_cost.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ FacilityCost::FacilityCost(double capital_cost) {

FacilityCost::~FacilityCost() {}

void FacilityCost::EnumerateCosts(){
std::cout<<capital_cost_<<std::endl;
std::string FacilityCost::EnumerateCosts(){
std::ostringstream strs;
strs << capital_cost_;
std::string costs = strs.str();
return costs;
}

} // namespace toolkit
Expand Down
2 changes: 2 additions & 0 deletions src/toolkit/facility_cost.cycpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/// One should only need to:
/// - '#include "toolkit/facility_cost.cycpp.h"' in the header of the
/// archetype class (as private)
/// - '#include "toolkit/facility_cost.h"' in the main include section
/// of the header of the archetype class.

cyclus::toolkit::FacilityCost cost;

Expand Down
2 changes: 1 addition & 1 deletion src/toolkit/facility_cost.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class FacilityCost {
/// The default destructor for FacilityCost
~FacilityCost();

void EnumerateCosts();
std::string EnumerateCosts();

private:
/// Capital cost of the facility
Expand Down

0 comments on commit 5cf2eab

Please sign in to comment.