*Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget --HG-- branch : trunk
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
//==========================================================================
|
||||
/**
|
||||
* @file Functor.h
|
||||
@@ -27,26 +26,19 @@
|
||||
*/
|
||||
//==========================================================================
|
||||
|
||||
|
||||
#ifndef ACE_FUNCTOR_H
|
||||
#define ACE_FUNCTOR_H
|
||||
#include /**/ "ace/pre.h"
|
||||
|
||||
#include /**/ "ace/config-all.h"
|
||||
|
||||
#if !defined (ACE_LACKS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif /* ACE_LACKS_PRAGMA_ONCE */
|
||||
|
||||
#include /**/ "ace/ACE_export.h"
|
||||
#include "ace/Basic_Types.h"
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// GOF Command Pattern Classes and Template Specializations //
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* @class ACE_Command_Base
|
||||
*
|
||||
@@ -63,10 +55,8 @@ public:
|
||||
// = Initialization and termination methods.
|
||||
/// Default constructor.
|
||||
ACE_Command_Base (void);
|
||||
|
||||
/// Virtual destructor.
|
||||
virtual ~ACE_Command_Base (void);
|
||||
|
||||
/**
|
||||
* Invokes the method encapsulated by the command, passing along the
|
||||
* passed argument (if any). Users of classes derived from this
|
||||
@@ -76,18 +66,15 @@ public:
|
||||
*/
|
||||
virtual int execute (void *arg = 0) = 0;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// STL-style Functor Classes and Template Specializations //
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Forward declaration since we are going to specialize that template
|
||||
// here. The template itself requires this file so every user of the
|
||||
// template should also see the specialization.
|
||||
template <class TYPE> class ACE_Hash;
|
||||
template <class TYPE> class ACE_Equal_To;
|
||||
template <class TYPE> class ACE_Less_Than;
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<char>
|
||||
*
|
||||
@@ -100,7 +87,6 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (char t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<signed char>
|
||||
*
|
||||
@@ -113,7 +99,6 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (signed char t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<unsigned char>
|
||||
*
|
||||
@@ -126,10 +111,8 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (unsigned char t) const;
|
||||
};
|
||||
|
||||
#if 0
|
||||
// @@ ADD HASHES FOR ACE TYPES
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<ACE_INT16>
|
||||
*
|
||||
@@ -142,7 +125,6 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (ACE_INT16 t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<ACE_UINT16>
|
||||
*
|
||||
@@ -155,7 +137,6 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (ACE_UINT16 t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<ACE_INT32>
|
||||
*
|
||||
@@ -168,7 +149,6 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (ACE_INT32 t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<ACE_UINT32>
|
||||
*
|
||||
@@ -181,7 +161,6 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (ACE_UINT32 t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<ACE_UINT64>
|
||||
*
|
||||
@@ -194,10 +173,8 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (ACE_UINT64 t) const;
|
||||
};
|
||||
|
||||
// @@ DONE ADDING HASHES FOR ACE TYPES
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<short>
|
||||
*
|
||||
@@ -210,7 +187,6 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (short t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<unsigned short>
|
||||
*
|
||||
@@ -223,7 +199,6 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (unsigned short t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<int>
|
||||
*
|
||||
@@ -236,7 +211,6 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (int t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<unsigned int>
|
||||
*
|
||||
@@ -249,7 +223,6 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (unsigned int t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<long>
|
||||
*
|
||||
@@ -262,7 +235,6 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (long t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<unsigned long>
|
||||
*
|
||||
@@ -275,7 +247,6 @@ public:
|
||||
/// Simply returns t
|
||||
unsigned long operator () (unsigned long t) const;
|
||||
};
|
||||
|
||||
#if !defined (ACE_LACKS_LONGLONG_T) && (ACE_SIZEOF_LONG < 8)
|
||||
/**
|
||||
* @class ACE_Hash<ACE_INT64>
|
||||
@@ -290,7 +261,6 @@ public:
|
||||
unsigned long operator () (ACE_INT64 t) const;
|
||||
};
|
||||
#endif /* !ACE_LACKS_LONGLONG_T && ACE_SIZEOF_LONG < 8 */
|
||||
|
||||
// We can do this even if ACE_LACKS_UNSIGNEDLONGLONG_T because there's an
|
||||
// emulation for it in ACE_U_LongLong.
|
||||
#if (ACE_SIZEOF_LONG < 8)
|
||||
@@ -307,7 +277,6 @@ public:
|
||||
unsigned long operator () (const ACE_UINT64 &t) const;
|
||||
};
|
||||
#endif /* ACE_SIZEOF_LONG < 8 */
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<const char *>
|
||||
*
|
||||
@@ -320,7 +289,6 @@ public:
|
||||
/// Calls ACE::hash_pjw
|
||||
unsigned long operator () (const char *t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<char *>
|
||||
*
|
||||
@@ -333,7 +301,6 @@ public:
|
||||
/// Calls ACE::hash_pjw
|
||||
unsigned long operator () (const char *t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<void *>
|
||||
*
|
||||
@@ -345,7 +312,6 @@ class ACE_Export ACE_Hash<void *>
|
||||
public:
|
||||
unsigned long operator () (const void *) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Equal_To<const char *>
|
||||
*
|
||||
@@ -359,7 +325,6 @@ public:
|
||||
int operator () (const char *lhs,
|
||||
const char *rhs) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Equal_To<char *>
|
||||
*
|
||||
@@ -374,7 +339,6 @@ public:
|
||||
int operator () (const char *lhs,
|
||||
const char *rhs) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Equal_To<ACE_UINT16>
|
||||
*
|
||||
@@ -389,7 +353,6 @@ public:
|
||||
int operator () (const ACE_UINT16 lhs,
|
||||
const ACE_UINT16 rhs) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Equal_To<ACE_INT16>
|
||||
*
|
||||
@@ -404,7 +367,6 @@ public:
|
||||
int operator () (const ACE_INT16 lhs,
|
||||
const ACE_INT16 rhs) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Equal_To<ACE_UINT32>
|
||||
*
|
||||
@@ -419,7 +381,6 @@ public:
|
||||
int operator () (const ACE_UINT32 lhs,
|
||||
const ACE_UINT32 rhs) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Equal_To<ACE_INT32>
|
||||
*
|
||||
@@ -434,7 +395,6 @@ public:
|
||||
int operator () (const ACE_INT32 lhs,
|
||||
const ACE_INT32 rhs) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Equal_To<ACE_UINT64>
|
||||
*
|
||||
@@ -449,7 +409,6 @@ public:
|
||||
int operator () (const ACE_UINT64 lhs,
|
||||
const ACE_UINT64 rhs) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Less_Than<const char*>
|
||||
*
|
||||
@@ -464,7 +423,6 @@ public:
|
||||
int operator () (const char *lhs,
|
||||
const char *rhs) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Less_Than<char *>
|
||||
*
|
||||
@@ -479,9 +437,7 @@ public:
|
||||
int operator () (const char *lhs,
|
||||
const char *rhs) const;
|
||||
};
|
||||
|
||||
#if defined (ACE_HAS_WCHAR)
|
||||
|
||||
# if ! defined (ACE_LACKS_NATIVE_WCHAR_T)
|
||||
/**
|
||||
* @class ACE_Hash<wchar_t>
|
||||
@@ -508,7 +464,6 @@ public:
|
||||
/// Calls ACE::hash_pjw
|
||||
unsigned long operator () (const wchar_t *t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Hash<wchar_t *>
|
||||
*
|
||||
@@ -521,7 +476,6 @@ public:
|
||||
/// Calls ACE::hash_pjw
|
||||
unsigned long operator () (const wchar_t *t) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Equal_To<const wchar_t *>
|
||||
*
|
||||
@@ -535,7 +489,6 @@ public:
|
||||
int operator () (const wchar_t *lhs,
|
||||
const wchar_t *rhs) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Equal_To<wchar_t *>
|
||||
*
|
||||
@@ -550,7 +503,6 @@ public:
|
||||
int operator () (const wchar_t *lhs,
|
||||
const wchar_t *rhs) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Less_Than<const wchar_t *>
|
||||
*
|
||||
@@ -565,7 +517,6 @@ public:
|
||||
int operator () (const wchar_t *lhs,
|
||||
const wchar_t *rhs) const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Less_Than<wchar_t *>
|
||||
*
|
||||
@@ -580,15 +531,11 @@ public:
|
||||
int operator () (const wchar_t *lhs,
|
||||
const wchar_t *rhs) const;
|
||||
};
|
||||
|
||||
#endif // ACE_HAS_WCHAR
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
#if defined (__ACE_INLINE__)
|
||||
#include "ace/Functor.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
#include /**/ "ace/post.h"
|
||||
#endif /* ACE_FUNCTOR_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user