IText.hpp
1 #ifndef DM_ITEXT_HPP_INCLUDED
2 #define DM_ITEXT_HPP_INCLUDED
3 
4 #ifdef _MSC_VER
5  #pragma once
6 #endif
7 
8 #include "DM/config.hpp"
9 #include "DM/ObjectBase.hpp"
10 #include "DM/Handle.hpp"
11 
12 DM_NAMESPACE_BEGIN
13 
14 /// \brief Simple text object
15 /**
16  For transporting text (=strings) from inside the DM to the outside, handling the life time problem
17 */
18 class DM_API IText : public ObjectBase
19 {
20 public:
21  static IText* New(const char* msg);
22 
23 protected:
24  virtual ~IText() {}
25 
26 public:
27  virtual const char* c_str() const = 0;
28  virtual IText &operator=(const char *) = 0;
29 };
30 
32 
33 DM_NAMESPACE_END
34 
35 #endif //DM_ITEXT_HPP_INCLUDED