Choreonoid
1.8
|
#include <ItemManager.h>
Classes | |
class | FileFunction |
class | FileFunctionBase |
Public Types | |
enum | IoUsageType { Standard = 10, Conversion = 0, Internal = -10, PRIORITY_DEFAULT = Standard, PRIORITY_COMPATIBILITY = Internal, PRIORITY_OPTIONAL = Internal, PRIORITY_CONVERSION = Conversion } |
Public Member Functions | |
ItemManager (const std::string &moduleName, MenuManager &menuManager) | |
~ItemManager () | |
void | detachAllManagedTypeItemsFromRoot () |
void | bindTextDomain (const std::string &domain) |
template<class ItemType , class SuperItemType = Item> | |
ItemManager & | registerClass (const std::string &className) |
template<class ItemType , class SuperItemType = Item> | |
ItemManager & | registerClass (const std::string &className, ItemType *singletonInstance) |
This function registers a singleton item class. More... | |
template<class ItemType , class SuperItemType = Item> | |
ItemManager & | registerAbstractClass () |
template<class ItemType > | |
ItemManager & | addAlias (const std::string &className, const std::string &moduleName) |
template<class ItemType > | |
ItemManager & | addCreationPanel (ItemCreationPanel *panel=nullptr) |
template<class ItemType > | |
ItemManager & | addFileIO (ItemFileIO *fileIO) |
template<class ItemType > | |
ItemManager & | registerFileIO (ItemFileIO *fileIO) |
template<class ItemType > | |
ItemManager & | addLoader (const std::string &caption, const std::string &format, const std::string &extensions, typename FileFunction< ItemType >::Function function, int usage=Standard) |
template<class ItemType > | |
ItemManager & | addLoader (const std::string &caption, const std::string &format, std::function< std::string()> getExtensions, typename FileFunction< ItemType >::Function function, int usage=Standard) |
template<class ItemType > | |
ItemManager & | addSaver (const std::string &caption, const std::string &format, const std::string &extensions, typename FileFunction< ItemType >::Function function, int usage=Standard) |
template<class ItemType > | |
ItemManager & | addSaver (const std::string &caption, const std::string &format, std::function< std::string()> getExtensions, typename FileFunction< ItemType >::Function function, int usage=Standard) |
template<class ItemType > | |
ItemManager & | addLoaderAndSaver (const std::string &caption, const std::string &format, const std::string &extensions, typename FileFunction< ItemType >::Function loaderFunction, typename FileFunction< ItemType >::Function saverFunction, int usage=Standard) |
template<class ItemType > | |
ItemManager & | addLoaderAndSaver (const std::string &caption, const std::string &format, std::function< std::string()> getExtensions, typename FileFunction< ItemType >::Function loaderFunction, typename FileFunction< ItemType >::Function saverFunction, int usage=Standard) |
void | addMenuItemToImport (const std::string &caption, std::function< void()> slot) |
template<class AddonType > | |
void | registerAddon (const std::string &name, std::function< ItemAddon *(void)> factory=nullptr) |
Static Public Member Functions | |
static bool | getClassIdentifier (Item *item, std::string &out_moduleName, std::string &out_className) |
template<class ItemType > | |
static ItemType * | singletonInstance () |
template<class ItemType > | |
static std::vector< ItemFileIO * > | getFileIOs () |
static std::vector< ItemFileIO * > | getFileIOs (const std::type_info &type) |
static ItemFileIO * | findFileIO (const std::type_info &type, const std::string &format) |
static Item * | createItem (const std::string &moduleName, const std::string &itemClassName) |
static Item * | createItem (int itemClassId) |
template<class ItemType > | |
static ItemType * | createItemWithDialog (Item *parentItem, bool doAddition=true, Item *nextItem=nullptr, Item *protoItem=nullptr, const std::string &title=std::string()) |
template<class ItemType > | |
static ItemList< ItemType > | loadItemsWithDialog (Item *parentItem, bool doAddtion=true, Item *nextItem=nullptr) |
template<class ItemType > | |
static bool | saveItemWithDialog (ItemType *item) |
static void | reloadItems (const ItemList<> &items) |
static Item * | findOriginalItemForReloadedItem (Item *item) |
static ItemAddon * | createAddon (const std::type_info &type) |
static ItemAddon * | createAddon (const std::string &moduleName, const std::string &addonName) |
static bool | getAddonIdentifier (ItemAddon *addon, std::string &out_moduleName, std::string &out_addonName) |
Friends | |
class | Item |
ItemManager::ItemManager | ( | const std::string & | moduleName, |
MenuManager & | menuManager | ||
) |
ItemManager::~ItemManager | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void ItemManager::addMenuItemToImport | ( | const std::string & | caption, |
std::function< void()> | slot | ||
) |
|
inline |
|
inline |
void ItemManager::bindTextDomain | ( | const std::string & | domain | ) |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
Create a new item interactively using the corresponding dialog
parentItem | The item that will be a parent of the new item. |
doAddition | The created item is actually added to the parent item if this flag is true. |
nextItem | The position to insert the created item can be specifid by this parameter. |
protoItem | The prototype item instance for creating a new item. If this parameter is omitted, the default prototype item is used. |
title | The dialog title string |
void ItemManager::detachAllManagedTypeItemsFromRoot | ( | ) |
|
static |
|
static |
|
static |
|
inlinestatic |
|
static |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
This function registers a singleton item class.
|
inline |
|
static |
|
inlinestatic |
|
inlinestatic |
|
friend |