Choreonoid  1.8
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
cnoid::Item Class Reference

#include <Item.h>

Inheritance diagram for cnoid::Item:
cnoid::Referenced cnoid::AbstractSeqItem cnoid::AbstractTextItem cnoid::AudioItem cnoid::BodyElementOverwriteItem cnoid::BodyItem cnoid::BodyMarkerItem cnoid::BodyTrackingCameraItem cnoid::ControllerItem cnoid::CoordinateFrameItem cnoid::CoordinateFrameListItem cnoid::ExtCommandItem cnoid::FolderItem cnoid::IoConnectionMapItem cnoid::LightingItem cnoid::MaterialTableItem cnoid::MediaItem cnoid::MprMultiVariableListItem cnoid::MprProgramItemBase cnoid::MultiPointSetItem cnoid::PointSetItem cnoid::PositionTagGroupItem cnoid::RootItem cnoid::SceneItem cnoid::SensorVisualizerItem cnoid::SimulatorItem cnoid::SubProjectItem cnoid::SubSimulatorItem cnoid::WorldItem cnoid::WorldLogFileItem

Public Types

enum  Attribute {
  SubItem, Attached, Temporal, LoadOnly,
  NumAttributes, SUB_ITEM = SubItem, TEMPORAL = Temporal, LOAD_ONLY = LoadOnly
}
 
enum  CheckId { LogicalSumOfAllChecks = -1, PrimaryCheck = 0 }
 
typedef std::function< bool(Item *item)> ItemPredicate
 

Public Member Functions

virtual ~Item ()
 
Itemoperator= (const Item &rhs)=delete
 
int classId () const
 
ItemcreateNewInstance () const
 
void assign (Item *srcItem)
 Copy item properties as much as possible like the assignment operator. More...
 
Itemduplicate (Item *duplicatedParentItem=nullptr) const
 
ItemduplicateSubTree () const
 This function creates a copy of the item including its descendant items. More...
 
ItemduplicateAll () const
 
const std::string & name () const
 
virtual bool setName (const std::string &name)
 
virtual std::string displayName () const
 
void setDisplayNameModifier (std::function< std::string(const Item *item)> modifier)
 
SignalProxy< void(const std::string &oldName)> sigNameChanged ()
 
void notifyNameChange ()
 This function notifies the system of a displayName change. More...
 
void setAttribute (Attribute attribute)
 
void unsetAttribute (Attribute attribute)
 
bool hasAttribute (Attribute attribute) const
 
bool isSubItem () const
 
void setSubItemAttributes ()
 
bool isTemporal () const
 
void setTemporal (bool on=true)
 
bool isSelected () const
 
void setSelected (bool on, bool isCurrent=false)
 
void setSubTreeItemsSelected (bool on)
 
bool isChecked (int checkId=PrimaryCheck) const
 
void setChecked (bool on)
 
void setChecked (int checkId, bool on)
 
int numCheckStates () const
 
int numChildren () const
 
int countDescendantItems () const
 
ItemchildItem () const
 
ItemprevItem () const
 
ItemnextItem () const
 
ItemlastChildItem () const
 
ItemparentItem () const
 
ItemheadItem () const
 
RootItemfindRootItem () const
 
bool isConnectedToRoot () const
 
ItemlocalRootItem () const
 
bool addChildItem (Item *item, bool isManualOperation=false)
 
bool insertChildItem (Item *item, Item *nextItem, bool isManualOperation=false)
 
bool insertChild (Item *position, Item *item, bool isManualOperation=false)
 
bool addSubItem (Item *item)
 
bool insertSubItem (Item *item, Item *nextItem)
 
void removeFromParentItem ()
 
void detachFromParentItem ()
 
void clearChildren ()
 
template<class ItemType >
ItemType * find (const std::string &path="")
 
ItemfindItem (const std::string &path) const
 
template<class ItemType >
ItemType * findItem (const std::string &path) const
 
template<class ItemType >
ItemType * findItem (std::function< bool(ItemType *item)> pred=nullptr) const
 
