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
00095
00096 template<>
00097 class ACE_Export ACE_Hash<char>
00098 {
00099 public:
00100
00101 unsigned long operator () (char t) const;
00102 };
00103
00104
00105
00106
00107
00108
00109 template<>
00110 class ACE_Export ACE_Hash<signed char>
00111 {
00112 public:
00113
00114 unsigned long operator () (signed char t) const;
00115 };
00116
00117
00118
00119
00120
00121
00122 template<>
00123 class ACE_Export ACE_Hash<unsigned char>
00124 {
00125 public:
00126
00127 unsigned long operator () (unsigned char t) const;
00128 };
00129
00130 #if 0
00131
00132
00133
00134
00135
00136
00137
00138 template<>
00139 class ACE_Export ACE_Hash<ACE_INT16>
00140 {
00141 public:
00142
00143 unsigned long operator () (ACE_INT16 t) const;
00144 };
00145
00146
00147
00148
00149
00150
00151 template<>
00152 class ACE_Export ACE_Hash<ACE_UINT16>
00153 {
00154 public:
00155
00156 unsigned long operator () (ACE_UINT16 t) const;
00157 };
00158
00159
00160
00161
00162
00163
00164 template<>
00165 class ACE_Export ACE_Hash<ACE_INT32>
00166 {
00167 public:
00168
00169 unsigned long operator () (ACE_INT32 t) const;
00170 };
00171
00172
00173
00174
00175
00176
00177 template<>
00178 class ACE_Export ACE_Hash<ACE_UINT32>
00179 {
00180 public:
00181
00182 unsigned long operator () (ACE_UINT32 t) const;
00183 };
00184
00185
00186
00187
00188
00189
00190 template<>
00191 class ACE_Export ACE_Hash<ACE_UINT64>
00192 {
00193 public:
00194
00195 unsigned long operator () (ACE_UINT64 t) const;
00196 };
00197
00198
00199 #endif
00200
00201
00202
00203
00204
00205
00206 template<>
00207 class ACE_Export ACE_Hash<short>
00208 {
00209 public:
00210
00211 unsigned long operator () (short t) const;
00212 };
00213
00214
00215
00216
00217
00218
00219 template<>
00220 class ACE_Export ACE_Hash<unsigned short>
00221 {
00222 public:
00223
00224 unsigned long operator () (unsigned short t) const;
00225 };
00226
00227
00228
00229
00230
00231
00232 template<>
00233 class ACE_Export ACE_Hash<int>
00234 {
00235 public:
00236
00237 unsigned long operator () (int t) const;
00238 };
00239
00240
00241
00242
00243
00244
00245 template<>
00246 class ACE_Export ACE_Hash<unsigned int>
00247 {
00248 public:
00249
00250 unsigned long operator () (unsigned int t) const;
00251 };
00252
00253
00254
00255
00256
00257
00258 template<>
00259 class ACE_Export ACE_Hash<long>
00260 {
00261 public:
00262
00263 unsigned long operator () (long t) const;
00264 };
00265
00266
00267
00268
00269
00270
00271 template<>
00272 class ACE_Export ACE_Hash<unsigned long>
00273 {
00274 public:
00275
00276 unsigned long operator () (unsigned long t) const;
00277 };
00278
00279 #if !defined (ACE_LACKS_LONGLONG_T) && (ACE_SIZEOF_LONG < 8)
00280
00281
00282
00283
00284
00285 template<>
00286 class ACE_Export ACE_Hash<ACE_INT64>
00287 {
00288 public:
00289
00290 unsigned long operator () (ACE_INT64 t) const;
00291 };
00292 #endif
00293
00294
00295
00296 #if (ACE_SIZEOF_LONG < 8)
00297
00298
00299
00300
00301
00302 template<>
00303 class ACE_Export ACE_Hash<ACE_UINT64>
00304 {
00305 public:
00306
00307 unsigned long operator () (const ACE_UINT64 &t) const;
00308 };
00309 #endif
00310
00311
00312
00313
00314
00315
00316 template<>
00317 class ACE_Export ACE_Hash<const char *>
00318 {
00319 public:
00320
00321 unsigned long operator () (const char *t) const;
00322 };
00323
00324
00325
00326
00327
00328
00329 template<>
00330 class ACE_Export ACE_Hash<char *>
00331 {
00332 public:
00333
00334 unsigned long operator () (const char *t) const;
00335 };
00336
00337
00338
00339
00340
00341
00342 template<>
00343 class ACE_Export ACE_Hash<void *>
00344 {
00345 public:
00346 unsigned long operator () (const void *) const;
00347 };
00348
00349
00350
00351
00352
00353
00354 template<>
00355 class ACE_Export ACE_Equal_To<const char *>
00356 {
00357 public:
00358
00359 int operator () (const char *lhs,
00360 const char *rhs) const;
00361 };
00362
00363
00364
00365
00366
00367
00368
00369 template<>
00370 class ACE_Export ACE_Equal_To<char *>
00371 {
00372 public:
00373
00374 int operator () (const char *lhs,
00375 const char *rhs) const;
00376 };
00377
00378
00379
00380
00381
00382
00383
00384 template<>
00385 class ACE_Export ACE_Equal_To<ACE_UINT16>
00386 {
00387 public:
00388
00389 int operator () (const ACE_UINT16 lhs,
00390 const ACE_UINT16 rhs) const;
00391 };
00392
00393
00394
00395
00396
00397
00398
00399 template<>
00400 class ACE_Export ACE_Equal_To<ACE_INT16>
00401 {
00402 public:
00403
00404 int operator () (const ACE_INT16 lhs,
00405 const ACE_INT16 rhs) const;
00406 };
00407
00408
00409
00410
00411
00412
00413
00414 template<>
00415 class ACE_Export ACE_Equal_To<ACE_UINT32>
00416 {
00417 public:
00418
00419 int operator () (const ACE_UINT32 lhs,
00420 const ACE_UINT32 rhs) const;
00421 };
00422
00423
00424
00425
00426
00427
00428
00429 template<>
00430 class ACE_Export ACE_Equal_To<ACE_INT32>
00431 {
00432 public:
00433
00434 int operator () (const ACE_INT32 lhs,
00435 const ACE_INT32 rhs) const;
00436 };
00437
00438
00439
00440
00441
00442
00443
00444 template<>
00445 class ACE_Export ACE_Equal_To<ACE_UINT64>
00446 {
00447 public:
00448
00449 int operator () (const ACE_UINT64 lhs,
00450 const ACE_UINT64 rhs) const;
00451 };
00452
00453
00454
00455
00456
00457
00458
00459 template<>
00460 class ACE_Export ACE_Less_Than<const char *>
00461 {
00462 public:
00463
00464 int operator () (const char *lhs,
00465 const char *rhs) const;
00466 };
00467
00468
00469
00470
00471
00472
00473
00474 template<>
00475 class ACE_Export ACE_Less_Than<char *>
00476 {
00477 public:
00478
00479 int operator () (const char *lhs,
00480 const char *rhs) const;
00481 };
00482
00483 #if defined (ACE_HAS_WCHAR)
00484
00485 # if ! defined (ACE_LACKS_NATIVE_WCHAR_T)
00486
00487
00488
00489
00490
00491 template<>
00492 class ACE_Export ACE_Hash<wchar_t>
00493 {
00494 public:
00495
00496 unsigned long operator () (wchar_t t) const;
00497 };
00498 # endif
00499
00500
00501
00502
00503
00504 template<>
00505 class ACE_Export ACE_Hash<const wchar_t *>
00506 {
00507 public:
00508
00509 unsigned long operator () (const wchar_t *t) const;
00510 };
00511
00512
00513
00514
00515
00516
00517 template<>
00518 class ACE_Export ACE_Hash<wchar_t *>
00519 {
00520 public:
00521
00522 unsigned long operator () (const wchar_t *t) const;
00523 };
00524
00525
00526
00527
00528
00529
00530 template<>
00531 class ACE_Export ACE_Equal_To<const wchar_t *>
00532 {
00533 public:
00534
00535 int operator () (const wchar_t *lhs,
00536 const wchar_t *rhs) const;
00537 };
00538
00539
00540
00541
00542
00543
00544
00545 template<>
00546 class ACE_Export ACE_Equal_To<wchar_t *>
00547 {
00548 public:
00549
00550 int operator () (const wchar_t *lhs,
00551 const wchar_t *rhs) const;
00552 };
00553
00554
00555
00556
00557
00558
00559
00560 template<>
00561 class ACE_Export ACE_Less_Than<const wchar_t *>
00562 {
00563 public:
00564
00565 int operator () (const wchar_t *lhs,
00566 const wchar_t *rhs) const;
00567 };
00568
00569
00570
00571
00572
00573
00574
00575 template<>
00576 class ACE_Export ACE_Less_Than<wchar_t *>
00577 {
00578 public:
00579
00580 int operator () (const wchar_t *lhs,
00581 const wchar_t *rhs) const;
00582 };
00583
00584 #endif // ACE_HAS_WCHAR
00585
00586 ACE_END_VERSIONED_NAMESPACE_DECL
00587
00588 #if defined (__ACE_INLINE__)
00589 #include "ace/Functor.inl"
00590 #endif
00591
00592 #include "ace/post.h"
00593 #endif