diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioSystem.h | 1 | ||||
-rw-r--r-- | include/media/IAudioPolicyService.h | 1 | ||||
-rw-r--r-- | include/media/stagefright/AudioSource.h | 30 | ||||
-rw-r--r-- | include/media/stagefright/MediaDefs.h | 1 | ||||
-rw-r--r-- | include/media/stagefright/MetaData.h | 2 | ||||
-rw-r--r-- | include/ui/Input.h | 151 | ||||
-rw-r--r-- | include/ui/KeyLayoutMap.h | 12 | ||||
-rw-r--r-- | include/ui/Keyboard.h | 12 | ||||
-rwxr-xr-x | include/ui/KeycodeLabels.h | 43 | ||||
-rw-r--r-- | include/utils/RefBase.h | 62 |
10 files changed, 241 insertions, 74 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 03f8944..2dc4beb 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -392,6 +392,7 @@ public: static status_t getStreamVolumeIndex(stream_type stream, int *index); static uint32_t getStrategyForStream(stream_type stream); + static uint32_t getDevicesForStream(stream_type stream); static audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc); static status_t registerEffect(effect_descriptor_t *desc, diff --git a/include/media/IAudioPolicyService.h b/include/media/IAudioPolicyService.h index 5afceaa..720a562 100644 --- a/include/media/IAudioPolicyService.h +++ b/include/media/IAudioPolicyService.h @@ -74,6 +74,7 @@ public: virtual status_t setStreamVolumeIndex(AudioSystem::stream_type stream, int index) = 0; virtual status_t getStreamVolumeIndex(AudioSystem::stream_type stream, int *index) = 0; virtual uint32_t getStrategyForStream(AudioSystem::stream_type stream) = 0; + virtual uint32_t getDevicesForStream(AudioSystem::stream_type stream) = 0; virtual audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc) = 0; virtual status_t registerEffect(effect_descriptor_t *desc, audio_io_handle_t output, diff --git a/include/media/stagefright/AudioSource.h b/include/media/stagefright/AudioSource.h index d484d60..9e6f0e2 100644 --- a/include/media/stagefright/AudioSource.h +++ b/include/media/stagefright/AudioSource.h @@ -18,15 +18,17 @@ #define AUDIO_SOURCE_H_ +#include <media/AudioRecord.h> #include <media/AudioSystem.h> #include <media/stagefright/MediaSource.h> +#include <media/stagefright/MediaBuffer.h> +#include <utils/List.h> namespace android { class AudioRecord; -struct MediaBufferGroup; -struct AudioSource : public MediaSource { +struct AudioSource : public MediaSource, public MediaBufferObserver { // Note that the "channels" parameter is _not_ the number of channels, // but a bitmask of AudioSystem::audio_channels constants. AudioSource( @@ -45,6 +47,9 @@ struct AudioSource : public MediaSource { virtual status_t read( MediaBuffer **buffer, const ReadOptions *options = NULL); + status_t dataCallbackTimestamp(const AudioRecord::Buffer& buffer, int64_t timeUs); + virtual void signalBufferReturned(MediaBuffer *buffer); + protected: virtual ~AudioSource(); @@ -54,27 +59,31 @@ private: // After the initial mute, we raise the volume linearly // over kAutoRampDurationUs. - kAutoRampDurationUs = 700000, + kAutoRampDurationUs = 300000, // This is the initial mute duration to suppress // the video recording signal tone - kAutoRampStartUs = 1000000, - }; + kAutoRampStartUs = 0, + }; + + Mutex mLock; + Condition mFrameAvailableCondition; + Condition mFrameEncodingCompletionCondition; AudioRecord *mRecord; status_t mInitCheck; bool mStarted; + int32_t mSampleRate; - bool mCollectStats; bool mTrackMaxAmplitude; int64_t mStartTimeUs; int16_t mMaxAmplitude; int64_t mPrevSampleTimeUs; - int64_t mTotalLostFrames; - int64_t mPrevLostBytes; int64_t mInitialReadTimeUs; + int64_t mNumFramesReceived; + int64_t mNumClientOwnedBuffers; - MediaBufferGroup *mGroup; + List<MediaBuffer * > mBuffersReceived; void trackMaxAmplitude(int16_t *data, int nSamples); @@ -84,6 +93,9 @@ private: int32_t startFrame, int32_t rampDurationFrames, uint8_t *data, size_t bytes); + void releaseQueuedFrames_l(); + void waitOutstandingEncodingFrames_l(); + AudioSource(const AudioSource &); AudioSource &operator=(const AudioSource &); }; diff --git a/include/media/stagefright/MediaDefs.h b/include/media/stagefright/MediaDefs.h index 31a549c..66dfff6 100644 --- a/include/media/stagefright/MediaDefs.h +++ b/include/media/stagefright/MediaDefs.h @@ -38,6 +38,7 @@ extern const char *MEDIA_MIMETYPE_AUDIO_G711_ALAW; extern const char *MEDIA_MIMETYPE_AUDIO_G711_MLAW; extern const char *MEDIA_MIMETYPE_AUDIO_RAW; extern const char *MEDIA_MIMETYPE_AUDIO_FLAC; +extern const char *MEDIA_MIMETYPE_AUDIO_AAC_ADTS; extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG4; extern const char *MEDIA_MIMETYPE_CONTAINER_WAV; diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h index 18fd90e..f7f2235 100644 --- a/include/media/stagefright/MetaData.h +++ b/include/media/stagefright/MetaData.h @@ -48,6 +48,7 @@ enum { kKeyBitRate = 'brte', // int32_t (bps) kKeyESDS = 'esds', // raw data kKeyAVCC = 'avcc', // raw data + kKeyD263 = 'd263', // raw data kKeyVorbisInfo = 'vinf', // raw data kKeyVorbisBooks = 'vboo', // raw data kKeyWantsNALFragments = 'NALf', @@ -118,6 +119,7 @@ enum { enum { kTypeESDS = 'esds', kTypeAVCC = 'avcc', + kTypeD263 = 'd263', }; class MetaData : public RefBase { diff --git a/include/ui/Input.h b/include/ui/Input.h index 2012fcc..86ce098 100644 --- a/include/ui/Input.h +++ b/include/ui/Input.h @@ -28,6 +28,10 @@ #include <utils/RefBase.h> #include <utils/String8.h> +#ifdef HAVE_ANDROID_OS +class SkMatrix; +#endif + /* * Additional private constants not defined in ndk/ui/input.h. */ @@ -79,6 +83,10 @@ struct AInputDevice { namespace android { +#ifdef HAVE_ANDROID_OS +class Parcel; +#endif + /* * Flags that flow alongside events in the input dispatch system to help with certain * policy decisions such as waking from device sleep. @@ -162,15 +170,30 @@ struct InputConfiguration { * Pointer coordinate data. */ struct PointerCoords { - float x; - float y; - float pressure; - float size; - float touchMajor; - float touchMinor; - float toolMajor; - float toolMinor; - float orientation; + enum { MAX_AXES = 14 }; // 14 so that sizeof(PointerCoords) == 64 + + // Bitfield of axes that are present in this structure. + uint64_t bits; + + // Values of axes that are stored in this structure packed in order by axis id + // for each axis that is present in the structure according to 'bits'. + float values[MAX_AXES]; + + inline void clear() { + bits = 0; + } + + float getAxisValue(int32_t axis) const; + status_t setAxisValue(int32_t axis, float value); + float* editAxisValue(int32_t axis); + +#ifdef HAVE_ANDROID_OS + status_t readFromParcel(Parcel* parcel); + status_t writeToParcel(Parcel* parcel) const; +#endif + +private: + void tooManyAxes(int axis); }; /* @@ -185,12 +208,13 @@ public: inline int32_t getDeviceId() const { return mDeviceId; } inline int32_t getSource() const { return mSource; } - + + inline void setSource(int32_t source) { mSource = source; } + protected: void initialize(int32_t deviceId, int32_t source); void initialize(const InputEvent& from); -private: int32_t mDeviceId; int32_t mSource; }; @@ -241,7 +265,7 @@ public: nsecs_t eventTime); void initialize(const KeyEvent& from); -private: +protected: int32_t mAction; int32_t mFlags; int32_t mKeyCode; @@ -263,12 +287,18 @@ public: inline int32_t getAction() const { return mAction; } + inline void setAction(int32_t action) { mAction = action; } + inline int32_t getFlags() const { return mFlags; } inline int32_t getEdgeFlags() const { return mEdgeFlags; } + inline void setEdgeFlags(int32_t edgeFlags) { mEdgeFlags = edgeFlags; } + inline int32_t getMetaState() const { return mMetaState; } + inline void setMetaState(int32_t metaState) { mMetaState = metaState; } + inline float getXOffset() const { return mXOffset; } inline float getYOffset() const { return mYOffset; } @@ -285,48 +315,54 @@ public: inline nsecs_t getEventTime() const { return mSampleEventTimes[getHistorySize()]; } + const PointerCoords* getRawPointerCoords(size_t pointerIndex) const; + + float getRawAxisValue(int32_t axis, size_t pointerIndex) const; + inline float getRawX(size_t pointerIndex) const { - return getCurrentPointerCoords(pointerIndex).x; + return getRawAxisValue(AMOTION_EVENT_AXIS_X, pointerIndex); } inline float getRawY(size_t pointerIndex) const { - return getCurrentPointerCoords(pointerIndex).y; + return getRawAxisValue(AMOTION_EVENT_AXIS_Y, pointerIndex); } + float getAxisValue(int32_t axis, size_t pointerIndex) const; + inline float getX(size_t pointerIndex) const { - return getRawX(pointerIndex) + mXOffset; + return getAxisValue(AMOTION_EVENT_AXIS_X, pointerIndex); } inline float getY(size_t pointerIndex) const { - return getRawY(pointerIndex) + mYOffset; + return getAxisValue(AMOTION_EVENT_AXIS_Y, pointerIndex); } inline float getPressure(size_t pointerIndex) const { - return getCurrentPointerCoords(pointerIndex).pressure; + return getAxisValue(AMOTION_EVENT_AXIS_PRESSURE, pointerIndex); } inline float getSize(size_t pointerIndex) const { - return getCurrentPointerCoords(pointerIndex).size; + return getAxisValue(AMOTION_EVENT_AXIS_SIZE, pointerIndex); } inline float getTouchMajor(size_t pointerIndex) const { - return getCurrentPointerCoords(pointerIndex).touchMajor; + return getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MAJOR, pointerIndex); } inline float getTouchMinor(size_t pointerIndex) const { - return getCurrentPointerCoords(pointerIndex).touchMinor; + return getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MINOR, pointerIndex); } inline float getToolMajor(size_t pointerIndex) const { - return getCurrentPointerCoords(pointerIndex).toolMajor; + return getAxisValue(AMOTION_EVENT_AXIS_TOOL_MAJOR, pointerIndex); } inline float getToolMinor(size_t pointerIndex) const { - return getCurrentPointerCoords(pointerIndex).toolMinor; + return getAxisValue(AMOTION_EVENT_AXIS_TOOL_MINOR, pointerIndex); } inline float getOrientation(size_t pointerIndex) const { - return getCurrentPointerCoords(pointerIndex).orientation; + return getAxisValue(AMOTION_EVENT_AXIS_ORIENTATION, pointerIndex); } inline size_t getHistorySize() const { return mSampleEventTimes.size() - 1; } @@ -335,48 +371,67 @@ public: return mSampleEventTimes[historicalIndex]; } + const PointerCoords* getHistoricalRawPointerCoords( + size_t pointerIndex, size_t historicalIndex) const; + + float getHistoricalRawAxisValue(int32_t axis, size_t pointerIndex, + size_t historicalIndex) const; + inline float getHistoricalRawX(size_t pointerIndex, size_t historicalIndex) const { - return getHistoricalPointerCoords(pointerIndex, historicalIndex).x; + return getHistoricalRawAxisValue( + AMOTION_EVENT_AXIS_X, pointerIndex, historicalIndex); } inline float getHistoricalRawY(size_t pointerIndex, size_t historicalIndex) const { - return getHistoricalPointerCoords(pointerIndex, historicalIndex).y; + return getHistoricalRawAxisValue( + AMOTION_EVENT_AXIS_Y, pointerIndex, historicalIndex); } + float getHistoricalAxisValue(int32_t axis, size_t pointerIndex, size_t historicalIndex) const; + inline float getHistoricalX(size_t pointerIndex, size_t historicalIndex) const { - return getHistoricalRawX(pointerIndex, historicalIndex) + mXOffset; + return getHistoricalAxisValue( + AMOTION_EVENT_AXIS_X, pointerIndex, historicalIndex); } inline float getHistoricalY(size_t pointerIndex, size_t historicalIndex) const { - return getHistoricalRawY(pointerIndex, historicalIndex) + mYOffset; + return getHistoricalAxisValue( + AMOTION_EVENT_AXIS_Y, pointerIndex, historicalIndex); } inline float getHistoricalPressure(size_t pointerIndex, size_t historicalIndex) const { - return getHistoricalPointerCoords(pointerIndex, historicalIndex).pressure; + return getHistoricalAxisValue( + AMOTION_EVENT_AXIS_PRESSURE, pointerIndex, historicalIndex); } inline float getHistoricalSize(size_t pointerIndex, size_t historicalIndex) const { - return getHistoricalPointerCoords(pointerIndex, historicalIndex).size; + return getHistoricalAxisValue( + AMOTION_EVENT_AXIS_SIZE, pointerIndex, historicalIndex); } inline float getHistoricalTouchMajor(size_t pointerIndex, size_t historicalIndex) const { - return getHistoricalPointerCoords(pointerIndex, historicalIndex).touchMajor; + return getHistoricalAxisValue( + AMOTION_EVENT_AXIS_TOUCH_MAJOR, pointerIndex, historicalIndex); } inline float getHistoricalTouchMinor(size_t pointerIndex, size_t historicalIndex) const { - return getHistoricalPointerCoords(pointerIndex, historicalIndex).touchMinor; + return getHistoricalAxisValue( + AMOTION_EVENT_AXIS_TOUCH_MINOR, pointerIndex, historicalIndex); } inline float getHistoricalToolMajor(size_t pointerIndex, size_t historicalIndex) const { - return getHistoricalPointerCoords(pointerIndex, historicalIndex).toolMajor; + return getHistoricalAxisValue( + AMOTION_EVENT_AXIS_TOOL_MAJOR, pointerIndex, historicalIndex); } inline float getHistoricalToolMinor(size_t pointerIndex, size_t historicalIndex) const { - return getHistoricalPointerCoords(pointerIndex, historicalIndex).toolMinor; + return getHistoricalAxisValue( + AMOTION_EVENT_AXIS_TOOL_MINOR, pointerIndex, historicalIndex); } inline float getHistoricalOrientation(size_t pointerIndex, size_t historicalIndex) const { - return getHistoricalPointerCoords(pointerIndex, historicalIndex).orientation; + return getHistoricalAxisValue( + AMOTION_EVENT_AXIS_ORIENTATION, pointerIndex, historicalIndex); } void initialize( @@ -396,12 +451,23 @@ public: const int32_t* pointerIds, const PointerCoords* pointerCoords); + void copyFrom(const MotionEvent* other, bool keepHistory); + void addSample( nsecs_t eventTime, const PointerCoords* pointerCoords); void offsetLocation(float xOffset, float yOffset); + void scale(float scaleFactor); + +#ifdef HAVE_ANDROID_OS + void transform(const SkMatrix* matrix); + + status_t readFromParcel(Parcel* parcel); + status_t writeToParcel(Parcel* parcel) const; +#endif + // Low-level accessors. inline const int32_t* getPointerIds() const { return mPointerIds.array(); } inline const nsecs_t* getSampleEventTimes() const { return mSampleEventTimes.array(); } @@ -409,7 +475,7 @@ public: return mSamplePointerCoords.array(); } -private: +protected: int32_t mAction; int32_t mFlags; int32_t mEdgeFlags; @@ -422,15 +488,6 @@ private: Vector<int32_t> mPointerIds; Vector<nsecs_t> mSampleEventTimes; Vector<PointerCoords> mSamplePointerCoords; - - inline const PointerCoords& getCurrentPointerCoords(size_t pointerIndex) const { - return mSamplePointerCoords[getHistorySize() * getPointerCount() + pointerIndex]; - } - - inline const PointerCoords& getHistoricalPointerCoords( - size_t pointerIndex, size_t historicalIndex) const { - return mSamplePointerCoords[historicalIndex * getPointerCount() + pointerIndex]; - } }; /* @@ -486,11 +543,11 @@ public: inline const String8 getName() const { return mName; } inline uint32_t getSources() const { return mSources; } - const MotionRange* getMotionRange(int32_t rangeType) const; + const MotionRange* getMotionRange(int32_t axis) const; void addSource(uint32_t source); - void addMotionRange(int32_t rangeType, float min, float max, float flat, float fuzz); - void addMotionRange(int32_t rangeType, const MotionRange& range); + void addMotionRange(int32_t axis, float min, float max, float flat, float fuzz); + void addMotionRange(int32_t axis, const MotionRange& range); inline void setKeyboardType(int32_t keyboardType) { mKeyboardType = keyboardType; } inline int32_t getKeyboardType() const { return mKeyboardType; } diff --git a/include/ui/KeyLayoutMap.h b/include/ui/KeyLayoutMap.h index f0a6d00..904c8f3 100644 --- a/include/ui/KeyLayoutMap.h +++ b/include/ui/KeyLayoutMap.h @@ -25,7 +25,7 @@ namespace android { /** - * Describes a mapping from keyboard scan codes to Android key codes. + * Describes a mapping from keyboard scan codes and joystick axes to Android key codes and axes. */ class KeyLayoutMap { public: @@ -33,8 +33,10 @@ public: static status_t load(const String8& filename, KeyLayoutMap** outMap); - status_t map(int32_t scanCode, int32_t* keyCode, uint32_t* flags) const; - status_t findScanCodes(int32_t keyCode, Vector<int32_t>* outScanCodes) const; + status_t mapKey(int32_t scanCode, int32_t* keyCode, uint32_t* flags) const; + status_t findScanCodesForKey(int32_t keyCode, Vector<int32_t>* outScanCodes) const; + + status_t mapAxis(int32_t scanCode, int32_t* axis) const; private: struct Key { @@ -42,7 +44,8 @@ private: uint32_t flags; }; - KeyedVector<int32_t,Key> mKeys; + KeyedVector<int32_t, Key> mKeys; + KeyedVector<int32_t, int32_t> mAxes; KeyLayoutMap(); @@ -57,6 +60,7 @@ private: private: status_t parseKey(); + status_t parseAxis(); }; }; diff --git a/include/ui/Keyboard.h b/include/ui/Keyboard.h index 50296e2..54bc968 100644 --- a/include/ui/Keyboard.h +++ b/include/ui/Keyboard.h @@ -111,6 +111,18 @@ extern int32_t getKeyCodeByLabel(const char* label); extern uint32_t getKeyFlagByLabel(const char* label); /** + * Gets a axis by its short form label, eg. "X". + * Returns -1 if unknown. + */ +extern int32_t getAxisByLabel(const char* label); + +/** + * Gets a axis label by its id. + * Returns NULL if unknown. + */ +extern const char* getAxisLabel(int32_t axisId); + +/** * Updates a meta state field when a key is pressed or released. */ extern int32_t updateMetaState(int32_t keyCode, bool down, int32_t oldMetaState); diff --git a/include/ui/KeycodeLabels.h b/include/ui/KeycodeLabels.h index dbccf29..bdfbf7c 100755 --- a/include/ui/KeycodeLabels.h +++ b/include/ui/KeycodeLabels.h @@ -250,4 +250,47 @@ static const KeycodeLabel FLAGS[] = { { NULL, 0 } }; +static const KeycodeLabel AXES[] = { + { "X", 0 }, + { "Y", 1 }, + { "PRESSURE", 2 }, + { "SIZE", 3 }, + { "TOUCH_MAJOR", 4 }, + { "TOUCH_MINOR", 5 }, + { "TOOL_MAJOR", 6 }, + { "TOOL_MINOR", 7 }, + { "ORIENTATION", 8 }, + { "VSCROLL", 9 }, + { "HSCROLL", 10 }, + { "Z", 11 }, + { "RX", 12 }, + { "RY", 13 }, + { "RZ", 14 }, + { "HAT_X", 15 }, + { "HAT_Y", 16 }, + { "LTRIGGER", 17 }, + { "RTRIGGER", 18 }, + { "GENERIC_1", 32 }, + { "GENERIC_2", 33 }, + { "GENERIC_3", 34 }, + { "GENERIC_4", 35 }, + { "GENERIC_5", 36 }, + { "GENERIC_6", 37 }, + { "GENERIC_7", 38 }, + { "GENERIC_8", 39 }, + { "GENERIC_9", 40 }, + { "GENERIC_10", 41 }, + { "GENERIC_11", 42 }, + { "GENERIC_12", 43 }, + { "GENERIC_13", 44 }, + { "GENERIC_14", 45 }, + { "GENERIC_15", 46 }, + { "GENERIC_16", 47 }, + + // NOTE: If you add a new axis here you must also add it to several other files. + // Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list. + + { NULL, -1 } +}; + #endif // _UI_KEYCODE_LABELS_H diff --git a/include/utils/RefBase.h b/include/utils/RefBase.h index 9c64ac0..c24c0db 100644 --- a/include/utils/RefBase.h +++ b/include/utils/RefBase.h @@ -31,13 +31,10 @@ template<typename T> class wp; // --------------------------------------------------------------------------- -#define COMPARE(_op_) \ +#define COMPARE_WEAK(_op_) \ inline bool operator _op_ (const sp<T>& o) const { \ return m_ptr _op_ o.m_ptr; \ } \ -inline bool operator _op_ (const wp<T>& o) const { \ - return m_ptr _op_ o.m_ptr; \ -} \ inline bool operator _op_ (const T* o) const { \ return m_ptr _op_ o; \ } \ @@ -46,12 +43,18 @@ inline bool operator _op_ (const sp<U>& o) const { \ return m_ptr _op_ o.m_ptr; \ } \ template<typename U> \ -inline bool operator _op_ (const wp<U>& o) const { \ +inline bool operator _op_ (const U* o) const { \ + return m_ptr _op_ o; \ +} + +#define COMPARE(_op_) \ +COMPARE_WEAK(_op_) \ +inline bool operator _op_ (const wp<T>& o) const { \ return m_ptr _op_ o.m_ptr; \ } \ template<typename U> \ -inline bool operator _op_ (const U* o) const { \ - return m_ptr _op_ o; \ +inline bool operator _op_ (const wp<U>& o) const { \ + return m_ptr _op_ o.m_ptr; \ } // --------------------------------------------------------------------------- @@ -274,13 +277,43 @@ public: inline T* unsafe_get() const { return m_ptr; } // Operators - - COMPARE(==) - COMPARE(!=) - COMPARE(>) - COMPARE(<) - COMPARE(<=) - COMPARE(>=) + + COMPARE_WEAK(==) + COMPARE_WEAK(!=) + COMPARE_WEAK(>) + COMPARE_WEAK(<) + COMPARE_WEAK(<=) + COMPARE_WEAK(>=) + + inline bool operator == (const wp<T>& o) const { + return (m_ptr == o.m_ptr) && (m_refs == o.m_refs); + } + template<typename U> + inline bool operator == (const wp<U>& o) const { + return m_ptr == o.m_ptr; + } + + inline bool operator > (const wp<T>& o) const { + return (m_ptr == o.m_ptr) ? (m_refs > o.m_refs) : (m_ptr > o.m_ptr); + } + template<typename U> + inline bool operator > (const wp<U>& o) const { + return (m_ptr == o.m_ptr) ? (m_refs > o.m_refs) : (m_ptr > o.m_ptr); + } + + inline bool operator < (const wp<T>& o) const { + return (m_ptr == o.m_ptr) ? (m_refs < o.m_refs) : (m_ptr < o.m_ptr); + } + template<typename U> + inline bool operator < (const wp<U>& o) const { + return (m_ptr == o.m_ptr) ? (m_refs < o.m_refs) : (m_ptr < o.m_ptr); + } + inline bool operator != (const wp<T>& o) const { return m_refs != o.m_refs; } + template<typename U> inline bool operator != (const wp<U>& o) const { return !operator == (o); } + inline bool operator <= (const wp<T>& o) const { return !operator > (o); } + template<typename U> inline bool operator <= (const wp<U>& o) const { return !operator > (o); } + inline bool operator >= (const wp<T>& o) const { return !operator < (o); } + template<typename U> inline bool operator >= (const wp<U>& o) const { return !operator < (o); } private: template<typename Y> friend class sp; @@ -294,6 +327,7 @@ template <typename T> TextOutput& operator<<(TextOutput& to, const wp<T>& val); #undef COMPARE +#undef COMPARE_WEAK // --------------------------------------------------------------------------- // No user serviceable parts below here. |