VPTissue Reference Manual
|
Interface for workspace-like behavior. More...
#include <IWorkspace.h>
Classes | |
class | ProjectMapEntry |
Public Types | |
using | ConstProjectIterator = typename ProjectMap::const_iterator |
using | ProjectIterator = typename ProjectMap::iterator |
using | ProjectMap = std::map< std::string, ProjectMapEntry > |
Public Types inherited from SimPT_Sim::Util::Subject< Event::PreferencesChanged, std::weak_ptr< const void > > | |
typedef std::function< void(const EventType &)> | CallbackType |
typedef Event::PreferencesChanged | EventType |
typedef const std::weak_ptr< const void > * | KeyType |
Public Types inherited from SimPT_Sim::Util::Subject< Event::WorkspaceChanged, std::weak_ptr< const void > > | |
typedef std::function< void(const EventType &)> | CallbackType |
typedef Event::WorkspaceChanged | EventType |
typedef const std::weak_ptr< const void > * | KeyType |
Public Member Functions | |
virtual | ~IWorkspace () |
Virtual destructor. | |
virtual ProjectIterator | Add (const std::string &type, const std::string &name)=0 |
Add existing project to workspace. More... | |
virtual std::shared_ptr< IProject > | Back ()=0 |
Get last project. More... | |
virtual std::shared_ptr< const IProject > | Back () const =0 |
Get last project. More... | |
virtual ProjectIterator | begin ()=0 |
Get iterator pointing to first project. | |
virtual ConstProjectIterator | begin () const =0 |
Get iterator pointing to first project. | |
virtual ProjectIterator | end ()=0 |
Get iterator pointing to one position after last project. | |
virtual ConstProjectIterator | end () const =0 |
Get iterator pointing to one position after last project. | |
virtual ProjectIterator | Find (const std::string &name)=0 |
Get iterator to project with given name. More... | |
virtual ConstProjectIterator | Find (const std::string &name) const =0 |
Get iterator to project with given name. More... | |
virtual std::shared_ptr< IProject > | Front ()=0 |
Get first project. More... | |
virtual std::shared_ptr< const IProject > | Front () const =0 |
Get first project. More... | |
virtual std::shared_ptr< IProject > | Get (const std::string &name)=0 |
Get project with given name. More... | |
virtual std::shared_ptr< const IProject > | Get (const std::string &name) const =0 |
Get project with given name. More... | |
virtual const std::string & | GetIndexFile () const =0 |
Get name of index file for this type of workspace. | |
virtual const std::string & | GetPath () const =0 |
Get path workspace was initialized with. | |
virtual bool | IsProject (const std::string &name) const =0 |
Get iterator to project with given name. More... | |
virtual ProjectIterator | New (const std::string &type, const std::string &name)=0 |
Create new project in workspace. More... | |
virtual void | Refresh ()=0 |
Refresh workspace. More... | |
virtual void | Remove (ProjectIterator it)=0 |
Remove project. More... | |
virtual void | Remove (const std::string &name)=0 |
Remove project. More... | |
virtual ProjectIterator | Rename (ProjectIterator, const std::string &new_name)=0 |
Rename project. More... | |
virtual ProjectIterator | Rename (const std::string &old_name, const std::string &new_name)=0 |
Rename project. More... | |
Public Member Functions inherited from SimShell::Ws::IPreferences | |
virtual const boost::property_tree::ptree & | GetPreferences () const =0 |
virtual void | SetPreferences (const boost::property_tree::ptree &)=0 |
Public Member Functions inherited from SimPT_Sim::Util::Subject< Event::PreferencesChanged, std::weak_ptr< const void > > | |
void | Notify (const EventType &) |
void | Register (const U *, CallbackType) |
void | Unregister (const U *) |
void | UnregisterAll () |
Public Member Functions inherited from SimShell::Ws::IUserData | |
virtual const boost::property_tree::ptree & | GetUserData (const std::string &user) const =0 |
virtual void | SetUserData (const std::string &user, const boost::property_tree::ptree &)=0 |
Public Member Functions inherited from SimPT_Sim::Util::Subject< Event::WorkspaceChanged, std::weak_ptr< const void > > | |
void | Notify (const EventType &) |
void | Register (const U *, CallbackType) |
void | Unregister (const U *) |
void | UnregisterAll () |
Interface for workspace-like behavior.
A workspace is a container of projects, indexed by name. Projects can be created, removed and renamed.
Additionally, workspace also has associated with it a tree of workspace preferences, and a tree of user data.
Definition at line 48 of file IWorkspace.h.
|
pure virtual |
Add existing project to workspace.
Workspace must already contain directory with project before calling this method.
type | Type of project. |
name | Name of project (= name of directory). |
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Get last project.
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Get last project.
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Get iterator to project with given name.
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Get iterator to project with given name.
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Get first project.
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Get first project.
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Get project with given name.
Exception | if no project with given name exists. |
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Get project with given name.
Exception | if no project with given name exists. |
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Get iterator to project with given name.
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Create new project in workspace.
A directory will be created for you.
Exception | if another project with given name exists. |
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Refresh workspace.
Will generate WorkspaceChanged events for newly discovered projects and projects that dissappeared.
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Remove project.
it | Iterator pointing to project to remove. |
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Remove project.
name | Name of project to remove. |
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Rename project.
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.
|
pure virtual |
Rename project.
Implemented in SimShell::Ws::Workspace< ProjectType, index_file >, and SimShell::Ws::Workspace< Project, WorkspaceFactory::g_workspace_index_file >.