Choreonoid  1.5
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
cnoid::MediaItem Class Reference

#include <MediaItem.h>

Inheritance diagram for cnoid::MediaItem:
cnoid::Item cnoid::Referenced

Public Member Functions

 MediaItem ()
 
 MediaItem (const MediaItem &org)
 
bool setMediaURI (const std::string &uri)
 
const std::string & mediaURI () const
 
bool setMediaFilePath (const std::string &path)
 
const std::string & mediaFilePath () const
 
void setOffsetTime (double offset)
 
double offsetTime () const
 
const std::string & lastErrorMessage () const
 
- Public Member Functions inherited from cnoid::Item
virtual ~Item ()
 
const std::string & name () const
 
virtual void setName (const std::string &name)
 
bool hasAttribute (Attribute attribute) const
 
Item * childItem () const
 
Item * prevItem () const
 
Item * nextItem () const
 
Item * parentItem () const
 
bool addChildItem (Item *item, bool isManualOperation=false)
 
bool addSubItem (Item *item)
 
bool isSubItem () const
 
void detachFromParentItem ()
 
void emitSigDetachedFromRootForSubTree ()
 
bool insertChildItem (Item *item, Item *nextItem, bool isManualOperation=false)
 
bool insertSubItem (Item *item, Item *nextItem)
 
bool isTemporal () const
 
void setTemporal (bool on=true)
 
RootItem * findRootItem () const
 
Item * findItem (const std::string &path) const
 
template<class ItemType >
ItemType * findItem (const std::string &path) const
 
template<class ItemType >
ItemType * find (const std::string &path)
 
Item * findChildItem (const std::string &path) const
 
template<class ItemType >
ItemType * findChildItem (const std::string &path) const
 
Item * findSubItem (const std::string &path) const
 
template<class ItemType >
ItemType * findSubItem (const std::string &path) const
 
Item * headItem () const
 
template<class ItemType >
ItemType * findOwnerItem (bool includeSelf=false)
 
bool isOwnedBy (Item *item) const
 
bool traverse (boost::function< bool(Item *)> function)
 
template<class ItemType >
bool traverse (boost::function< bool(ItemType *item)> function)
 
Item * duplicate () const
 
Item * duplicateAll () const
 
void assign (Item *srcItem)
 
bool load (const std::string &filename, const std::string &format=std::string())
 
bool load (const std::string &filename, Item *parent, const std::string &format=std::string())
 
bool save (const std::string &filename, const std::string &format=std::string())
 
bool overwrite (bool forceOverwrite=false, const std::string &format=std::string())
 
const std::string & filePath () const
 
const std::string & fileFormat () const
 
std::time_t fileModificationTime () const
 
bool isConsistentWithFile () const
 
void clearFileInformation ()
 
void suggestFileUpdate ()
 
void putProperties (PutPropertyFunction &putProperty)
 
virtual void notifyUpdate ()
 
SignalProxy< void(const std::string &oldName)> sigNameChanged ()
 
SignalProxy< void()> sigUpdated ()
 
SignalProxy< void()> sigPositionChanged ()
 
SignalProxy< void()> sigDetachedFromRoot ()
 
SignalProxy< void()> sigDisconnectedFromRoot ()
 
SignalProxy< void()> sigSubTreeChanged ()
 
Referenced * customData (int id)
 
const Referenced * customData (int id) const
 
void setCustomData (int id, ReferencedPtr data)
 
void clearCustomData (int id)
 
- Public Member Functions inherited from cnoid::Referenced
virtual ~Referenced ()
 
void addRef ()
 
void releaseRef ()
 

Static Public Member Functions

static void initialize (ExtensionManager *ext)
 
- Static Public Member Functions inherited from cnoid::Item
static Item * find (const std::string &path)
 
static SignalProxy< void(const char *type_info_name)> sigClassUnregistered ()
 

Protected Member Functions

virtual ~MediaItem ()
 
virtual Item * doDuplicate () const
 
virtual void doPutProperties (PutPropertyFunction &putProperty)
 
virtual bool store (Archive &archive)
 
virtual bool restore (const Archive &archive)
 
- Protected Member Functions inherited from cnoid::Item
 Item ()
 
 Item (const Item &item)
 
virtual void onConnectedToRoot ()
 
virtual void onDisconnectedFromRoot ()
 
virtual void onPositionChanged ()
 
virtual bool onChildItemAboutToBeAdded (Item *childItem, bool isManualOperation)
 
virtual void doAssign (Item *srcItem)
 
void setAttribute (Attribute attribute)
 
void unsetAttribute (Attribute attribute)
 
- Protected Member Functions inherited from cnoid::Referenced
 Referenced ()
 
 Referenced (const Referenced &org)
 
int refCount () const
 

Additional Inherited Members

- Public Types inherited from cnoid::Item
enum  Attribute { SUB_ITEM, TEMPORAL, LOAD_ONLY, NUM_ATTRIBUTES }
 

Constructor & Destructor Documentation

◆ MediaItem() [1/2]

MediaItem::MediaItem ( )

◆ MediaItem() [2/2]

MediaItem::MediaItem ( const MediaItem &  org)

◆ ~MediaItem()

MediaItem::~MediaItem ( )
protectedvirtual

Member Function Documentation

◆ doDuplicate()

Item * MediaItem::doDuplicate ( ) const
protectedvirtual

Override this function to allow duplication of an instance.

Reimplemented from cnoid::Item.

◆ doPutProperties()

void MediaItem::doPutProperties ( PutPropertyFunction &  putProperty)
protectedvirtual

Override this function to put properties of the item.

Note
Please call doPutProperties() of the parent class in this function. For example, when your class directly inherits the Item class, call Item::doPutProperties(putProperty).

Reimplemented from cnoid::Item.

◆ initialize()

void MediaItem::initialize ( ExtensionManager *  ext)
static

◆ lastErrorMessage()

const std::string& cnoid::MediaItem::lastErrorMessage ( ) const
inline

◆ mediaFilePath()

const std::string& cnoid::MediaItem::mediaFilePath ( ) const
inline

◆ mediaURI()

const std::string& cnoid::MediaItem::mediaURI ( ) const
inline

◆ offsetTime()

double cnoid::MediaItem::offsetTime ( ) const
inline

◆ restore()

bool MediaItem::restore ( const Archive &  archive)
protectedvirtual

Reimplemented from cnoid::Item.

◆ setMediaFilePath()

bool MediaItem::setMediaFilePath ( const std::string &  path)

◆ setMediaURI()

bool MediaItem::setMediaURI ( const std::string &  uri)
Todo:
set filenae_ when uri points a local file path

◆ setOffsetTime()

void MediaItem::setOffsetTime ( double  offset)

◆ store()

bool MediaItem::store ( Archive &  archive)
protectedvirtual

Reimplemented from cnoid::Item.


The documentation for this class was generated from the following files: