coral
A C++ library for distributed co-simulation
slave_creator.hpp
Go to the documentation of this file.
1 
10 #ifndef CORAL_PROVIDER_SLAVE_CREATOR_HPP_INCLUDED
11 #define CORAL_PROVIDER_SLAVE_CREATOR_HPP_INCLUDED
12 
13 #include <chrono>
14 #include <string>
15 
16 #include <coral/model.hpp>
17 #include <coral/net.hpp>
18 
19 
20 namespace coral
21 {
22 namespace provider
23 {
24 
25 
28 {
29 public:
31  virtual const coral::model::SlaveTypeDescription& Description() const = 0;
32 
69  virtual bool Instantiate(
71  coral::net::SlaveLocator& slaveLocator) = 0;
72 
78  virtual std::string InstantiationFailureDescription() const = 0;
79 
80  // Virtual destructor to allow deletion through base class reference.
81  virtual ~SlaveCreator() { }
82 };
83 
84 
85 }} // namespace
86 #endif // header guard
87 
Main module header for coral::net.
virtual std::string InstantiationFailureDescription() const =0
A textual description of why a previous Instantiate() call failed.
STL class.
virtual bool Instantiate(std::chrono::milliseconds timeout, coral::net::SlaveLocator &slaveLocator)=0
Creates a new instance of this slave type.
A description of a slave type.
Definition: model.hpp:148
Definition: variable_io.hpp:28
virtual const coral::model::SlaveTypeDescription & Description() const =0
A description of this slave type.
An interface for classes that create slaves of a specific type.
Definition: slave_creator.hpp:27
Class which represents the network location(s) of a slave.
Definition: net.hpp:292
Main module header for coral::model.