Initial Commit
This commit is contained in:
79
common/CFLAGS.HPP
Normal file
79
common/CFLAGS.HPP
Normal file
@@ -0,0 +1,79 @@
|
||||
#if defined(__FLAT__)
|
||||
#ifndef _COMMON_CREATIONFLAGS_HPP_
|
||||
#define _COMMON_CREATIONFLAGS_HPP_
|
||||
class CreationFlags
|
||||
{
|
||||
public:
|
||||
enum Flags{DefaultErrorMode=CREATE_DEFAULT_ERROR_MODE,
|
||||
NewConsole=CREATE_NEW_CONSOLE,
|
||||
NewProcessGroup=CREATE_NEW_PROCESS_GROUP,
|
||||
SeperateWOWVDM=CREATE_SEPARATE_WOW_VDM,
|
||||
Suspended=CREATE_SUSPENDED,
|
||||
UnicodeEnvironment=CREATE_UNICODE_ENVIRONMENT,
|
||||
DebugProcess=DEBUG_PROCESS,
|
||||
DebugOnlyThisProcess=DEBUG_ONLY_THIS_PROCESS,
|
||||
DetachedProcess=DETACHED_PROCESS,
|
||||
NormalPriorityClass=NORMAL_PRIORITY_CLASS,
|
||||
IdlePriorityClass=IDLE_PRIORITY_CLASS,
|
||||
HighPriorityClass=HIGH_PRIORITY_CLASS,
|
||||
RealtimePriorityClass=REALTIME_PRIORITY_CLASS};
|
||||
CreationFlags(Flags creationFlags=NormalPriorityClass);
|
||||
CreationFlags(const CreationFlags &someCreationFlags);
|
||||
virtual ~CreationFlags();
|
||||
CreationFlags &operator=(const CreationFlags &someCreationFlags);
|
||||
WORD operator==(const CreationFlags &someCreationFlags);
|
||||
CreationFlags &operator+=(Flags creationFlags);
|
||||
operator DWORD(void)const;
|
||||
private:
|
||||
DWORD mCreationFlags;
|
||||
};
|
||||
|
||||
inline
|
||||
CreationFlags::CreationFlags(Flags creationFlags)
|
||||
: mCreationFlags(creationFlags)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
CreationFlags::CreationFlags(const CreationFlags &someCreationFlags)
|
||||
{
|
||||
*this=someCreationFlags;
|
||||
}
|
||||
|
||||
inline
|
||||
CreationFlags::~CreationFlags()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
CreationFlags &CreationFlags::operator=(const CreationFlags &someCreationFlags)
|
||||
{
|
||||
mCreationFlags=someCreationFlags.mCreationFlags;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD CreationFlags::operator==(const CreationFlags &someCreationFlags)
|
||||
{
|
||||
return mCreationFlags==someCreationFlags.mCreationFlags;
|
||||
}
|
||||
|
||||
inline
|
||||
CreationFlags &CreationFlags::operator+=(Flags creationFlags)
|
||||
{
|
||||
mCreationFlags|=(DWORD)creationFlags;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
CreationFlags::operator DWORD(void)const
|
||||
{
|
||||
return mCreationFlags;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user