9 #define SOME_GENERIC_WINDOWS
13 #ifdef SOME_GENERIC_WINDOWS
14 #define MDLLEXPORT __declspec (dllexport)
22 #ifdef SOME_GENERIC_WINDOWS
23 #ifdef MCL_UNICODE_ENABLE
24 #define MCL_USE_UNICODE_IF_DESIRED
26 #else //SOME_GENERIC_WINDOWS
27 #endif //SOME_GENERIC_WINDOWS
31 #ifdef MCL_USE_UNICODE_IF_DESIRED
39 #define __mccl_strcpy _tcscpy
40 #define __mccl_strcat _tcscat
41 #define __mccl_strlen _tcslen
42 #define __mccl_strcmp _tcscmp
43 #define __mccl_strncmp strncmp
44 #define __mccl_printf _tprintf
45 #define __mccl_sprintf _stprintf
47 #define __mccl_fopen _tfopen
48 #define __mccl_fclose fclose
49 #define __mccl_atoi _ttoi
50 #define __mccl_fscanf _ftscanf
51 #define __mccl_fgets _fgetts
52 #define __mccl_fprintf _ftprintf
54 #define __mccl_tolwr _tcslwr
55 #define __mccl_toupr _tcsupr
57 #define __mccl_atof wcstod
62 #else //MCL_USE_UNICODE_IF_DESIRED
71 #define __mccl_strcpy strcpy
72 #define __mccl_strcat strcat
73 #define __mccl_strlen strlen
74 #define __mccl_strcmp strcmp
75 #define __mccl_strncmp strncmp
76 #define __mccl_printf printf
77 #define __mccl_sprintf sprintf
79 #define __mccl_fopen fopen
80 #define __mccl_fclose fclose
81 #define __mccl_atoi atoi
83 #define __mccl_fscanf fscanf
84 #define __mccl_fgets fgets
85 #define __mccl_fprintf fprintf
89 #define __mccl_tolwr _strlwr
90 #define __mccl_toupr _strupr
92 #define __mccl_tolwr strlwr
93 #define __mccl_toupr strupr
100 #define __mccl_atof atof
101 #endif //MCL_USE_UNICODE_IF_DESIRED
185 virtual bool Close() = 0;
186 virtual bool IsOpen() = 0;
187 virtual bool IsEnd() = 0;
226 bool Read(
void * p,
long lenInElements,
long elSize = 1) {
return ReadBlob(p, lenInElements, elSize); }
232 virtual bool ReadBlob(
void * pData,
long lenInElements,
long elSize) = 0;
271 bool Write(
const void * p,
long lenInElements,
long elSize = 1) {
return WriteBlob(p, lenInElements, elSize); }
277 virtual bool WriteBlob(
const void * pData,
long lenInElements,
long elSize) = 0;
366 #ifndef MLIST_BOUNDSCHECK
390 template <
class Item,
long size>
398 inline const Item &
operator[](
const long index)
const;
399 inline const Item &
operator()(
const long index)
const;
404 inline long length()
const;
406 inline Item *
data();
420 template <
class Item,
long size>
426 template <
class Item,
long size>
432 template <
class Item,
long size>
437 template <
class Item,
long size>
440 for (
long i=0; i<size; i++)
446 template <
class Item,
long size>
449 for (
long i=0; i<size; i++)
450 m_array[i] = vector(i);
457 template <
class Item,
long size>
460 #ifdef MLIST_BOUNDSCHECK
469 template <
class Item,
long size>
472 #ifdef MLIST_BOUNDSCHECK
475 return m_array[index];
478 template <
class Item,
long size>
481 #ifdef MLIST_BOUNDSCHECK
484 return m_array[index];
487 template <
class Item,
long size>
490 #ifdef MLIST_BOUNDSCHECK
493 return m_array[index];
496 template <
class Item,
long size>
499 #ifdef MLIST_BOUNDSCHECK
502 return m_array[index];
506 template <
class Item,
long size>
512 template <
class Item,
long size>
523 template <
class Item,
long size>
529 for (
int i=0; i<size; i++)
537 for (
int i=0; i<size; i++)
548 template <
class Item,
long size>
571 template <
class Item>
579 inline const Item &
operator[](
const long index)
const;
580 inline const Item &
operator()(
const long index)
const;
585 inline long length()
const;
589 inline const Item *
data()
const;
602 template <
class Item>
610 template <
class Item>
618 template <
class Item>
621 if (m_pArray != NULL)
626 template <
class Item>
630 for (
long i=0; i<m_length; i++)
631 m_pArray[i] = vector(i);
638 template <
class Item>
641 #ifdef MLIST_BOUNDSCHECK
642 if (index < m_length)
650 template <
class Item>
653 #ifdef MLIST_BOUNDSCHECK
656 return m_pArray[index];
659 template <
class Item>
662 #ifdef MLIST_BOUNDSCHECK
665 return m_pArray[index];
668 template <
class Item>
671 #ifdef MLIST_BOUNDSCHECK
674 return m_pArray[index];
677 template <
class Item>
680 #ifdef MLIST_BOUNDSCHECK
683 return m_pArray[index];
687 template <
class Item>
693 template <
class Item>
699 template <
class Item>
705 pNewArray =
new Item[length];
709 long realLength = m_length;
710 if (m_length > length)
715 for (
long i=0; i<realLength; i++)
716 pNewArray[i] = m_pArray[i];
718 Item * pTempArray = m_pArray;
719 m_pArray = pNewArray;
721 if (pTempArray != NULL)
722 delete [] pTempArray;
732 template <
class Item>
744 for (
int i=0; i<
length; i++)
745 (this->
operator())(i).
Read(stream);
755 for (
int i = 0; i < this->
length(); i++)
756 (this->
operator())(i).Write(stream);
766 template <
class Item>
797 template <
class Item,
unsigned long ChunkSize = 64>
804 inline const Item *
operator[](
const long index)
const;
805 inline const Item *
operator()(
const long index)
const;
810 inline long length()
const;
813 inline void add(Item *);
815 inline void add(
const Item &);
818 inline void insert(Item *,
long);
820 inline void insert(
const Item &,
long);
824 inline void remove(
const Item *);
825 inline void remove(
long index);
851 template <
class Item,
unsigned long ChunkSize>
857 template <
class Item,
unsigned long ChunkSize>
865 template <
class Item,
unsigned long ChunkSize>
868 return m_list(index);
871 template <
class Item,
unsigned long ChunkSize>
874 return m_list(index);
878 template <
class Item,
unsigned long ChunkSize>
880 return m_list(index);
883 template <
class Item,
unsigned long ChunkSize>
886 return m_list(index);
889 template <
class Item,
unsigned long ChunkSize>
893 for (
long i=0; i<toCopy.
length(); i++) {
894 Item * pNew =
new Item;
895 *pNew = *(toCopy(i));
902 template <
class Item,
unsigned long ChunkSize>
909 template <
class Item,
unsigned long ChunkSize>
912 if (m_realLength == m_list.length())
913 m_list.reshape(m_realLength + ChunkSize);
915 m_list(m_realLength) = pItem;
920 template <
class Item,
unsigned long ChunkSize>
923 Item * pItem =
new Item(item);
928 template <
class Item,
unsigned long ChunkSize>
931 Item * pItem =
new Item;
933 return m_realLength - 1;
937 template <
class Item,
unsigned long ChunkSize>
940 if (m_realLength == 0) {
945 add(m_list(m_realLength - 1));
947 for (
long i=m_realLength - 1; i>pos; i--) {
948 m_list(i) = m_list(i-1);
954 template <
class Item,
unsigned long ChunkSize>
957 Item * pItem =
new Item(item);
961 template <
class Item,
unsigned long ChunkSize>
964 for (
long i=0; i<m_realLength; i++) {
965 if (m_list(i) == pItem) {
972 template <
class Item,
unsigned long ChunkSize>
975 delete m_list(index);
976 for (
long i=index + 1; i<m_realLength; i++) {
977 m_list(i - 1) = m_list(i);
982 template <
class Item,
unsigned long ChunkSize>
985 for (
long i=0; i<m_realLength; i++) {
986 if (m_list(i) == pItem) {
993 template <
class Item,
unsigned long ChunkSize>
996 for (
long i=index + 1; i<m_realLength; i++) {
997 m_list(i - 1) = m_list(i);
1002 template <
class Item,
unsigned long ChunkSize>
1008 template <
class Item,
unsigned long ChunkSize>
1015 template <
class Item,
unsigned long ChunkSize>
1018 m_list(i) = m_list(m_realLength - 1);
1023 template <
class Item,
unsigned long ChunkSize>
1026 for (
long i=0; i<m_realLength; i++) {
1027 if (m_list(i) != NULL) {
1039 template <
class Item,
unsigned long ChunkSize = 64>
1047 template <
class Item,
unsigned long ChunkSize>
1050 this->removeNoDeleteAll();
1052 for (
long i=0; i<toCopy.
length(); i++) {
1053 add((Item*)toCopy(i));
1063 template <
class Item>
1075 for (
int i=0; i<len; i++) {
1076 Item * pItem =
new Item;
1078 pItem->Read(stream);
1089 for (
int i = 0; i < this->
length(); i++)
1090 (this->
operator())(i)->Write(stream);
1141 bool IsDelimiter(
const char * pBuffer,
long & inc,
long & mapIndex);
1171 virtual bool ReadBlob(
void * pData,
long lenInElements,
long elSize);
1213 virtual bool WriteBlob(
const void * pData,
long lenInElements,
long elSize);
1252 virtual bool ReadBlob(
void * pData,
long lenInElements,
long elSize);
1291 virtual bool WriteBlob(
const void * pData,
long lenInElements,
long elSize);
1305 #ifdef MCL_NO_EXCEPTIONS
1307 #else //MCL_NO_EXCEPTIONS
1309 #endif//MCL_NO_EXCEPTIONS
1337 template <
class Item>
1344 inline void SetTo(
const Item * pSearchList,
long length);
1345 inline bool Search(
long & index,
const Item & toFind);
1360 template <
class Item,
class Index>
1367 inline void Add(
const Item & , Index);
1370 inline bool Search(Index & index,
const Item & toFind);
1377 inline bool Peek(
const long & index, Item & toFind);
1408 template <
class Item>
1411 m_pSearchPtr = (Item *)pSearchList;
1413 m_length = (long)length;
1415 while (m_virtLength < m_length)
1416 m_virtLength = m_virtLength << 1;
1420 template <
class Item>
1425 long interval = (long)m_virtLength / 2;
1428 if (m_pSearchPtr[0] > toFind) {
1433 if (m_pSearchPtr[m_length - 1] < toFind) {
1438 if (m_pSearchPtr[0] == toFind) {
1443 while (interval > 0) {
1445 if (i < m_length && m_pSearchPtr[i] == toFind) {
1450 if (i >= m_length || m_pSearchPtr[i] > toFind) {
1451 interval = interval >> 1;
1459 if (i >= m_length) {
1472 template <
class Item,
class Index>
1475 stream.
Write(m_length);
1476 stream.
Write(m_virtLength);
1477 m_index.Write(stream);
1482 template <
class Item,
class Index>
1485 stream.
Read(m_length);
1486 stream.
Read(m_virtLength);
1487 m_index.Read(stream);
1491 template <
class Item,
class Index>
1494 m_pSearchPtr = pSearchList;
1499 template <
class Item,
class Index>
1502 if (m_length == m_virtLength) {
1504 while (m_virtLength < m_length + 1)
1505 m_virtLength = m_virtLength << 1;
1511 if (InternalSearch(index, item)) {
1517 if (m_length + 1 >= m_index.length())
1518 m_index.reshape(m_index.length() + 256);
1520 for (
long i=m_length; i>(long)index; i--) {
1521 m_index(i) = m_index(i - 1);
1523 m_index(index) = wordIndex;
1529 template <
class Item,
class Index>
1536 long interval = (long)m_virtLength / 2;
1538 if ((*m_pSearchPtr)[m_index(0)] > toFind) {
1543 if ((*m_pSearchPtr)[m_index(m_length - 1)] < toFind) {
1548 if (m_length > 0 && (*m_pSearchPtr)[m_index(0)] == toFind) {
1553 while (interval > 0) {
1555 if (i < m_length && (*m_pSearchPtr)[m_index(i)] == toFind)
1559 if (i >= m_length || (*m_pSearchPtr)[m_index(i)] > toFind) {
1560 interval = interval >> 1;
1576 template <
class Item,
class Index>
1581 toFind=(*m_pSearchPtr)[m_index(index)];
1585 template <
class Item,
class Index>
1590 bool res=InternalSearch(i,toFind);
1620 #define INVALID_STRING_DICT_ID -1
Item * m_pArray
Definition: mutil.h:596
bool Read(CMString &d)
Definition: mutil.h:223
bool Read(IMReadStream &stream)
Definition: mutil.h:1067
virtual bool WriteBlob(const void *pData, long lenInElements, long elSize)
Definition: mutil.cc:526
#define _TMCL
Definition: mutil.h:66
long m_length
Definition: mutil.h:1350
virtual long BytesProcessed()
Definition: mutil.h:1287
MDLLEXPORT long GetDictID(const CMString &word)
Definition: mutil.cc:1709
MDLLEXPORT ~CMTokenizer()
Definition: mutil.cc:1563
MDLLEXPORT void ThrowException()
Definition: mutil.cc:171
virtual bool WriteStringLine(const CMString &string)
Definition: mutil.cc:542
~TMPtrList()
Definition: mutil.h:858
MDLLEXPORT void removeSpaces()
Definition: mutil.cc:1486
MDLLEXPORT long IndexToIndex(long index)
Definition: mutil.h:1643
TMValueVector< CMString > CMStringList
Definition: mutil.h:1099
virtual IMReadStream * CloneAndOpen(const CMString &name)
Definition: mutil.cc:229
MDLLEXPORT bool RemoveUTF8Sig(CMString &string)
Definition: mutil.cc:1666
const TMValueVector< Item > & operator=(const TMValueVector &)
Definition: mutil.h:627
virtual MDLLEXPORT bool Close()
Definition: mutil.cc:983
CMStringMap(const CMString &string1)
Definition: mutil.h:1109
virtual bool WriteStringLine(const CMString &string)=0
void Add(const Item &, Index)
Definition: mutil.h:1500
bool Search(Index &index, const Item &toFind)
Definition: mutil.h:1586
Item * data()
Definition: mutil.h:507
MDLLEXPORT bool operator==(const CMString &s1) const
Definition: mutil.cc:1361
long m_realLength
Definition: mutil.h:843
bool Write(IMWriteStream &stream)
Definition: mutil.h:750
void SetMap(const CMString &s)
Definition: mutil.h:1117
~TMBinaryIndexSearcher()
Definition: mutil.h:1365
MDLLEXPORT long len() const
Definition: mutil.h:124
MDLLEXPORT long GetDictIDList(CMInt32List &result, const CMString &word)
Definition: mutil.cc:1729
bool Write(IMWriteStream &stream)
Definition: mutil.h:559
TMSTValueVector< double > CMDoubleList
Definition: mutil.h:382
FILE * m_pFile
Definition: mutil.h:1178
CMString m_fileName
Definition: mutil.h:1220
MDLLEXPORT bool operator>(const CMString &s1) const
Definition: mutil.cc:1396
bool m_bIsEof
Definition: mutil.h:1262
virtual bool ReadStringLine(CMString &string)=0
MDLLEXPORT MCL_TCHAR & operator()(long)
Definition: mutil.cc:1239
MDLLEXPORT bool GetNextToken(CMString &result, CMString &source, char delimiter= ' ')
Definition: mutil.cc:1528
virtual IMReadStream * CloneAndOpen(const CMString &name)=0
char MCL_TCHAR
Definition: mutil.h:65
void BoundsCheck(const long index) const
Definition: mutil.h:458
virtual bool ReadBlob(void *pData, long lenInElements, long elSize)
Definition: mutil.cc:330
void SetString(const CMString &s)
Definition: mutil.h:1116
int mVerboseLevel
Definition: mutil.h:349
bool Read(void *p, long lenInElements, long elSize=1)
Definition: mutil.h:226
bool Write(const unsigned long &d)
Definition: mutil.h:249
virtual bool ReadString(CMString &string)=0
long m_wordCount
Definition: mutil.h:1648
const TMValueVector< Item > * m_pSearchPtr
Definition: mutil.h:1395
MDLLEXPORT const CMString & GetWord(long id)
Definition: mutil.cc:1770
CMString m_string2
Definition: mutil.h:1121
TMSTValueVector< short > CMInt16List
Definition: mutil.h:379
MDLLEXPORT ~CMLog()
Definition: mutil.cc:598
bool m_bIsEof
Definition: mutil.h:1300
void SetTo(const Item *pSearchList, long length)
Definition: mutil.h:1409
TMSTValueVector< long > CMInt32List
Definition: mutil.h:380
virtual MDLLEXPORT bool Open(const CMString &name)
Definition: mutil.cc:826
bool Read(unsigned int &d)
Definition: mutil.h:208
bool Write(const unsigned int &d)
Definition: mutil.h:252
bool m_bIsOpen
Definition: mutil.h:1221
MDLLEXPORT bool Read(IMReadStream &stream)
Definition: mutil.cc:1817
virtual MDLLEXPORT bool IsOpen()
Definition: mutil.cc:502
MDLLEXPORT long AddWord(const CMString &word)
Definition: mutil.cc:1806
TMValueVector< Index > & GetIndexTable()
Definition: mutil.h:1372
virtual MDLLEXPORT bool IsOpen()
Definition: mutil.cc:854
bool Read(long long &d)
Definition: mutil.h:220
MDLLEXPORT CMStringDictionary()
Definition: mutil.cc:1700
virtual MDLLEXPORT bool IsOpen()
Definition: mutil.cc:293
MDLLEXPORT CMAsciiReadFileStream()
Definition: mutil.cc:217
CMPtrStringMapList m_map
Definition: mutil.h:1143
MDLLEXPORT long GetDictIDByIndex(long index)
Definition: mutil.cc:1780
const Item & operator[](const long index) const
Definition: mutil.h:470
MDLLEXPORT bool operator<=(const CMString &s1) const
Definition: mutil.cc:1438
MDLLEXPORT void MCLSetCasing(bool b=true)
Definition: mutil.cc:1085
virtual bool ReadStringLine(CMString &string)
Definition: mutil.cc:903
MDLLEXPORT long AddWordDontCheck(const CMString &word)
Definition: mutil.cc:1790
virtual MDLLEXPORT ~CMReadFileStream()
Definition: mutil.cc:821
virtual bool WriteBlob(const void *pData, long lenInElements, long elSize)=0
virtual bool WriteString(const CMString &string)
Definition: mutil.cc:1033
MDLLEXPORT const CMString & GetWordByIndex(long index)
Definition: mutil.cc:1785
int mVerboseLevel
Definition: mutil.h:315
virtual bool WriteString(const CMString &string)
Definition: mutil.cc:552
bool Read(unsigned short &d)
Definition: mutil.h:211
bool Write(const short &d)
Definition: mutil.h:254
void __mccl_toupr(MCL_TCHAR *szText)
Definition: mutil.cc:1074
TMSTValueVector< unsigned char > CMUInt8List
Definition: mutil.h:372
MDLLEXPORT CMReadFileStream()
Definition: mutil.cc:813
bool Read(signed char &d)
Definition: mutil.h:215
CMStringList m_dict
Definition: mutil.h:1647
MDLLEXPORT bool IsEmpty() const
Definition: mutil.cc:1134
bool Write(const double &d)
Definition: mutil.h:262
MDLLEXPORT void AddDelimiter(const CMString &delimiter, const CMString &replacement="")
Definition: mutil.cc:1568
MDLLEXPORT CMLog()
Definition: mutil.cc:593
void BoundsCheck(const long index) const
Definition: mutil.h:639
bool Read(long &d)
Definition: mutil.h:204
bool Write(const long long &d)
Definition: mutil.h:264
MDLLEXPORT bool operator<(const CMString &s1) const
Definition: mutil.cc:1409
bool Write(const int &d)
Definition: mutil.h:251
const Item & operator()(const long index) const
Definition: mutil.h:660
long & GetLength()
Definition: mutil.h:1373
CMString m_fileName
Definition: mutil.h:1260
const CMString & GetString()
Definition: mutil.h:1113
CMString m_fileName
Definition: mutil.h:1298
MDLLEXPORT bool AddUTF8Sig(CMString &string)
Definition: mutil.cc:1683
virtual MDLLEXPORT bool Close()
Definition: mutil.cc:843
virtual bool WriteSimpleType(const void *pData, long lenInBytes)
Definition: mutil.cc:1005
TMSTValueVector< Index > m_index
Definition: mutil.h:1396
bool Write(const signed char &d)
Definition: mutil.h:259
virtual bool ReadBlob(void *pData, long lenInElements, long elSize)=0
bool Read(IMReadStream &stream)
Definition: mutil.h:770
long m_bytesProcessed
Definition: mutil.h:1223
long length() const
Definition: mutil.h:694
TMValueVector()
Definition: mutil.h:603
virtual bool Open(const CMString &)=0
void removeNoDeleteAll()
Definition: mutil.h:1003
long length() const
Definition: mutil.h:513
bool Read(IMReadStream &stream)
Definition: mutil.h:736
bool IsDelimiter(const char *pBuffer, long &inc, long &mapIndex)
Definition: mutil.cc:1574
bool Write(const unsigned long long &d)
Definition: mutil.h:265
long m_length
Definition: mutil.h:1398
TMPtrList< CMString > CMPtrStringList
Definition: mutil.h:1098
void DeleteMemory(MCL_TCHAR *) const
Definition: mutil.cc:1124
Item * m_pSearchPtr
Definition: mutil.h:1348
bool Read(unsigned char &d)
Definition: mutil.h:214
virtual bool ReadSimpleType(void *pData, long lenInBytes)
Definition: mutil.cc:864
CMString m_text
Definition: mutil.h:1326
MDLLEXPORT CMString & operator+=(const MCL_TCHAR *)
Definition: mutil.cc:1184
virtual MDLLEXPORT bool Open(const CMString &)
Definition: mutil.cc:474
MDLLEXPORT void removeTrailingChars(char c= ' ')
Definition: mutil.cc:1475
long m_bytesProcessed
Definition: mutil.h:1182
void nullify(long i)
Definition: mutil.h:1009
bool Write(const CMString &d)
Definition: mutil.h:268
MDLLEXPORT CMTokenizer()
Definition: mutil.cc:1559
virtual MDLLEXPORT bool IsEnd()
Definition: mutil.cc:298
bool m_bIsEof
Definition: mutil.h:1181
TMSTValueVector< char > CMCharList
Definition: mutil.h:376
bool m_bIsOpen
Definition: mutil.h:1261
bool WriteLine(const CMString &d)
Definition: mutil.h:269
TMSTValueVector< unsigned short > CMUInt16List
Definition: mutil.h:377
virtual bool ReadBlob(void *pData, long lenInElements, long elSize)
Definition: mutil.cc:885
MDLLEXPORT void toUpper()
Definition: mutil.cc:1347
MDLLEXPORT bool operator>=(const CMString &s1) const
Definition: mutil.cc:1424
long m_virtLength
Definition: mutil.h:1399
const Item * operator[](const long index) const
Definition: mutil.h:866
virtual MDLLEXPORT bool IsEnd()
Definition: mutil.cc:859
void __mccl_tolwr(MCL_TCHAR *szText)
Definition: mutil.cc:1065
MDLLEXPORT CMWriteFileStream()
Definition: mutil.cc:953
MDLLEXPORT long GetWordCount()
Definition: mutil.cc:1775
TMSTValueVector< int > CMIntList
Definition: mutil.h:381
virtual bool WriteSimpleType(const void *pData, long lenInBytes)=0
TMPtrList< CMStringMap > CMPtrStringMapList
Definition: mutil.h:1125
long length() const
Definition: mutil.h:903
MDLLEXPORT void removeLeadingChars(char c= ' ')
Definition: mutil.cc:1458
bool Read(short &d)
Definition: mutil.h:210
long m_bytesProcessed
Definition: mutil.h:1301
virtual bool ReadSimpleType(void *pData, long lenInBytes)
Definition: mutil.cc:303
virtual long BytesProcessed()
Definition: mutil.h:1248
const CMString & GetMap()
Definition: mutil.h:1114
void replaceWithLast(long i)
Definition: mutil.h:1016
bool Write(IMWriteStream &)
Definition: mutil.h:1473
bool Write(const unsigned char &d)
Definition: mutil.h:258
virtual MDLLEXPORT ~CMException()
Definition: mutil.cc:203
FILE * m_pFile
Definition: mutil.h:1297
long m_length
Definition: mutil.h:595
virtual MDLLEXPORT bool IsEnd()
Definition: mutil.cc:1000
long m_virtLength
Definition: mutil.h:1351
void reshape(long)
Definition: mutil.h:700
virtual IMWriteStream * CloneAndOpen(const CMString &name)
Definition: mutil.h:1204
virtual IMWriteStream * CloneAndOpen(const CMString &name)
Definition: mutil.h:1283
MCL_TCHAR * m_pData
Definition: mutil.h:171
virtual void OnLog(const MCL_TCHAR *szText, bool bLineFeed)=0
MDLLEXPORT long length() const
Definition: mutil.cc:1451
const TMFixedValueVector< Item, size > & operator=(const TMFixedValueVector< Item, size > &)
Definition: mutil.h:447
virtual bool ReadString(CMString &string)
Definition: mutil.cc:416
MDLLEXPORT void SetLogSink(IMLogSink *p)
Definition: mutil.cc:733
bool Read(double &d)
Definition: mutil.h:218
virtual bool WriteString(const CMString &string)=0
bool m_bIsEof
Definition: mutil.h:1222
virtual MDLLEXPORT bool Open(const CMString &name)
Definition: mutil.cc:967
virtual MDLLEXPORT bool Open(const CMString &)
Definition: mutil.cc:264
MDLLEXPORT void setLevel(int verboseLevel)
Definition: mutil.h:308
bool Read(unsigned long long &d)
Definition: mutil.h:221
TMFixedValueVector()
Definition: mutil.h:421
virtual long BytesProcessed()=0
MDLLEXPORT VerbositySetting(int verboseLevel)
Definition: mutil.h:304
long add()
Definition: mutil.h:929
Item m_array[size]
Definition: mutil.h:414
void insert(Item *, long)
Definition: mutil.h:938
~TMValueVector()
Definition: mutil.h:619
TMValueVector< Item * > m_list
Definition: mutil.h:844
bool Read(IMReadStream &stream)
Definition: mutil.h:527
MDLLEXPORT void MCLSetUTF8Encode(bool b=true)
Definition: mutil.cc:1288
MDLLEXPORT CMStringDictionary & operator=(const CMStringDictionary &dict)
Definition: mutil.cc:1718
bool Write(IMWriteStream &stream)
Definition: mutil.h:1084
void remove(const Item *)
Definition: mutil.h:962
TMBinaryIndexSearcher()
Definition: mutil.h:1364
void removeNoDelete(const Item *)
Definition: mutil.h:983
MDLLEXPORT CMString & operator=(const MCL_TCHAR *)
Definition: mutil.cc:1152
bool Write(const unsigned short &d)
Definition: mutil.h:255
bool Read(unsigned long &d)
Definition: mutil.h:205
bool ReadLine(CMString &d)
Definition: mutil.h:224
TMPtrList()
Definition: mutil.h:852
MDLLEXPORT int getLevel() const
Definition: mutil.h:312
bool Search(long &index, const Item &toFind)
Definition: mutil.h:1421
virtual MDLLEXPORT bool Close()
Definition: mutil.cc:490
bool Read(IMReadStream &)
Definition: mutil.h:1483
virtual MDLLEXPORT ~CMAsciiWriteFileStream()
Definition: mutil.cc:469
MDLLEXPORT void Print()
Definition: mutil.cc:212
virtual IMWriteStream * CloneAndOpen(const CMString &name)=0
CMString m_fileName
Definition: mutil.h:1179
MDLLEXPORT bool operator!=(const CMString &s1) const
Definition: mutil.cc:1382
MDLLEXPORT CMString()
Definition: mutil.cc:1092
virtual MDLLEXPORT ~CMAsciiReadFileStream()
Definition: mutil.cc:224
#define MDLLEXPORT
Definition: mutil.h:16
MDLLEXPORT CMException(const CMString &error)
Definition: mutil.cc:199
virtual long BytesProcessed()
Definition: mutil.h:1167
virtual bool ReadSimpleType(void *pData, long lenInBytes)=0
bool Peek(const long &index, Item &toFind)
Definition: mutil.h:1577
MDLLEXPORT bool Tokenize(CMPtrStringList &result, const CMString &source, char delimiter= ' ', long limit=0x7FFFFFFF)
Definition: mutil.cc:1493
const Item & operator()(const long index) const
Definition: mutil.h:479
bool Read(char &d)
Definition: mutil.h:213
virtual bool ReadString(CMString &string)
Definition: mutil.cc:908
bool m_bIsOpen
Definition: mutil.h:1299
MDLLEXPORT CMLog & mlog()
Definition: mutil.cc:585
bool Read(int &d)
Definition: mutil.h:207
virtual MDLLEXPORT bool WriteLine(const CMString &line)
Definition: mutil.cc:562
CMStringMap(const CMString &string1, const CMString &string2)
Definition: mutil.h:1105
virtual MDLLEXPORT bool IsEnd()
Definition: mutil.cc:507
MCL_TCHAR * GetMemory(long charLen) const
Definition: mutil.cc:1115
long & GetVirtualLength()
Definition: mutil.h:1374
virtual bool WriteSimpleType(const void *pData, long lenInBytes)
Definition: mutil.cc:512
bool Write(const long &d)
Definition: mutil.h:248
~TMFixedValueVector()
Definition: mutil.h:433
virtual MDLLEXPORT ~CMWriteFileStream()
Definition: mutil.cc:962
MDLLEXPORT void toLower()
Definition: mutil.cc:1300
virtual long BytesProcessed()
Definition: mutil.h:1209
MDLLEXPORT CMAsciiWriteFileStream()
Definition: mutil.cc:460
bool Write(const float &d)
Definition: mutil.h:261
MDLLEXPORT bool IsUTF8(const CMString &string)
Definition: mutil.cc:1650
bool InternalSearch(long &i, const Item &toFind)
Definition: mutil.h:1530
virtual MDLLEXPORT bool IsOpen()
Definition: mutil.cc:995
bool Write(const char &d)
Definition: mutil.h:257
MDLLEXPORT ~CMString()
Definition: mutil.cc:1110
virtual ~IMLogSink()
Definition: mutil.h:289
MDLLEXPORT bool Tokenize(CMPtrStringList &result, const CMString &source)
Definition: mutil.cc:1593
const Item & operator[](const long index) const
Definition: mutil.h:651
virtual bool WriteBlob(const void *pData, long lenInElements, long elSize)
Definition: mutil.cc:1019
virtual MDLLEXPORT bool Close()
Definition: mutil.cc:282
MDLLEXPORT const char * GetUTF8Sig()
Definition: mutil.cc:1645
bool Write(IMWriteStream &stream)
Definition: mutil.h:781
const Item * data() const
Definition: mutil.h:688
MDLLEXPORT void SetMemoryManage(bool b=true)
Definition: mutil.cc:1059
bool Read(IMReadStream &stream)
Definition: mutil.h:552
virtual bool WriteStringLine(const CMString &string)
Definition: mutil.h:1293
MDLLEXPORT MCL_TCHAR & operator[](long)
Definition: mutil.cc:1220
const Index IndexToIndex(const long index) const
Definition: mutil.h:1376
MDLLEXPORT bool Write(IMWriteStream &stream)
Definition: mutil.cc:1838
long m_bytesProcessed
Definition: mutil.h:1263
bool m_bIsOpen
Definition: mutil.h:1180
MDLLEXPORT bool MCLIsUTF8Encode()
Definition: mutil.cc:1293
MDLLEXPORT void MLog(const MCL_TCHAR *szText, bool bLineFeed=true)
Definition: mutil.cc:738
TMBinaryIndexSearcher< CMString, long > m_searcher
Definition: mutil.h:1649
bool Write(const void *p, long lenInElements, long elSize=1)
Definition: mutil.h:271
virtual ~IMStream()
Definition: mutil.h:182
TMSTValueVector< signed char > CMInt8List
Definition: mutil.h:375
~TMNoOwnPtrList()
Definition: mutil.h:1043
bool Read(float &d)
Definition: mutil.h:217
MDLLEXPORT const CMString & GetErrorText()
Definition: mutil.cc:207
virtual ~IMReadStream()
Definition: mutil.h:202
FILE * m_pFile
Definition: mutil.h:1259
virtual ~IMWriteStream()
Definition: mutil.h:246
MDLLEXPORT CMLog & operator<<(char c)
Definition: mutil.cc:627
~TMBinaryArraySearcher()
Definition: mutil.h:1342
TMPtrList< Item > & operator=(const TMPtrList< Item > &toCopy)
Definition: mutil.h:890
virtual IMReadStream * CloneAndOpen(const CMString &name)
Definition: mutil.h:1244
TMSTValueVector< unsigned long > CMUInt32List
Definition: mutil.h:378
MDLLEXPORT ~CMStringDictionary()
Definition: mutil.cc:1705
TMBinaryArraySearcher()
Definition: mutil.h:1341
TMNoOwnPtrList< Item > & operator=(const TMNoOwnPtrList< Item > &toCopy)
Definition: mutil.h:1048
const Item * operator()(const long index) const
Definition: mutil.h:872
FILE * m_pFile
Definition: mutil.h:1219
void removeAll()
Definition: mutil.h:1024
TMBinaryIndexSearcher & operator=(const TMBinaryIndexSearcher &idx)
Definition: mutil.h:1383
bool Write(IMWriteStream &stream)
Definition: mutil.h:535
virtual bool ReadStringLine(CMString &string)
Definition: mutil.cc:349
CMString m_string1
Definition: mutil.h:1120
void SetDataPtr(const TMValueVector< Item > *pSearchList)
Definition: mutil.h:1492