- Fixed build failures with gcc 4.3 pre-release
(http://bugs.debian.org/413432) git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@823 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
2fdafe3884
commit
214635bfc1
13 changed files with 41 additions and 39 deletions
|
@ -491,7 +491,7 @@ namespace Loki
|
|||
|
||||
protected:
|
||||
|
||||
virtual ~EvictRandom(){};
|
||||
virtual ~EvictRandom(){}
|
||||
|
||||
void onCreate(const DT&){
|
||||
}
|
||||
|
@ -662,7 +662,7 @@ namespace Loki
|
|||
public CreationPolicy, public StatisticPolicy, EvictionPolicy< AbstractProduct * , unsigned >
|
||||
{
|
||||
private:
|
||||
typedef Factory< AbstractProduct, IdentifierType, CreatorParmTList, FactoryErrorPolicy> Factory;
|
||||
typedef Factory< AbstractProduct, IdentifierType, CreatorParmTList, FactoryErrorPolicy> MyFactory;
|
||||
typedef FactoryImpl< AbstractProduct, IdentifierType, CreatorParmTList > Impl;
|
||||
typedef Functor< AbstractProduct* , CreatorParmTList > ProductCreator;
|
||||
typedef EncapsulationPolicy<AbstractProduct> NP;
|
||||
|
@ -689,16 +689,16 @@ namespace Loki
|
|||
public:
|
||||
typedef typename NP::ProductReturn ProductReturn;
|
||||
private:
|
||||
typedef Key< Impl, IdentifierType > Key;
|
||||
typedef std::map< Key, ObjVector > KeyToObjVectorMap;
|
||||
typedef std::map< AbstractProduct*, Key > FetchedObjToKeyMap;
|
||||
typedef Key< Impl, IdentifierType > MyKey;
|
||||
typedef std::map< MyKey, ObjVector > KeyToObjVectorMap;
|
||||
typedef std::map< AbstractProduct*, MyKey > FetchedObjToKeyMap;
|
||||
|
||||
Factory factory;
|
||||
MyFactory factory;
|
||||
KeyToObjVectorMap fromKeyToObjVector;
|
||||
FetchedObjToKeyMap providedObjects;
|
||||
unsigned outObjects;
|
||||
|
||||
ObjVector& getContainerFromKey(Key key){
|
||||
ObjVector& getContainerFromKey(MyKey key){
|
||||
return fromKeyToObjVector[key];
|
||||
}
|
||||
|
||||
|
@ -864,7 +864,7 @@ namespace Loki
|
|||
|
||||
ProductReturn CreateObject(const IdentifierType& id)
|
||||
{
|
||||
Key key(id);
|
||||
MyKey key(id);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -879,7 +879,7 @@ namespace Loki
|
|||
ProductReturn CreateObject(const IdentifierType& id,
|
||||
Parm1 p1)
|
||||
{
|
||||
Key key(id,p1);
|
||||
MyKey key(id,p1);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -894,7 +894,7 @@ namespace Loki
|
|||
ProductReturn CreateObject(const IdentifierType& id,
|
||||
Parm1 p1, Parm2 p2)
|
||||
{
|
||||
Key key(id,p1,p2);
|
||||
MyKey key(id,p1,p2);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -909,7 +909,7 @@ namespace Loki
|
|||
ProductReturn CreateObject(const IdentifierType& id,
|
||||
Parm1 p1, Parm2 p2, Parm3 p3)
|
||||
{
|
||||
Key key(id,p1,p2,p3);
|
||||
MyKey key(id,p1,p2,p3);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -924,7 +924,7 @@ namespace Loki
|
|||
ProductReturn CreateObject(const IdentifierType& id,
|
||||
Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
|
||||
{
|
||||
Key key(id,p1,p2,p3,p4);
|
||||
MyKey key(id,p1,p2,p3,p4);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -940,7 +940,7 @@ namespace Loki
|
|||
ProductReturn CreateObject(const IdentifierType& id,
|
||||
Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
|
||||
{
|
||||
Key key(id,p1,p2,p3,p4,p5);
|
||||
MyKey key(id,p1,p2,p3,p4,p5);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -957,7 +957,7 @@ namespace Loki
|
|||
Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
|
||||
Parm6 p6)
|
||||
{
|
||||
Key key(id,p1,p2,p3,p4,p5,p6);
|
||||
MyKey key(id,p1,p2,p3,p4,p5,p6);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -974,7 +974,7 @@ namespace Loki
|
|||
Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
|
||||
Parm6 p6, Parm7 p7 )
|
||||
{
|
||||
Key key(id,p1,p2,p3,p4,p5,p6,p7);
|
||||
MyKey key(id,p1,p2,p3,p4,p5,p6,p7);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -991,7 +991,7 @@ namespace Loki
|
|||
Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
|
||||
Parm6 p6, Parm7 p7, Parm8 p8)
|
||||
{
|
||||
Key key(id,p1,p2,p3,p4,p5,p6,p7,p8);
|
||||
MyKey key(id,p1,p2,p3,p4,p5,p6,p7,p8);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -1008,7 +1008,7 @@ namespace Loki
|
|||
Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
|
||||
Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
|
||||
{
|
||||
Key key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9);
|
||||
MyKey key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -1025,7 +1025,7 @@ namespace Loki
|
|||
Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5,
|
||||
Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9,Parm10 p10)
|
||||
{
|
||||
Key key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10);
|
||||
MyKey key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -1043,7 +1043,7 @@ namespace Loki
|
|||
Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10,
|
||||
Parm11 p11)
|
||||
{
|
||||
Key key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11);
|
||||
MyKey key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -1061,7 +1061,7 @@ namespace Loki
|
|||
Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10,
|
||||
Parm11 p11, Parm12 p12)
|
||||
{
|
||||
Key key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12);
|
||||
MyKey key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -1079,7 +1079,7 @@ namespace Loki
|
|||
Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10,
|
||||
Parm11 p11, Parm12 p12, Parm13 p13)
|
||||
{
|
||||
Key key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13);
|
||||
MyKey key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -1098,7 +1098,7 @@ namespace Loki
|
|||
Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10,
|
||||
Parm11 p11, Parm12 p12, Parm13 p13, Parm14 p14)
|
||||
{
|
||||
Key key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14);
|
||||
MyKey key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
@ -1117,7 +1117,7 @@ namespace Loki
|
|||
Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10,
|
||||
Parm11 p11, Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
|
||||
{
|
||||
Key key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15);
|
||||
MyKey key(id,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15);
|
||||
AbstractProduct *pProduct(getPointerToObjectInContainer(getContainerFromKey(key)));
|
||||
if(shouldCreateObject(pProduct))
|
||||
{
|
||||
|
|
|
@ -171,7 +171,7 @@ namespace Loki
|
|||
protected:
|
||||
typedef CallBackSP ProductReturn;
|
||||
SmartPointer() : fun(this, &SmartPointer::smartPointerCallbackFunction) {}
|
||||
virtual ~SmartPointer(){};
|
||||
virtual ~SmartPointer(){}
|
||||
|
||||
ProductReturn encapsulate(AbstractProduct* pProduct)
|
||||
{
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cstdio>
|
||||
#include <climits>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
|
|
|
@ -188,6 +188,9 @@ namespace Loki
|
|||
protected:
|
||||
// Destroys the data stored
|
||||
// (Destruction might be taken over by the OwnershipPolicy)
|
||||
//
|
||||
// If your compiler gives you a warning in this area while
|
||||
// compiling the tests, it is on purpose, please ignore it.
|
||||
void Destroy()
|
||||
{
|
||||
delete pointee_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue