sipxportlib  Version 3.3
UtlContainablePair.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2008 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2008 SIPez LLC.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 
12 #ifndef _UtlContainablePair_h_
13 #define _UtlContainablePair_h_
14 
15 // SYSTEM INCLUDES
16 #include "os/OsDefs.h"
17 
18 // APPLICATION INCLUDES
19 #include "utl/UtlDefs.h"
20 #include "utl/UtlContainable.h"
21 
22 // DEFINES
23 // MACROS
24 // EXTERNAL FUNCTIONS
25 // EXTERNAL VARIABLES
26 // CONSTANTS
27 // STRUCTS
28 // TYPEDEFS
29 // FORWARD DECLARATIONS
30 
33 {
34 /* //////////////////////////// PUBLIC //////////////////////////////////// */
35 public:
36  static const UtlContainableType TYPE;
37 
38 /* ============================ CREATORS ================================== */
39 
42 
44  virtual ~UtlContainablePair();
45 
46 /* ============================ MANIPULATORS ============================== */
47 
60 /* ============================ ACCESSORS ================================= */
61 
63  UtlContainable* getFirst() const;
64 
66  UtlContainable* getSecond() const;
67 
69  virtual unsigned hash() const;
75  virtual UtlContainableType getContainableType() const;
77 
78 /* ============================ INQUIRY =================================== */
79 
81  virtual int compareTo(UtlContainable const *) const;
93 /* //////////////////////////// PROTECTED ///////////////////////////////// */
94 protected:
95 
96 /* //////////////////////////// PRIVATE /////////////////////////////////// */
97 private:
98  UtlContainable *mpFirst;
99  UtlContainable *mpSecond;
100 };
101 
102 /* ============================ INLINE METHODS ============================ */
103 
104 #endif // _UtlContainablePair_h_
virtual ~UtlContainablePair()
Destructor.
Definition: UtlContainablePair.cpp:32
UtlContainable * getSecond() const
Get the second value wrapped by this object.
Definition: UtlContainablePair.cpp:61
UtlContainable * setFirst(UtlContainable *val)
Set a new first value for this object.
Definition: UtlContainablePair.cpp:40
const char *const UtlContainableType
Definition: UtlDefs.h:70
Definition: UtlContainable.h:37
virtual unsigned hash() const
Calculate a unique hash code for this object.
Definition: UtlContainablePair.cpp:66
UtlContainable * getFirst() const
Get the first value wrapped by this object.
Definition: UtlContainablePair.cpp:56
static const UtlContainableType TYPE
Class type used for runtime checking.
Definition: UtlContainablePair.h:36
virtual UtlContainableType getContainableType() const
Get the ContainableType for a UtlContainable derived class.
Definition: UtlContainablePair.cpp:72
UtlContainablePair(UtlContainable *pFirst, UtlContainable *pSecond)
Constructor accepting an optional default value.
Definition: UtlContainablePair.cpp:26
A UtlContainable wrapper for a pair of UtlContainable objects.
Definition: UtlContainablePair.h:32
UtlContainable * setSecond(UtlContainable *val)
Set a new second value for this object.
Definition: UtlContainablePair.cpp:47
virtual int compareTo(UtlContainable const *) const
Compare the this object to another like-objects.
Definition: UtlContainablePair.cpp:79