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

List of all members.

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

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

Detailed Description

A basic project_base implementation.

Descendants can simply descend from this.

Author:
Aleksander Demko

Member Function Documentation

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.

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.

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.

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.

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.

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.

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

Is the project "empty?"

Author:
Aleksander Demko

Implements scopira::core::project_i.

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.

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: