Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
1001 B

#ifndef __MULTISTR_H
#define __MULTISTR_H
#include "simarray.h"
#include "simstr.h"
// Must be instantiated with an instance of CSimpleStringBase
template <class T, class M>
class CMultiStringBase : public CSimpleDynamicArray<M>
{
public:
CMultiStringBase( const CMultiStringBase &other )
{
Append(other);
}
CMultiStringBase( const T *pstrMultiString = NULL )
{
for (T *pstrCurrent = const_cast<T*>(pstrMultiString); pstrCurrent && *pstrCurrent; pstrCurrent += M(pstrCurrent).Length() + 1)
Append(pstrCurrent);
}
virtual ~CMultiStringBase(void)
{
}
CMultiStringBase &operator=( const CMultiStringBase &other )
{
Destroy();
Append(other);
return (*this);
}
};
typedef CMultiStringBase<TCHAR,CSimpleString> CMultiString;
typedef CMultiStringBase<WCHAR,CSimpleStringWide> CMultiStringWide;
typedef CMultiStringBase<CHAR,CSimpleStringAnsi> CMultiStringAnsi;
#endif