ItemfindChildItem (const std::string &path, std::function< bool(Item *item)> pred=nullptr) const
 
template<class ItemType >
ItemType * findChildItem (const std::string &path, std::function< bool(ItemType *item)> pred=nullptr) const
 
template<class ItemType >
ItemType * findChildItem (std::function< bool(ItemType *item)> pred=nullptr) const
 
ItemfindSubItem (const std::string &path) const
 
template<class ItemType >
ItemType * findSubItem (const std::string &path="") const
 
template<class ItemType >
ItemType * findOwnerItem (bool includeSelf=false) const
 
bool isOwnedBy (Item *item) const
 
ItemList childItems (std::function< bool(Item *item)> pred=nullptr) const
 
template<class ItemType >
ItemList< ItemType > childItems (std::function< bool(ItemType *item)> pred=nullptr) const
 
ItemList descendantItems (std::function< bool(Item *item)> pred=nullptr) const
 
template<class ItemType >
ItemList< ItemType > descendantItems (std::function< bool(ItemType *item)> pred=nullptr) const
 
ItemList selectedDescendantItems (std::function< bool(Item *item)> pred=nullptr) const
 
template<class ItemType >
ItemList< ItemType > selectedDescendantItems (std::function< bool(Item *item)> pred=nullptr) const
 
bool traverse (std::function< bool(Item *)> pred)
 
template<class ItemType >
bool traverse (std::function< bool(ItemType *item)> pred=nullptr)
 
SignalProxy< void()> sigTreePathChanged ()
 
SignalProxy< void()> sigTreePositionChanged ()
 
SignalProxy< void(Item *topItem, Item *prevTopParentItem)> sigTreePositionChanged2 ()
 
SignalProxy< void()> sigPositionChanged ()
 
SignalProxy< void()> sigSubTreeChanged ()
 
SignalProxy< void()> sigDisconnectedFromRoot ()
 
SignalProxy< void()> sigDetachedFromRoot ()
 
SignalProxy< void(bool on)> sigSelectionChanged ()
 
SignalProxy< void(int checkId, bool on)> sigAnyCheckToggled ()
 
SignalProxy< void(bool on)> sigCheckToggled (int checkId=PrimaryCheck)
 
virtual void notifyUpdate ()
 
SignalProxy< void()> sigUpdated ()
 
bool setAddon (ItemAddon *addon)
 
void removeAddon (ItemAddon *addon)
 
template<class AddonType >
AddonType * findAddon ()
 
template<class AddonType >
AddonType * getAddon ()
 
std::vector< ItemAddon * > addons ()
 
bool load (const std::string &filename, const std::string &format=std::string(), const Mapping *options=nullptr)
 
bool load (const std::string &filename, Item *parent, const std::string &format=std::string(), const Mapping *options=nullptr)
 
bool save (const std::string &filename, const std::string &format=std::string(), const Mapping *options=nullptr)
 
bool overwrite (bool forceOverwrite=false, const std::string &format=std::string())
 
const std::string & filePath () const
 Full path file name. More...
 
std::string fileName () const
 File name without the directory. More...
 
const std::string & fileFormat () const
 
const MappingfileOptions () const
 
std::time_t fileModificationTime () const
 
bool isConsistentWithFile () const
 
void updateFileInformation (const std::string &filename, const std::string &format, Mapping *options=nullptr)
 
void setConsistentWithFile (bool isConsistent)
 
void suggestFileUpdate ()
 
void clearFileInformation ()
 Use this function to disable the implicit overwrite next time. More...
 
bool reload ()
 
bool replace (Item *originalItem)
 
ItemfindOriginalItem () const
 
ItemfindReplacementItem () const
 
void putProperties (PutPropertyFunction &putProperty)
 
virtual bool store (Archive &archive)
 
virtual bool restore (const Archive &archive)
 
- Public Member Functions inherited from cnoid::Referenced
virtual ~Referenced ()
 

