fw4spl
fwTools::Bookmarks Class Reference

Allows to add a bookmark to an object, the bookmark name is unique (in time), an object can have several bookmarks. More...

#include <Bookmarks.hpp>

+ Collaboration diagram for fwTools::Bookmarks:

Public Types

typedef std::string BookmarkName
 

Static Public Member Functions

static FWTOOLS_API bool exist (BookmarkName _bookmark)
 Tests if the given id exist (i.e recorded in Bookmarks dictionary) More...
 
static FWTOOLS_API void add (BookmarkName _bookmark, std::shared_ptr< ::fwTools::Object >)
 
static FWTOOLS_API void remove (Bookmarks::BookmarkName _bookmark)
 silently remove given bookmark
 
static FWTOOLS_API std::shared_ptr< ::fwTools::ObjectgetObject (BookmarkName _bookmark)
 Retrieves the object attached to the given id. Return a null sptr if no correspondence exist.
 
static FWTOOLS_API std::list< BookmarkName > getBookmarks (std::shared_ptr< ::fwTools::Object >)
 Retrieves the list of bookmarks attach to an object.
 
static FWTOOLS_API std::list< BookmarkName > getBookmarks ()
 Retrieves the list of bookmarks.
 

Protected Types

typedef ::std::unordered_map< BookmarkName, std::weak_ptr< ::fwTools::Object > > Dictionary
 

Static Protected Attributes

static Dictionary m_dictionary
 

Detailed Description

Allows to add a bookmark to an object, the bookmark name is unique (in time), an object can have several bookmarks.

Note
expired object do not erase its bookmarks

Definition at line 27 of file Bookmarks.hpp.

Member Function Documentation

bool fwTools::Bookmarks::exist ( Bookmarks::BookmarkName  _id)
static

Tests if the given id exist (i.e recorded in Bookmarks dictionary)

Parameters
[in]_id: the id to test
Returns
true iff the given id is recorded in Bookmarks dictionary

Definition at line 29 of file Bookmarks.cpp.

References OSLM_FATAL_IF.

Referenced by ctrlSelection::BookmarkSrv::stopping().

+ Here is the caller graph for this function:


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