Initial Commit
This commit is contained in:
106
common/OVERLAP.HPP
Normal file
106
common/OVERLAP.HPP
Normal file
@@ -0,0 +1,106 @@
|
||||
#ifndef _COMMON_OVERLAPPED_HPP_
|
||||
#define _COMMON_OVERLAPPED_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
|
||||
class Overlapped : private _OVERLAPPED
|
||||
{
|
||||
public:
|
||||
Overlapped(void);
|
||||
virtual ~Overlapped();
|
||||
DWORD offsetLow(void)const;
|
||||
void offsetLow(DWORD offsetLow);
|
||||
DWORD offsetHigh(void)const;
|
||||
void offsetHigh(DWORD offsetHigh);
|
||||
HANDLE event(void)const;
|
||||
void event(HANDLE event);
|
||||
_OVERLAPPED &getOverlapped(void);
|
||||
private:
|
||||
Overlapped(const Overlapped &someOverlapped);
|
||||
Overlapped &operator=(const Overlapped &someOverlapped);
|
||||
BOOL operator==(const Overlapped &someOverlapped)const;
|
||||
void zeroInit(void);
|
||||
};
|
||||
|
||||
inline
|
||||
Overlapped::Overlapped(void)
|
||||
{
|
||||
zeroInit();
|
||||
}
|
||||
|
||||
inline
|
||||
Overlapped::Overlapped(const Overlapped &someOverlapped)
|
||||
{ // private implementation
|
||||
*this=someOverlapped;
|
||||
}
|
||||
|
||||
inline
|
||||
Overlapped::~Overlapped()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
Overlapped &Overlapped::operator=(const Overlapped &/*someOverlapped*/)
|
||||
{ // private implementation
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
BOOL Overlapped::operator==(const Overlapped &/*someOverlapped*/)const
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD Overlapped::offsetLow(void)const
|
||||
{
|
||||
return _OVERLAPPED::Offset;
|
||||
}
|
||||
|
||||
inline
|
||||
void Overlapped::offsetLow(DWORD offsetLow)
|
||||
{
|
||||
_OVERLAPPED::Offset=offsetLow;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD Overlapped::offsetHigh(void)const
|
||||
{
|
||||
return _OVERLAPPED::OffsetHigh;
|
||||
}
|
||||
|
||||
inline
|
||||
void Overlapped::offsetHigh(DWORD offsetHigh)
|
||||
{
|
||||
_OVERLAPPED::OffsetHigh=offsetHigh;
|
||||
}
|
||||
|
||||
inline
|
||||
HANDLE Overlapped::event(void)const
|
||||
{
|
||||
return _OVERLAPPED::hEvent;
|
||||
}
|
||||
|
||||
inline
|
||||
void Overlapped::event(HANDLE hEvent)
|
||||
{
|
||||
_OVERLAPPED::hEvent=hEvent;
|
||||
}
|
||||
|
||||
inline
|
||||
_OVERLAPPED &Overlapped::getOverlapped(void)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
void Overlapped::zeroInit(void)
|
||||
{
|
||||
_OVERLAPPED::Internal=0;
|
||||
_OVERLAPPED::InternalHigh=0;
|
||||
_OVERLAPPED::Offset=0;
|
||||
_OVERLAPPED::OffsetHigh=0;
|
||||
_OVERLAPPED::hEvent=0;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user