CYCLUS
Loading...
Searching...
No Matches
builder.h
Go to the documentation of this file.
1#ifndef CYCLUS_SRC_TOOLKIT_BUILDER_H_
2#define CYCLUS_SRC_TOOLKIT_BUILDER_H_
3
4#include <set>
5
6#include "agent_managed.h"
8
9namespace cyclus {
10namespace toolkit {
11
12/// A mixin to provide information about commodity producers that can
13/// be built.
14class Builder : public AgentManaged {
15 public:
17 virtual ~Builder() {}
18
19 /// Register a commodity producer with the agent
20 /// @param producer the producer
21 inline void Register(CommodityProducer* producer) {
22 producers_.insert(producer);
23 }
24
25 /// Unregister a commodity producer with the agent
26 /// @param producer the producer
27 inline void Unregister(CommodityProducer* producer) {
28 producers_.erase(producer);
29 }
30
31 inline const std::set<CommodityProducer*>& producers() const {
32 return producers_;
33 }
34
35 private:
36 std::set<CommodityProducer*> producers_;
37};
38
39} // namespace toolkit
40} // namespace cyclus
41
42#endif // CYCLUS_SRC_TOOLKIT_BUILDER_H_
The abstract base class used by all types of agents that live and interact in a simulation.
Definition agent.h:49
This is a mixin class that provides an interface to access the underlying agent that manages it.
A mixin to provide information about commodity producers that can be built.
Definition builder.h:14
Builder(Agent *agent=NULL)
Definition builder.h:16
void Register(CommodityProducer *producer)
Register a commodity producer with the agent.
Definition builder.h:21
const std::set< CommodityProducer * > & producers() const
Definition builder.h:31
void Unregister(CommodityProducer *producer)
Unregister a commodity producer with the agent.
Definition builder.h:27
A mixin to provide information about produced commodities.
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