Orocos Real-Time Toolkit  2.9.0
StreamFactory.hpp
Go to the documentation of this file.
1 #ifndef ORO_STREAM_FACTORY_HPP
2 #define ORO_STREAM_FACTORY_HPP
3 
4 #include <ostream>
5 #include <istream>
6 #include "../base/DataSourceBase.hpp"
7 #include <boost/shared_ptr.hpp>
8 #include <string>
9 #include "../rtt-config.h"
10 
11 namespace RTT
12 {
13  namespace types
14  {
15 
17  {
18  public:
19  virtual ~StreamFactory() {};
20 
30  virtual std::ostream& write(std::ostream& os, base::DataSourceBase::shared_ptr in ) const = 0;
31 
36  virtual std::istream& read(std::istream& os, base::DataSourceBase::shared_ptr out ) const = 0;
37 
41  virtual std::string toString( base::DataSourceBase::shared_ptr in ) const;
42 
46  virtual bool fromString( const std::string& value, base::DataSourceBase::shared_ptr out ) const;
47 
52  virtual bool isStreamable() const = 0;
54  };
55  typedef boost::shared_ptr<StreamFactory> StreamFactoryPtr;
56  }
57 }
58 #endif
#define RTT_API
Definition: rtt-config.h:97
boost::shared_ptr< StreamFactory > StreamFactoryPtr
boost::intrusive_ptr< DataSourceBase > shared_ptr
Use this type to store a pointer to a DataSourceBase.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition: Activity.cpp:52