Scopira  20080306
scopira::core::project_base Class Reference

#include <project.h>

Inheritance diagram for scopira::core::project_base:
scopira::core::project_i scopira::core::model_i scopira::tool::object

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_iget_parent (model_i *child)
 
virtual model_ifind_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_iget_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_iprint (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)
 

Detailed Description

A basic project_base implementation.

Descendants can simply descend from this.

Author
Aleksander Demko

Member Function Documentation

◆ add_model()

virtual void scopira::core::project_base::add_model ( model_i parent,
model_i rec 
)
virtual

Adds a model. null parent == root node

Author
Aleksander Demko

Implements scopira::core::project_i.

◆ clear_project()

virtual void scopira::core::project_base::clear_project ( void  )
virtual

Clears or resets the project to empty state.

Author
Aleksander Demko

Implements scopira::core::project_i.

◆ contains_model() [1/2]

virtual bool scopira::core::project_base::contains_model ( model_i parent,
model_i rec 
)
virtual

Does this group have the given model? null parent == root node

Author
Aleksander Demko

Implements scopira::core::project_i.

◆ contains_model() [2/2]

virtual bool scopira::core::project_base::contains_model ( model_i rec)
virtual

Does the group have this model anywhere, regarless of root.

Author
Aleksander Demko

Implements scopira::core::project_i.

◆ find_model()

virtual model_i* scopira::core::project_base::find_model ( model_i parent,
const std::string &  title 
) const
virtual

Finds a model by name. There may be many of them – this finds the "first" one. Returns 0 if none was found.

Author
Aleksander Demko

Implements scopira::core::project_i.

◆ get_parent()

virtual model_i* scopira::core::project_base::get_parent ( model_i child)
virtual

Gets the parent model of a given model. May be null (for root).

Author
Aleksander Demko

Implements scopira::core::project_i.

◆ is_project_empty()

virtual bool scopira::core::project_base::is_project_empty ( void  ) const
virtual

Is the project "empty?"

Author
Aleksander Demko

Implements scopira::core::project_i.

◆ move_project()

virtual void scopira::core::project_base::move_project ( scopira::core::project_i rhs)
virtual

Move a project's contents into this one.

Author
Aleksander Demko

Implements scopira::core::project_i.

◆ remove_model()

virtual void scopira::core::project_base::remove_model ( model_i parent,
model_i rec 
)
virtual

Removes the given model null parent == root node

Author
Aleksander Demko

Implements scopira::core::project_i.


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