Choreonoid  1.8
MediaItem.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_MEDIAPLUGIN_MEDIA_ITEM_H
7 #define CNOID_MEDIAPLUGIN_MEDIA_ITEM_H
8 
9 #include <cnoid/Item>
10 #include "exportdecl.h"
11 
12 namespace cnoid {
13 
14 class CNOID_EXPORT MediaItem : public Item
15 {
16 public:
17  static void initialize(ExtensionManager* ext);
18 
19  MediaItem();
20  MediaItem(const MediaItem& org);
21 
22  bool setMediaURI(const std::string& uri);
23  const std::string& mediaURI() const { return mediaURI_; }
24 
25  bool setMediaFilePath(const std::string& path);
26  const std::string& mediaFilePath() const { return mediaFilePath_; }
27 
28  void setOffsetTime(double offset);
29  double offsetTime() const { return offsetTime_; }
30 
31  const std::string& lastErrorMessage() const { return lastErrorMessage_; }
32 
33 protected:
34  virtual ~MediaItem();
35 
36  virtual Item* doDuplicate() const;
37  virtual void doPutProperties(PutPropertyFunction& putProperty);
38  virtual bool store(Archive& archive);
39  virtual bool restore(const Archive& archive);
40 
41 private:
42  std::string mediaURI_;
43  std::string mediaFilePath_;
44  double offsetTime_;
45  std::string lastErrorMessage_;
46 };
47 
49 }
50 
51 #endif
cnoid::MediaItem::offsetTime
double offsetTime() const
Definition: MediaItem.h:29
cnoid::ExtensionManager
Definition: ExtensionManager.h:23
cnoid::MediaItem
Definition: MediaItem.h:14
cnoid::PutPropertyFunction
Definition: PutPropertyFunction.h:51
cnoid::Archive
Definition: Archive.h:22
cnoid::ref_ptr< MediaItem >
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::Item
Definition: Item.h:29
cnoid::MediaItem::mediaURI
const std::string & mediaURI() const
Definition: MediaItem.h:23
cnoid::MediaItem::mediaFilePath
const std::string & mediaFilePath() const
Definition: MediaItem.h:26
cnoid::MediaItem::lastErrorMessage
const std::string & lastErrorMessage() const
Definition: MediaItem.h:31
cnoid::MediaItemPtr
ref_ptr< MediaItem > MediaItemPtr
Definition: MediaItem.h:48