Static Public Member Functions

template<class ItemType >
static ItemPredicate getItemPredicate ()
 
template<class ItemType >
static ItemPredicate getItemPredicate (std::function< bool(ItemType *item)> pred)
 
static Itemfind (const std::string &path)
 

Protected Member Functions

 Item ()
 
 Item (const std::string &name)
 
 Item (const Item &item)
 
virtual void doAssign (Item *srcItem)
 Implement the code to copy properties like the assingment operator. More...
 
virtual ItemdoDuplicate () const
 Override this function to allow duplication of an instance. More...
 
virtual ItemdoDuplicate (Item *duplicatedParentItem) const
 
virtual bool onNewTreePositionCheck (bool isManualOperation, std::function< void()> &out_callbackWhenAdded)
 
virtual void onAddedToParent ()
 
virtual void onTreePathChanged ()
 
virtual void onTreePositionChanged ()
 
virtual void onPositionChanged ()
 
virtual void onConnectedToRoot ()
 
virtual void onRemovedFromParent (Item *parentItem, bool isParentBeingDeleted)
 
virtual void onDisconnectedFromRoot ()
 
virtual bool onChildItemAboutToBeAdded (Item *childItem, bool isManualOperation)
 
virtual void doPutProperties (PutPropertyFunction &putProperty)
 
- Protected Member Functions inherited from cnoid::Referenced
 Referenced ()
 
 Referenced (const Referenced &)
 
int refCount () const
 

Member Typedef Documentation

◆ ItemPredicate

typedef std::function<bool(Item* item)> cnoid::Item::ItemPredicate

Member Enumeration Documentation

◆ Attribute

Enumerator
SubItem 
Attached 
Temporal 
LoadOnly 
NumAttributes 
SUB_ITEM 
TEMPORAL 
LOAD_ONLY 

◆ CheckId

Note
LogicalSumOfAllChecks is only valid for "isChecked(LogicalSumOfAllChecks)" and the signal returned by "sigCheckToggled(LogicalSumOfAllChecks)".
Enumerator
LogicalSumOfAllChecks 
PrimaryCheck 

Constructor & Destructor Documentation

◆ Item() [1/3]

Item::Item ( )
protected

◆ Item() [2/3]

Item::Item ( const std::string &  name)
protected

◆ Item() [3/3]

Item::Item ( const Item item)
protected

◆ ~Item()

Item::~Item ( )
virtual

Member Function Documentation

◆ addChildItem()

bool Item::addChildItem ( Item item,
bool  isManualOperation = false 
)

◆ addons()

std::vector< ItemAddon * > Item::addons ( )

◆ addSubItem()

bool Item::addSubItem ( Item item)

This function adds a sub item to the item. The sub item is an item that is a required element of the main item, and the sub item cannot be removed from the main item.

◆ assign()

void Item::assign ( Item srcItem)

Copy item properties as much as possible like the assignment operator.

◆ childItem()

Item* cnoid::Item::childItem ( ) const
inline

◆ childItems() [1/2]

ItemList Item::childItems ( std::function< bool(Item *item)>  pred = nullptr) const

◆ childItems() [2/2]

template<class ItemType >
ItemList<ItemType> cnoid::Item::childItems ( std::function< bool(ItemType *item)>  pred = nullptr) const
inline

◆ classId()

int cnoid::Item::classId ( ) const
inline

◆ clearChildren()

void Item::clearChildren ( )

◆ clearFileInformation()

void Item::clearFileInformation ( )

Use this function to disable the implicit overwrite next time.

◆ countDescendantItems()

int Item::countDescendantItems ( ) const

◆ createNewInstance()

Item * Item::createNewInstance ( ) const

◆ descendantItems() [1/2]

ItemList Item::descendantItems ( std::function< bool(Item *item)>  pred = nullptr) const

◆ descendantItems() [2/2]

template<class ItemType >
ItemList<ItemType> cnoid::Item::descendantItems ( std::function< bool(ItemType *item)>  pred = nullptr) const
inline

