00001
#if !defined(__ABSTRACTFACTORY_HPP)
00002
#define __ABSTRACTFACTORY_HPP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#if !defined(__COMMON_HPP)
00025
#include <Common.hpp>
00026
#endif
00027
00028
#if !defined(__ALLOCATOR_HPP)
00029
#include <Allocator.hpp>
00030
#endif
00031
00032
#if !defined(__ALLOCATORNOTFOUNDEXCEPTION_HPP)
00033
#include <AllocatorNotFoundException.hpp>
00034
#endif
00035
00036
#if !defined(__ALLOCATORALREADYEXISTSEXCEPTION_HPP)
00037
#include <AllocatorAlreadyExistsException.hpp>
00038
#endif
00039
00040
#if !defined(__ASSOCIATIVEITERATOR_HPP)
00041
#include <AssociativeIterator.hpp>
00042
#endif
00043
00044
#if !defined(__ITERATOR_HPP)
00045
#include <Iterator.hpp>
00046
#endif
00047
00048
namespace corelinux
00049 {
00050
00059
template<
class UniqueId >
00060 class AbstractFactory :
public CoreLinuxObject
00061 {
00062
00063
public:
00064
00065
00066
00067
00068
00070
00071 AbstractFactory(
void )
00072 :
00073
CoreLinuxObject()
00074 {
00075 ;
00076 }
00077
00083 AbstractFactory(
const AbstractFactory & )
00084 :
00085
CoreLinuxObject()
00086 {
00087
00088 }
00089
00091
00092 virtual ~AbstractFactory(
void )
00093 {
00094 ;
00095 }
00096
00097
00098
00099
00100
00107 AbstractFactory & operator=(
const AbstractFactory & )
00108 {
00109
return ( *this );
00110 }
00111
00118 bool operator==(
const AbstractFactory & aRef )
const
00119
{
00120
return(
this == &aRef );
00121 }
00122
00123
00124
00125
00126
00133
virtual Count
getCreateCount(
void ) const = 0;
00134
00141 virtual Count getDestroyCount(
void ) const = 0;
00142
00143
00152 virtual
AllocatorPtr getAllocator( UniqueId ) const
00153 throw(
AllocatorNotFoundException) = 0;
00154
00155
00156
00157
00158
00165 virtual
void addAllocator( UniqueId,
AllocatorPtr )
00166 throw(
AllocatorAlreadyExistsException) = 0;
00167
00176 virtual
AllocatorPtr removeAllocator( UniqueId )
00177 throw(AllocatorNotFoundException) = 0;
00178
00179
00180
00181
00188 virtual
Iterator<
Allocator *> * createIterator(
void ) const = 0;
00189
00195 virtual
void destroyIterator(
Iterator<
Allocator *> * ) const = 0;
00196
00204 virtual
AssociativeIterator<UniqueId,
Allocator *> *
00205 createAssociativeIterator(
void ) const = 0;
00206
00213 virtual
void destroyAssociativeIterator
00214 (
00215
AssociativeIterator<UniqueId,
Allocator *> *
00216 ) const = 0;
00217
00218 };
00219 }
00220
00221 #endif
00222
00223
00224
00225
00226
00227
00228
00229
00230