makefile::Manager Class Reference

Provides object management features for easy using of the lib. More...

#include <Manager.h>

List of all members.

Public Member Functions

 Manager ()
virtual ~Manager ()
template<class I>
I * own (I *item)
 Takes over ownership of a Manageable allocated with new.
template<class MI>
MI * own_add (MI *item)
 A shortcut.

Private Member Functions

 Manager (const Manager &)

Private Attributes

boost::ptr_vector< Manageablemitems


Detailed Description

Provides object management features for easy using of the lib.

It can work as an owner Manageable instances, and is therefore responsible for their destruction afterwards. The major advantage over holding MakefileItem s in auto-variables is that they get out of scope easily. before Makefile::writeMakefile and cause problems. This class is independent from Makefile. The usage:

Note:
This can only work with heap allocated objects (new!).
Examples:

example.cpp.

Definition at line 58 of file Manager.h.


Constructor & Destructor Documentation

makefile::Manager::Manager ( const Manager  )  [private]

makefile::Manager::Manager (  ) 

Definition at line 30 of file Manager.cpp.

virtual makefile::Manager::~Manager (  )  [inline, virtual]

Definition at line 66 of file Manager.h.


Member Function Documentation

template<class I>
I* makefile::Manager::own ( I *  item  )  [inline]

Takes over ownership of a Manageable allocated with new.

On destruction of the Manager item is deleted too.

Parameters:
item 
Returns:
item
Examples:
example.cpp.

Definition at line 75 of file Manager.h.

Referenced by HuginBase::PanoramaMakefilelibExport::createexposure(), HuginBase::PanoramaMakefilelibExport::createItems(), HuginBase::AssistantMakefilelibExport::createItems(), HuginBase::PanoramaMakefilelibExport::createstacks(), main(), makefile::tester::TestComment::TestComment(), makefile::tester::TestConditional::TestConditional(), makefile::tester::TestRule::TestRule(), and makefile::tester::TestVariable::TestVariable().

template<class MI>
MI* makefile::Manager::own_add ( MI *  item  )  [inline]

A shortcut.

Calls Manager::own and Makefile::add for objects we don't need to deal with any further.

Parameters:
item 
Examples:
example.cpp.

Definition at line 86 of file Manager.h.

Referenced by HuginBase::PanoramaMakefilelibExport::createItems(), HuginBase::AssistantMakefilelibExport::createItems(), main(), and makefile::tester::TestVariable::TestVariable().


Member Data Documentation

boost::ptr_vector<Manageable> makefile::Manager::mitems [private]

Definition at line 61 of file Manager.h.


The documentation for this class was generated from the following files:
Generated on 21 Oct 2014 for Hugintrunk by  doxygen 1.4.7