◆ detachFromParentItem()

void cnoid::Item::detachFromParentItem ( )
inline

◆ displayName()

std::string Item::displayName ( ) const
virtual

Reimplemented in cnoid::CoordinateFrameItem.

◆ doAssign()

void Item::doAssign ( Item srcItem)
protectedvirtual

Implement the code to copy properties like the assingment operator.

Reimplemented in cnoid::BodyItem.

◆ doDuplicate() [1/2]

Item * Item::doDuplicate ( ) const
protectedvirtual

◆ doDuplicate() [2/2]

Item * Item::doDuplicate ( Item duplicatedParentItem) const
protectedvirtual

Use this overload if the duplication process needs to know the duplicated parent item.

Note
If this function is implemented and returns a valid dupulicated object, the overload doDuplicate function without an argument is not called.
The parentItem argument may be nullptr.

Reimplemented in cnoid::DeviceOverwriteItem, and cnoid::LinkShapeOverwriteItem.

◆ doPutProperties()

void Item::doPutProperties ( PutPropertyFunction putProperty)
protectedvirtual

◆ duplicate()

Item * Item::duplicate ( Item duplicatedParentItem = nullptr) const

◆ duplicateAll()

Item* cnoid::Item::duplicateAll ( ) const
inline

◆ duplicateSubTree()

Item * Item::duplicateSubTree ( ) const

This function creates a copy of the item including its descendant items.

◆ fileFormat()

const std::string & Item::fileFormat ( ) const

◆ fileModificationTime()

std::time_t Item::fileModificationTime ( ) const

◆ fileName()

std::string Item::fileName ( ) const

File name without the directory.

◆ fileOptions()

const Mapping * Item::fileOptions ( ) const

◆ filePath()

const std::string & Item::filePath ( ) const

Full path file name.

◆ find() [1/2]

static Item* cnoid::Item::find ( const std::string &  path)
inlinestatic

This is equivalent to RootItem::instance()->findItem(path);

◆ find() [2/2]

template<class ItemType >
ItemType* cnoid::Item::find ( const std::string &  path = "")
inline

◆ findAddon()

template<class AddonType >
AddonType* cnoid::Item::findAddon ( )
inline

◆ findChildItem() [1/3]

Item* cnoid::Item::findChildItem ( const std::string &  path,
std::function< bool(Item *item)>  pred = nullptr 
) const
inline

Find an item that has the corresponding path from a child item to it

◆ findChildItem() [2/3]

template<class ItemType >
ItemType* cnoid::Item::findChildItem ( const std::string &  path,
std::function< bool(ItemType *item)>  pred = nullptr 
) const
inline

◆ findChildItem() [3/3]

template<class ItemType >
ItemType* cnoid::Item::findChildItem ( std::function< bool(ItemType *item)>  pred = nullptr) const
inline

◆ findItem() [1/3]

Item* cnoid::Item::findItem ( const std::string &  path) const
inline

Find an item that has the corresponding path to it in the sub tree

◆ findItem() [2/3]

template<class ItemType >
ItemType* cnoid::Item::findItem ( const std::string &  path) const
inline

◆ findItem() [3/3]

template<class ItemType >
ItemType* cnoid::Item::findItem ( std::function< bool(ItemType *item)>  pred = nullptr) const
inline

◆ findOriginalItem()

Item * Item::findOriginalItem ( ) const

◆ findOwnerItem()

template<class ItemType >
ItemType* cnoid::Item::findOwnerItem ( bool  includeSelf = false) const
inline

◆ findReplacementItem()

Item * Item::findReplacementItem ( ) const

◆ findRootItem()

RootItem * Item::findRootItem ( ) const

◆ findSubItem() [1/2]

Item* cnoid::Item::findSubItem ( const std::string &  path) const
inline

Find a sub item that has the corresponding path from a direct sub item to it

◆ findSubItem() [2/2]

template<class ItemType >
ItemType* cnoid::Item::findSubItem ( const std::string &  path = "") const
inline

◆ getAddon()

template<class AddonType >
AddonType* cnoid::Item::getAddon ( )
inline

◆ getItemPredicate() [1/2]

template<class ItemType >
static ItemPredicate cnoid::Item::getItemPredicate ( )
inlinestatic

◆ getItemPredicate() [2/2]

template<class ItemType >
static ItemPredicate cnoid::Item::getItemPredicate ( std::function< bool(ItemType *item)>  pred)
inlinestatic

◆ hasAttribute()

bool Item::hasAttribute ( Attribute  attribute) const

◆ headItem()

Item * Item::headItem ( ) const
Returns
When the item is embeded one, this function returs the first parent item which is not an embeded one. Otherwise the item itself is returned.

◆ insertChild()

bool Item::insertChild ( Item position,
Item item,
bool  isManualOperation = false 
)

◆ insertChildItem()

bool Item::insertChildItem ( Item item,
Item nextItem,
bool  isManualOperation = false 
)

◆ insertSubItem()

bool Item::insertSubItem ( Item item,
Item nextItem 
)

◆ isChecked()

bool Item::isChecked ( int  checkId = PrimaryCheck) const

◆ isConnectedToRoot()

bool Item::isConnectedToRoot ( ) const

◆ isConsistentWithFile()

bool Item::isConsistentWithFile ( ) const

◆ isOwnedBy()

bool Item::isOwnedBy ( Item item) const

◆ isSelected()

bool cnoid::Item::isSelected ( ) const
inline

◆ isSubItem()

bool Item::isSubItem ( ) const

◆ isTemporal()

bool Item::isTemporal ( ) const

If this is true, the item is not automatically saved or overwritten when a project is saved. For example, a motion item which is produced as a simulation result may be an temporal item because a user may not want to save the result. If a user manually save the item, the item becomes a non-temporal item. Or if a child item is manually attached to a temporal item, the item becomes non-temporal one as well.

◆ lastChildItem()

Item* cnoid::Item::lastChildItem ( ) const
inline

◆ load() [1/2]

bool Item::load ( const std::string &  filename,
const std::string &  format = std::string(),
const Mapping options = nullptr 
)

This function loads the data of the item from a file by using a registered FileIO object. To make this function available, a FileIO object must be registered to an ItemManager in advance with its registerFileIO function.

◆ load() [2/2]

bool Item::load ( const std::string &  filename,
Item parent,
const std::string &  format = std::string(),
const Mapping options = nullptr 
)

An overload version of the load function.

Parameters
parentspecify this when the item is newly created one and will be attached to a parent item if loading succeeds.

◆ localRootItem()

Item * Item::localRootItem ( ) const

◆ name()

const std::string& cnoid::Item::name ( ) const
inline

◆ nextItem()

Item* cnoid::Item::nextItem ( ) const
inline

◆ notifyNameChange()

void Item::notifyNameChange ( )

This function notifies the system of a displayName change.

◆ notifyUpdate()

void Item::notifyUpdate ( )
virtual

◆ numCheckStates()

int Item::numCheckStates ( ) const

◆ numChildren()

int cnoid::Item::numChildren ( ) const
inline

◆ onAddedToParent()

void Item::onAddedToParent ( )
protectedvirtual

Reimplemented in cnoid::CoordinateFrameItem.

◆ onChildItemAboutToBeAdded()

bool Item::onChildItemAboutToBeAdded ( Item childItem,
bool  isManualOperation 
)
protectedvirtual

This function is called when a child item is about to be added to this item. By overriding this function, you can check a child item and prevent the item from being added if necessary.

Returns
false if the item cannot be accepted as a child item
Note
The childItem is not actually connected to the item when this function is called.

Reimplemented in cnoid::CoordinateFrameListItem, and cnoid::BodyMotionItem.

◆ onConnectedToRoot()

void Item::onConnectedToRoot ( )
protectedvirtual

