Scopira
20080306
|
#include <project.h>
Public Member Functions | |
project_base (void) | |
Default initing ctor. | |
project_base (const std::string &title) | |
title initing ctor | |
virtual | ~project_base () |
dtor | |
virtual bool | load (tool::iobjflow_i &in) |
for title, mostly | |
virtual void | save (tool::oobjflow_i &out) const |
for title, mostly | |
virtual void | add_model (model_i *parent, model_i *rec) |
virtual void | remove_model (model_i *parent, model_i *rec) |
virtual bool | contains_model (model_i *parent, model_i *rec) |
virtual bool | contains_model (model_i *rec) |
virtual model_i * | get_parent (model_i *child) |
virtual model_i * | find_model (model_i *parent, const std::string &title) const |
virtual model_iterator | get_model_iterator (model_i *parent) const |
gets a listing of all the sub models | |
virtual bool | is_project_empty (void) const |
virtual void | clear_project (void) |
virtual void | move_project (scopira::core::project_i *rhs) |
virtual bool | get_tagged_model_from_project (model_i *parent, const std::string &name, scopira::tool::count_ptr< scopira::core::model_i > &out) |
used by model_i | |
Public Member Functions inherited from scopira::core::project_i | |
virtual bool | is_project (void) const |
I AM a project! | |
Public Member Functions inherited from scopira::core::model_i | |
virtual void | set_title (const std::string &newtitle) |
const std::string & | get_title (void) const |
void | add_view (view_i *ins) const |
void | remove_view (view_i *ins) const |
void | notify_views (view_i *src) |
void | add_rename_reactor (tool::rename_reactor_i *r) const |
void | remove_rename_reactor (tool::rename_reactor_i *r) const |
virtual void | set_project (project_i *newowner) |
project_i * | get_project (void) const |
void | set_tagged_model (const std::string &name, model_i *what) |
template<class W > | |
bool | get_tagged_model (const std::string &name, W &out) |
Public Member Functions inherited from scopira::tool::object | |
virtual | ~object () |
int | add_ref (void) const |
bool | sub_ref (void) const |
void | auto_ref (void) const |
int | current_ref (void) const |
virtual scopira::tool::oflow_i & | print (scopira::tool::oflow_i &o) const |
bool | is_alive_object (void) const |
bool | is_dead_object (void) const |
Protected Types | |
typedef std::multimap< tool::count_ptr< core::model_i >, tool::count_ptr< core::model_i > > | model_set_t |
typedef std::pair< model_set_t::const_iterator, model_set_t::const_iterator > | const_iterator_pair |
typedef std::pair< model_set_t::iterator, model_set_t::iterator > | iterator_pair |
typedef std::map< core::model_i *, core::model_i * > | child_map |
Protected Attributes | |
model_set_t | dm_models |
child_map | dm_child |
Additional Inherited Members | |
Public Types inherited from scopira::core::project_i | |
typedef scopira::core::model_iterator | model_iterator |
the model iterator type | |
Protected Member Functions inherited from scopira::core::project_i | |
project_i (void) | |
Default initing ctor. | |
project_i (const std::string &title) | |
title initing ctor | |
Protected Member Functions inherited from scopira::core::model_i | |
model_i (void) | |
Default initing ctor. | |
model_i (const std::string &title) | |
title initing ctor | |
model_i (const model_i &src) | |
copy ctor | |
virtual | ~model_i () |
dtor (mainly, to flush the cache | |
Protected Member Functions inherited from scopira::tool::object | |
object (void) | |
object (bool neverusecounter) | |
A basic project_base implementation.
Descendants can simply descend from this.
Adds a model. null parent == root node
Implements scopira::core::project_i.
|
virtual |
Clears or resets the project to empty state.
Implements scopira::core::project_i.
|
virtual |
Does this group have the given model? null parent == root node
Implements scopira::core::project_i.
|
virtual |
Does the group have this model anywhere, regarless of root.
Implements scopira::core::project_i.
|
virtual |
Finds a model by name. There may be many of them – this finds the "first" one. Returns 0 if none was found.
Implements scopira::core::project_i.
Gets the parent model of a given model. May be null (for root).
Implements scopira::core::project_i.
|
virtual |
Is the project "empty?"
Implements scopira::core::project_i.
|
virtual |
Move a project's contents into this one.
Implements scopira::core::project_i.
Removes the given model null parent == root node
Implements scopira::core::project_i.