Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef ACE_FUNCTOR_H
00032 #define ACE_FUNCTOR_H
00033 #include "ace/pre.h"
00034
00035 #include "ace/config-all.h"
00036
00037 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00038 # pragma once
00039 #endif
00040
00041 #include "ace/ACE_export.h"
00042 #include "ace/Basic_Types.h"
00043
00044 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 class ACE_Export ACE_Command_Base
00061 {
00062 public:
00063
00064
00065 ACE_Command_Base (void);
00066
00067
00068 virtual ~ACE_Command_Base (void);
00069
00070
00071
00072
00073
00074
00075
00076
00077 virtual int execute (void *arg = 0) = 0;
00078 };
00079
00080
00081
00082
00083
00084
00085
00086
00087 template <class TYPE> class ACE_Hash;
00088 template <class TYPE> class ACE_Equal_To;
00089 template <class TYPE> class ACE_Less_Than;
00090
00091
00092
00093
00094 template<>
00095 class ACE_Export ACE_Hash<char>
00096 {
00097 public:
00098
00099 unsigned long operator () (char t) const;
00100 };
00101
00102
00103
00104
00105 template<>
00106 class ACE_Export ACE_Hash<signed char>
00107 {
00108 public:
00109
00110 unsigned long operator () (signed char t) const;
00111 };
00112
00113
00114
00115
00116 template<>
00117 class ACE_Export ACE_Hash<unsigned char>
00118 {
00119 public:
00120
00121 unsigned long operator () (unsigned char t) const;
00122 };
00123
00124 #if 0
00125
00126
00127
00128
00129
00130 template<>
00131 class ACE_Export ACE_Hash<ACE_INT16>
00132 {
00133 public:
00134
00135 unsigned long operator () (ACE_INT16 t) const;
00136 };
00137
00138
00139
00140
00141 template<>
00142 class ACE_Export ACE_Hash<ACE_UINT16>
00143 {
00144 public:
00145
00146 unsigned long operator () (ACE_UINT16 t) const;
00147 };
00148
00149
00150
00151
00152 template<>
00153 class ACE_Export ACE_Hash<ACE_INT32>
00154 {
00155 public:
00156
00157 unsigned long operator () (ACE_INT32 t) const;
00158 };
00159
00160
00161
00162
00163 template<>
00164 class ACE_Export ACE_Hash<ACE_UINT32>
00165 {
00166 public:
00167
00168 unsigned long operator () (ACE_UINT32 t) const;
00169 };
00170
00171
00172
00173
00174 template<>
00175 class ACE_Export ACE_Hash<ACE_UINT64>
00176 {
00177 public:
00178
00179 unsigned long operator () (ACE_UINT64 t) const;
00180 };
00181
00182
00183 #endif
00184
00185
00186
00187
00188 template<>
00189 class ACE_Export ACE_Hash<short>
00190 {
00191 public:
00192
00193 unsigned long operator () (short t) const;
00194 };
00195
00196
00197
00198
00199 template<>
00200 class ACE_Export ACE_Hash<unsigned short>
00201 {
00202 public:
00203
00204 unsigned long operator () (unsigned short t) const;
00205 };
00206
00207
00208
00209
00210 template<>
00211 class ACE_Export ACE_Hash<int>
00212 {
00213 public:
00214
00215 unsigned long operator () (int t) const;
00216 };
00217
00218
00219
00220
00221 template<>
00222 class ACE_Export ACE_Hash<unsigned int>
00223 {
00224 public:
00225
00226 unsigned long operator () (unsigned int t) const;
00227 };
00228
00229
00230
00231
00232 template<>
00233 class ACE_Export ACE_Hash<long>
00234 {
00235 public:
00236
00237 unsigned long operator () (long t) const;
00238 };
00239
00240
00241
00242
00243 template<>
00244 class ACE_Export ACE_Hash<unsigned long>
00245 {
00246 public:
00247
00248 unsigned long operator () (unsigned long t) const;
00249 };
00250
00251 #if !defined (ACE_LACKS_LONGLONG_T) && (ACE_SIZEOF_LONG < 8)
00252
00253
00254
00255 template<>
00256 class ACE_Export ACE_Hash<ACE_INT64>
00257 {
00258 public:
00259
00260 unsigned long operator () (ACE_INT64 t) const;
00261 };
00262 #endif
00263
00264
00265
00266 #if (ACE_SIZEOF_LONG < 8)
00267
00268
00269
00270 template<>
00271 class ACE_Export ACE_Hash<ACE_UINT64>
00272 {
00273 public:
00274
00275 unsigned long operator () (const ACE_UINT64 &t) const;
00276 };
00277 #endif
00278
00279
00280
00281
00282 template<>
00283 class ACE_Export ACE_Hash<const char *>
00284 {
00285 public:
00286
00287 unsigned long operator () (const char *t) const;
00288 };
00289
00290
00291
00292
00293 template<>
00294 class ACE_Export ACE_Hash<char *>
00295 {
00296 public:
00297
00298 unsigned long operator () (const char *t) const;
00299 };
00300
00301
00302
00303
00304 template<>
00305 class ACE_Export ACE_Hash<void *>
00306 {
00307 public:
00308 unsigned long operator () (const void *) const;
00309 };
00310
00311
00312
00313
00314 template<>
00315 class ACE_Export ACE_Equal_To<const char *>
00316 {
00317 public:
00318
00319 int operator () (const char *lhs,
00320 const char *rhs) const;
00321 };
00322
00323
00324
00325
00326
00327 template<>
00328 class ACE_Export ACE_Equal_To<char *>
00329 {
00330 public:
00331
00332 int operator () (const char *lhs,
00333 const char *rhs) const;
00334 };
00335
00336
00337
00338
00339
00340 template<>
00341 class ACE_Export ACE_Equal_To<ACE_UINT16>
00342 {
00343 public:
00344
00345 int operator () (const ACE_UINT16 lhs,
00346 const ACE_UINT16 rhs) const;
00347 };
00348
00349
00350
00351
00352
00353 template<>
00354 class ACE_Export ACE_Equal_To<ACE_INT16>
00355 {
00356 public:
00357
00358 int operator () (const ACE_INT16 lhs,
00359 const ACE_INT16 rhs) const;
00360 };
00361
00362
00363
00364
00365
00366 template<>
00367 class ACE_Export ACE_Equal_To<ACE_UINT32>
00368 {
00369 public:
00370
00371 int operator () (const ACE_UINT32 lhs,
00372 const ACE_UINT32 rhs) const;
00373 };
00374
00375
00376
00377
00378
00379 template<>
00380 class ACE_Export ACE_Equal_To<ACE_INT32>
00381 {
00382 public:
00383
00384 int operator () (const ACE_INT32 lhs,
00385 const ACE_INT32 rhs) const;
00386 };
00387
00388
00389
00390
00391
00392 template<>
00393 class ACE_Export ACE_Equal_To<ACE_UINT64>
00394 {
00395 public:
00396
00397 int operator () (const ACE_UINT64 lhs,
00398 const ACE_UINT64 rhs) const;
00399 };
00400
00401
00402
00403
00404
00405 template<>
00406 class ACE_Export ACE_Less_Than<const char *>
00407 {
00408 public:
00409
00410 int operator () (const char *lhs,
00411 const char *rhs) const;
00412 };
00413
00414
00415
00416
00417
00418 template<>
00419 class ACE_Export ACE_Less_Than<char *>
00420 {
00421 public:
00422
00423 int operator () (const char *lhs,
00424 const char *rhs) const;
00425 };
00426
00427 #if defined (ACE_HAS_WCHAR)
00428
00429 # if ! defined (ACE_LACKS_NATIVE_WCHAR_T)
00430
00431
00432
00433 template<>
00434 class ACE_Export ACE_Hash<wchar_t>
00435 {
00436 public:
00437
00438 unsigned long operator () (wchar_t t) const;
00439 };
00440 # endif
00441
00442
00443
00444 template<>
00445 class ACE_Export ACE_Hash<const wchar_t *>
00446 {
00447 public:
00448
00449 unsigned long operator () (const wchar_t *t) const;
00450 };
00451
00452
00453
00454
00455 template<>
00456 class ACE_Export ACE_Hash<wchar_t *>
00457 {
00458 public:
00459
00460 unsigned long operator () (const wchar_t *t) const;
00461 };
00462
00463
00464
00465
00466 template<>
00467 class ACE_Export ACE_Equal_To<const wchar_t *>
00468 {
00469 public:
00470
00471 int operator () (const wchar_t *lhs,
00472 const wchar_t *rhs) const;
00473 };
00474
00475
00476
00477
00478
00479 template<>
00480 class ACE_Export ACE_Equal_To<wchar_t *>
00481 {
00482 public:
00483
00484 int operator () (const wchar_t *lhs,
00485 const wchar_t *rhs) const;
00486 };
00487
00488
00489
00490
00491
00492 template<>
00493 class ACE_Export ACE_Less_Than<const wchar_t *>
00494 {
00495 public:
00496
00497 int operator () (const wchar_t *lhs,
00498 const wchar_t *rhs) const;
00499 };
00500
00501
00502
00503
00504
00505 template<>
00506 class ACE_Export ACE_Less_Than<wchar_t *>
00507 {
00508 public:
00509
00510 int operator () (const wchar_t *lhs,
00511 const wchar_t *rhs) const;
00512 };
00513
00514 #endif // ACE_HAS_WCHAR
00515
00516 ACE_END_VERSIONED_NAMESPACE_DECL
00517
00518 #if defined (__ACE_INLINE__)
00519 #include "ace/Functor.inl"
00520 #endif
00521
00522 #include "ace/post.h"
00523 #endif