CYCLUS
commodity.cc
Go to the documentation of this file.
1 #include "commodity.h"
2 
3 namespace cyclus {
4 namespace toolkit {
5 
6 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
7 Commodity::Commodity() : name_("") {}
8 
9 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
11 
12 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
14  return name_;
15 }
16 
17 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18 bool Commodity::operator==(const Commodity& other) const {
19  return (name_ == other.name());
20 }
21 
22 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
23 bool Commodity::operator!=(const Commodity& other) const {
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
bool operator==(const Commodity &other) const
Equality operator.
Definition: commodity.cc:18
bool operator!=(const Commodity &other) const
Inequality operator.
Definition: commodity.cc:23
Commodity()
Default constructor.
Definition: commodity.cc:7
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.org/Osi/browser/trunk.
Definition: agent.cc:14