This function is called when the item has been connected to the item tree with RootItem as the root. Note that this function is called before onTreePathChanged and onTreePositionChanged are called.

Reimplemented in cnoid::BodyItem, cnoid::PositionTagGroupItem, cnoid::MprProgramItemBase, cnoid::SubProjectItem, and cnoid::MessageLogItem.

◆ onDisconnectedFromRoot()

void Item::onDisconnectedFromRoot ( )
protectedvirtual

◆ onNewTreePositionCheck()

bool Item::onNewTreePositionCheck ( bool  isManualOperation,
std::function< void()> &  out_callbackWhenAdded 
)
protectedvirtual

◆ onPositionChanged()

void Item::onPositionChanged ( )
protectedvirtual
Deprecated:
This function was replaced with onTreePositionChanged and onTreePathChanged is now available. Please use either of those functions to implement the necessary processing.

◆ onRemovedFromParent()

void Item::onRemovedFromParent ( Item parentItem,
bool  isParentBeingDeleted 
)
protectedvirtual

Reimplemented in cnoid::CoordinateFrameItem.

◆ onTreePathChanged()

void Item::onTreePathChanged ( )
protectedvirtual

This function is called at the same time as sigTreePathChanged. The order in which it is called precedes the signal. By overriding this function in a derived item class, you can implement the necessary processing when the path in the item tree is changed.

Reimplemented in cnoid::BodyElementOverwriteItem, cnoid::SimulatorItem, cnoid::BodyItem, cnoid::MprProgramItemBase, cnoid::WorldLogFileItem, cnoid::BodyTrackingCameraItem, cnoid::BodyMarkerItem, cnoid::SimpleControllerItem, cnoid::IoConnectionMapItem, and cnoid::SensorVisualizerItem.

◆ onTreePositionChanged()

void Item::onTreePositionChanged ( )
protectedvirtual

This function is similar to the onTreePathChanged function. The condition to call this function is same as sigTreePositionChanged, and the order in which it is called precedes the signal.

Reimplemented in cnoid::CoordinateFrameListItem.

◆ operator=()

Item& cnoid::Item::operator= ( const Item rhs)
delete

◆ overwrite()

bool Item::overwrite ( bool  forceOverwrite = false,
const std::string &  format = std::string() 
)

This function save the data of the item to the file from which the data of the item has been loaded. If the data has not been loaded from a file, a file save dialog to specify a file opens.

◆ parentItem()

Item* cnoid::Item::parentItem ( ) const
inline

◆ prevItem()

Item* cnoid::Item::prevItem ( ) const
inline

◆ putProperties()

void Item::putProperties ( PutPropertyFunction putProperty)

◆ reload()

bool Item::reload ( )

◆ removeAddon()

void Item::removeAddon ( ItemAddon addon)

◆ removeFromParentItem()

void Item::removeFromParentItem ( )

◆ replace()

bool Item::replace ( Item originalItem)

◆ restore()

bool Item::restore ( const Archive archive)
virtual

◆ save()

bool Item::save ( const std::string &  filename,
const std::string &  format = std::string(),
const Mapping options = nullptr 
)

This function saves the data of the item to a file by using a registered FileIO object. To make this function available, a FileIO object must be registered to an ItemManager in advance with its registerFileIO function.

◆ selectedDescendantItems() [1/2]

ItemList Item::selectedDescendantItems ( std::function< bool(Item *item)>  pred = nullptr) const

◆ selectedDescendantItems() [2/2]

template<class ItemType >
ItemList<ItemType> cnoid::Item::selectedDescendantItems ( std::function< bool(Item *item)>  pred = nullptr) const
inline

◆ setAddon()

bool Item::setAddon ( ItemAddon addon)

◆ setAttribute()

void Item::setAttribute ( Attribute  attribute)

◆ setChecked() [1/2]

void Item::setChecked ( bool  on)

◆ setChecked() [2/2]

void Item::setChecked ( int  checkId,
bool  on 
)

◆ setConsistentWithFile()

