CYCLUS
Loading...
Searching...
No Matches
commodity.cc
Go to the documentation of this file.
1#include "commodity.h"
2
3namespace cyclus {
4namespace toolkit {
5
6// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
7Commodity::Commodity() : name_("") {}
8
9// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
10Commodity::Commodity(std::string name) : name_(name) {}
11
12// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
13std::string Commodity::name() const {
14 return name_;
15}
16
17// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
19 return (name_ == other.name());
20}
21
22// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
24 return !(*this == other);
25}
26
27} // namespace toolkit
28} // namespace cyclus
A simple class defining a commodity; it is currently super simple.
Definition commodity.h:12
Commodity()
Default constructor.
Definition commodity.cc:7
bool operator!=(const Commodity &other) const
Inequality operator.
Definition commodity.cc:23
bool operator==(const Commodity &other) const
Equality operator.
Definition commodity.cc:18
std::string name() const
The commodity's name.
Definition commodity.cc:13
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
Definition agent.cc:14
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters