Changeset d76c105
- Timestamp:
- Jan 5, 2011, 1:48:15 PM (15 years ago)
- Children:
- 567640
- Parents:
- 1afcbe
- git-author:
- Frederik Heber <heber@…> (01/05/11 11:26:48)
- git-committer:
- Frederik Heber <heber@…> (01/05/11 13:48:15)
- Files:
-
- 8 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
configure.ac
r1afcbe rd76c105 3 3 4 4 AC_PREREQ([2.65]) 5 AC_INIT([CodePatterns], [1.0. 4], [heber@ins.uni-bonn.de], [codepatterns], [http://trac.ins.uni-bonn.de/projects/CodePatterns/])5 AC_INIT([CodePatterns], [1.0.5], [heber@ins.uni-bonn.de], [codepatterns], [http://trac.ins.uni-bonn.de/projects/CodePatterns/]) 6 6 AC_CONFIG_AUX_DIR(config) 7 7 AC_CONFIG_SRCDIR([src/Patterns/Singleton_impl.hpp]) … … 25 25 # refer to the libtool manual, section "Updating library version information": 26 26 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html 27 AC_SUBST([CODEPATTERNS_SO_VERSION], [ 2:2:0])28 AC_SUBST([CODEPATTERNS_API_VERSION], [1.0. 4])27 AC_SUBST([CODEPATTERNS_SO_VERSION], [3:0:0]) 28 AC_SUBST([CODEPATTERNS_API_VERSION], [1.0.5]) 29 29 30 30 # Checks for libraries. -
src/Makefile.am
r1afcbe rd76c105 44 44 Patterns/ObservedIterator.hpp \ 45 45 Patterns/Observer.hpp \ 46 Patterns/PrototypeFactory.hpp \ 47 Patterns/PrototypeFactory_impl.hpp \ 46 48 Patterns/Registry.hpp \ 47 49 Patterns/Singleton.hpp -
src/Patterns/Factory_impl.hpp
r1afcbe rd76c105 72 72 * 73 73 */ 74 #define seqitems_as_enum_key_map(z,n, seq_with_elements, map, keytype, name_space,suffix) \75 map [\76 BOOST_PP_SEQ_ELEM(n, seq_with_elements) \77 ] = keytype< name_space BOOST_PP_SEQ_ELEM(n, seq_with_elements)suffix > ();74 #define seqitems_as_enum_key_map(z,n,_seq_with_elements, _map, _keytype, _key_name_space, _type_name_space, _type_suffix) \ 75 _map [ _key_name_space \ 76 BOOST_PP_SEQ_ELEM(n, _seq_with_elements) \ 77 ] = _keytype< _type_name_space BOOST_PP_SEQ_ELEM(n, _seq_with_elements) _type_suffix > (); 78 78 79 79 /** Functions that allows to print a given seq of elements in the way of … … 105 105 * EnumMap[ "four" ] = test:: four; 106 106 */ 107 #define seqitems_as_enum_value_map(z,n, seq_with_elements, map, type_specifier, type_suffix,enum_name_space) \108 map [type_specifier \109 BOOST_PP_SEQ_ELEM(n, seq_with_elements) \110 type_suffix \111 ] = enum_name_space BOOST_PP_SEQ_ELEM(n,seq_with_elements);107 #define seqitems_as_enum_value_map(z,n,_seq_with_elements, _map, _type_specifier, _type_suffix, _enum_name_space) \ 108 _map [ _type_specifier \ 109 BOOST_PP_SEQ_ELEM(n, _seq_with_elements) \ 110 _type_suffix \ 111 ] = _enum_name_space BOOST_PP_SEQ_ELEM(n, _seq_with_elements); 112 112 113 113 … … 137 137 { 138 138 // fill PrototypeTable 139 #define BOOST_PP_LOCAL_MACRO(n) seqitems_as_enum_key_map(~, n, type_seq, PrototypeTable, new Creator< Abstract_Interface_Class BOOST_PP_COMMA() Abstract_Encapsulation_Class, type_name_space, type_name_space_suffix > )139 #define BOOST_PP_LOCAL_MACRO(n) seqitems_as_enum_key_map(~, n, type_seq, PrototypeTable, new Creator< Abstract_Interface_Class BOOST_PP_COMMA() Abstract_Encapsulation_Class, FactoryTypeList<Abstract_Interface_Class>::, type_name_space, type_name_space_suffix > ) 140 140 #define BOOST_PP_LOCAL_LIMITS (0, BOOST_PP_SEQ_SIZE(type_seq)-1 ) 141 141 #include BOOST_PP_LOCAL_ITERATE() -
src/Patterns/unittests/Makefile.am
r1afcbe rd76c105 14 14 FactoryUnitTest \ 15 15 ObserverUnitTest \ 16 PrototypeFactoryUnitTest \ 16 17 RegistryUnitTest \ 17 18 SingletonUnitTest … … 73 74 ObserverUnitTest_LDADD = $(TESTLIBS) 74 75 76 PrototypeFactoryUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ 77 PrototypeFactoryUnitTest.cpp \ 78 PrototypeFactoryUnitTest.hpp \ 79 stubs/CloneStub.cpp \ 80 stubs/CloneStub.hpp \ 81 stubs/CommonStub.cpp \ 82 stubs/CommonStub.hpp \ 83 stubs/PrototypeFactoryStub.hpp \ 84 stubs/PrototypeFactoryStub.cpp \ 85 ../PrototypeFactory.hpp \ 86 ../FactoryTypeList.hpp \ 87 ../PrototypeFactory_impl.hpp 88 PrototypeFactoryUnitTest_LDADD = $(TESTLIBS) 89 75 90 RegistryUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ 76 91 RegistryUnitTest.cpp \ -
src/Patterns/unittests/stubs/CloneStub.hpp
r1afcbe rd76c105 24 24 }; 25 25 26 class CloneTest; 27 class PrototypeFactoryStub; 28 26 29 template <class T> 27 30 class Prototype : … … 29 32 public Clone<IPrototype> 30 33 { 31 public: 34 /** 35 * Prototype Factory is friend because it needs to access protected cstor 36 * to instantiate prototypes. 37 */ 38 friend class PrototypeFactoryStub; 39 40 /** 41 * Test is friend such that it can access protected cstor. 42 */ 43 friend class CloneTest; 44 45 protected: 32 46 Prototype() { 33 47 member.setcount(0); … … 35 49 ~Prototype() {}; 36 50 51 public: 37 52 void count() { 38 53 member.count();
Note:
See TracChangeset
for help on using the changeset viewer.