void Item::setConsistentWithFile ( bool  isConsistent)

◆ setDisplayNameModifier()

void Item::setDisplayNameModifier ( std::function< std::string(const Item *item)>  modifier)

◆ setName()

bool Item::setName ( const std::string &  name)
virtual
Returns
true if the name is successfully updated or the item originally has the same name

Reimplemented in cnoid::DeviceOverwriteItem, cnoid::BodyItem, cnoid::BodyTrackingCameraItem, cnoid::SceneItem, cnoid::PointSetItem, cnoid::BodyMarkerItem, cnoid::PositionTagGroupItem, and cnoid::MprProgramItemBase.

◆ setSelected()

void Item::setSelected ( bool  on,
bool  isCurrent = false 
)

◆ setSubItemAttributes()

void Item::setSubItemAttributes ( )

◆ setSubTreeItemsSelected()

void Item::setSubTreeItemsSelected ( bool  on)

◆ setTemporal()

void Item::setTemporal ( bool  on = true)

◆ sigAnyCheckToggled()

SignalProxy< void(int checkId, bool on)> Item::sigAnyCheckToggled ( )

◆ sigCheckToggled()

SignalProxy< void(bool on)> Item::sigCheckToggled ( int  checkId = PrimaryCheck)

◆ sigDetachedFromRoot()

SignalProxy<void()> cnoid::Item::sigDetachedFromRoot ( )
inline

◆ sigDisconnectedFromRoot()

SignalProxy< void()> Item::sigDisconnectedFromRoot ( )

◆ sigNameChanged()

SignalProxy< void(const std::string &oldName)> Item::sigNameChanged ( )

◆ sigPositionChanged()

SignalProxy< void()> Item::sigPositionChanged ( )

◆ sigSelectionChanged()

SignalProxy< void(bool isSelected)> Item::sigSelectionChanged ( )

◆ sigSubTreeChanged()

SignalProxy< void()> Item::sigSubTreeChanged ( )

This signal is emitted when the structure or elements of the sub tree changes.

◆ sigTreePathChanged()

SignalProxy< void()> Item::sigTreePathChanged ( )

This signal is emitted when the path from the root to this item in an item tree is changed. The path changes include the addition or removal of this item to or from the item tree. The item tree can contain or not contain the RootItem instance as the tree root. Note that the signal is emitted before RootItem::sigTreeChanged().

◆ sigTreePositionChanged()

SignalProxy< void()> Item::sigTreePositionChanged ( )

This signal is emitted when the position of this item in the item tree is changed. In contrast to sigTreePathChanged, this signal is emitted when the order of the item in the parent item is changed even if the path to the item is not changed. Except for that, this signal is same as sigTreePathChanged.

◆ sigTreePositionChanged2()

SignalProxy< void(Item *topItem, Item *prevTopParentItem)> Item::sigTreePositionChanged2 ( )

The arguments of this signal should be included in sigTreePositionChanged. However, the current implementation of the signal template class does now allow the omission of arguments in connecting a slot function and these arguments are not frequently used. Therefore the signal with the arguments are defined separately from the signal without arguments. If the Signal template class is improved so that it can omit arguments in the slot connection, it is better to integrate the signals. In any case, do not use this signal if you don't have a special reason.

◆ sigUpdated()

SignalProxy< void()> Item::sigUpdated ( )

◆ store()

bool Item::store ( Archive archive)
virtual

◆ suggestFileUpdate()

void Item::suggestFileUpdate ( )

◆ traverse() [1/2]

bool Item::traverse ( std::function< bool(Item *)>  pred)

◆ traverse() [2/2]

template<class ItemType >
bool cnoid::Item::traverse ( std::function< bool(ItemType *item)>  pred = nullptr)
inline

◆ unsetAttribute()

void Item::unsetAttribute ( Attribute  attribute)

◆ updateFileInformation()

void Item::updateFileInformation ( const std::string &  filename,
const std::string &  format,
Mapping options = nullptr 
)

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