Initial Commit
This commit is contained in:
34
common/GDATA.TPP
Normal file
34
common/GDATA.TPP
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef _COMMON_GLOBALDATA_TPP_
|
||||
#define _COMMON_GLOBALDATA_TPP_
|
||||
|
||||
template <class T>
|
||||
WORD GlobalData<T>::operator==(const GlobalData<T> &someGlobalData)const
|
||||
{
|
||||
DWORD itemCount(size());
|
||||
|
||||
if(itemCount!=someGlobalData.size())return FALSE;
|
||||
for(DWORD itemIndex=0;itemIndex<itemCount;itemIndex++)
|
||||
if(!(((GlobalData<T>&)*this).operator[](itemIndex)==((GlobalData<T>&)someGlobalData)[itemIndex]))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
GlobalData<T> &GlobalData<T>::operator=(const GlobalData<T> &someGlobalData)
|
||||
{
|
||||
DWORD itemCount(someGlobalData.size());
|
||||
|
||||
size(someGlobalData.size());
|
||||
if(!size())return *this;
|
||||
for(DWORD itemIndex=0;itemIndex<itemCount;itemIndex++)
|
||||
operator[](itemIndex)=((GlobalData<T>&)someGlobalData)[itemIndex];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool GlobalData<T>::setZero(void)
|
||||
{
|
||||
if(!isOkay())return false;
|
||||
::memset(mlpGlobalData,0,size()*sizeof(T));
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user