Ignore:
Timestamp:
Jan 5, 2011, 11:08:49 AM (15 years ago)
Author:
Frederik Heber <heber@…>
Children:
d76c105
Parents:
724564
Message:

Added Clone pattern.

  • Clone is necessary for having prototypes, i.e. it defines an interface class that has a virtual * clone() const function that each derived type has to implement.
  • Added unit test.
  • made CommonStub a bit cleaner.
  • updated documentation fo Factory and FactoryTypeList
  • Library version is now 2:2:0, API is 1.0.4.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Patterns/Factory.hpp

    r724564 r1afcbe  
    9292 *   #define Abstract_Encapsulation_Class RandomNumberDistribution_Encapsulation
    9393 *   #define type_name_space boost::
     94 *   #undef type_suffix
    9495 *
    9596 *   #endif //RANDOMNUMBERDISTRIBUTIONFACTORY_DEF_
     
    100101 *   \a Abstract_Encapsulation_Class is the class name of the (templated)
    101102 *   encapsulation class of each type. Optionally, these types may reside in
    102  *   some other name_space, define this one via type_name_space (with suffixes
    103  *   double colons!). Note that the first two and the last line are just
    104  *   to avoid double inclusion, also the define made therein is used for the
    105  *   following step ...
     103 *   some other name_space, define this one via \a type_name_space (with suffixes
     104 *   double colons!). If you need something appended to each type, such as "<>"
     105 *   then add in \a type_suffix. Note that the first two and the last line are
     106 *   just to avoid double inclusion, also the define made therein is used for
     107 *   the following step ...
    106108 * - create the undefine file "RandomNumberDistributionFactory.undef" which
    107109 *   undefines all the previously made definitions to allow for more factories
     
    116118 *   #undef Abstract_Encapsulation_Class
    117119 *   #undef type_name_space
     120 *   #undef type_suffix
    118121 *
    119122 *   #undef RANDOMNUMBERDISTRIBUTIONFACTORY_DEF_
     
    149152 *   #include "RandomNumberDistributionFactory.def"
    150153 *   #include "CodePatterns/FactoryTypeList.hpp"
     154 *   #include "RandomNumberDistributionFactory.undef"
    151155 *   #include "CodePatterns/Factory.hpp"
    152156 *   @endcode
     
    189193class Factory : public FactoryTypeList<T>
    190194{
    191   friend class FactoryTest;
    192 
    193195public:
    194196  /** Constructor of class Factory.
Note: See TracChangeset for help on using the changeset viewer.