OSDN Git Service

2012/01/15 18:46:38
authorqwerty2501 <riot313@gmail.com>
Sun, 15 Jan 2012 09:46:38 +0000 (18:46 +0900)
committerqwerty2501 <riot313@gmail.com>
Sun, 15 Jan 2012 09:46:38 +0000 (18:46 +0900)
nlite/nlite.cpp
nlite/nlite_appinfo.h
nlite/nlite_chatData.cpp
nlite/nlite_commentview.cpp
nlite/nlite_exception.h
nlite/nlite_property.cpp
nlite/nlite_property.h
nlite/nlite_string.h

index 425c814..1651fbf 100644 (file)
@@ -60,12 +60,12 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE,
                errMessage += TEXT("\r\n\8ds\94Ô\8d\86:");
                std::wostringstream num;
                num << e.getLineNo();
-               errMessage += num.str();
+               errMessage += num.str().c_str();
                errMessage += TEXT("\r\n\83t\83@\83C\83\8b\96¼:");
                errMessage += e.getFileName();
                
-               MessageBox(NULL,errMessage.c_str(),TEXT("\83n\83\93\83h\83\8b\82³\82ê\82Ä\82È\82¢\83G\83\89\81["),MB_ICONERROR | MB_OK);
-               errprint(TEXT("\83n\83\93\83h\83\8b\82³\82ê\82Ä\82¢\82È\82¢\83G\83\89\81[:%s"),errMessage.c_str());
+               MessageBox(NULL,errMessage,TEXT("\83n\83\93\83h\83\8b\82³\82ê\82Ä\82È\82¢\83G\83\89\81["),MB_ICONERROR | MB_OK);
+               errprint(TEXT("\83n\83\93\83h\83\8b\82³\82ê\82Ä\82¢\82È\82¢\83G\83\89\81[:%s"),errMessage);
 
                goto nlitefinally;
        }catch(std::exception &e){
@@ -119,13 +119,12 @@ static BOOL InitializeNlite(){
 
                const CApplicationInfo &appInfo = CApplicationInfo::getInstance();
                CNLiteString userAgent;
-               userAgent.reserve(256);
                userAgent = appInfo.getProcuctName();
                userAgent += TEXT("/");
                userAgent += appInfo.getProductVersion();
 
 
-               hInternet = WinHttpOpen(userAgent.c_str(),WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,(LPCWSTR)WINHTTP_NO_PROXY_NAME,(LPCWSTR)WINHTTP_NO_PROXY_BYPASS,0);
+               hInternet = WinHttpOpen(userAgent,WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,(LPCWSTR)WINHTTP_NO_PROXY_NAME,(LPCWSTR)WINHTTP_NO_PROXY_BYPASS,0);
 
                if(hInternet == NULL){
 
index ff3217d..ce18bd5 100644 (file)
@@ -74,9 +74,6 @@ namespace nlite{
                        CNLiteString szOtherStuff;
 
 
-                       szApp.reserve(LENGTH_128);
-                       szOtherStuff.reserve(LENGTH_128);
-
                        szApp = pOriginalFileName;
                        szApp += TEXT("\82Ì\83A\83v\83\8a\83P\81[\83V\83\87\83\93\8fî\95ñ");
 
@@ -85,7 +82,7 @@ namespace nlite{
                        szOtherStuff += TEXT("\r\n\92\98\8dì\8c : ");
                        szOtherStuff += pLegalCopyright;
 
-                       ShellAbout(NULL,szApp.c_str(),szOtherStuff.c_str(),NULL);
+                       ShellAbout(NULL,szApp,szOtherStuff,NULL);
                }
 
        };
index 6a86b3b..be5dfb6 100644 (file)
@@ -15,7 +15,7 @@ struct ListenerPre{
 
        bool operator()(CListenerList::reference listenerData){
 
-               return _tcscmp(user_id,listenerData.user_id.c_str()) == 0;
+               return _tcscmp(user_id,listenerData.user_id) == 0;
        }
 
 };
index 82cc4e1..3fb9e1a 100644 (file)
@@ -729,8 +729,8 @@ VOID CCommentListWindow::DrawItem(CDC &dc,RECT &rc,CChatData &chatData){
        dc.LineTo(timeViewRect.right,rc.bottom);
 
        dc.DrawTextW(noString,_tcslen(noString),&noViewRect,DT_WORD_ELLIPSIS);
-       dc.DrawTextW(chatData.listenerData->user_id.c_str(),chatData.listenerData->user_id.length(),&userNameViewRect,DT_WORD_ELLIPSIS);
-       dc.DrawTextW(chatData.chatBuf.c_str(),chatData.chatBuf.length(),&chatViewRect,DT_WORDBREAK);
+       dc.DrawTextW(chatData.listenerData->user_id,chatData.listenerData->user_id.length(),&userNameViewRect,DT_WORD_ELLIPSIS);
+       dc.DrawTextW(chatData.chatBuf,chatData.chatBuf.length(),&chatViewRect,DT_WORDBREAK);
        dc.DrawTextW(dateString,_tcslen(dateString),&timeViewRect,DT_WORD_ELLIPSIS);
        
        return;
@@ -747,7 +747,7 @@ UINT_PTR CCommentListWindow::CalcItemHeight(CChatData &chatData){
        drowSize.bottom = 0;
 
        
-       m_memoryDC.DrawTextW(chatData.chatBuf.c_str(),chatData.chatBuf.length(),&drowSize, DT_CALCRECT | DT_WORDBREAK);
+       m_memoryDC.DrawTextW(chatData.chatBuf,chatData.chatBuf.length(),&drowSize, DT_CALCRECT | DT_WORDBREAK);
        
        drowSize.top -= 2;
        drowSize.bottom += 2;
index b55fa1b..0204c14 100644 (file)
@@ -7,7 +7,7 @@ namespace nlite{
        class Exception:public std::exception{
                
        private:
-               std::wstring  wErrMessage;
+               CNLiteString  wErrMessage;
                UINT_PTR line;
                CNLiteString fileName;
 
@@ -29,7 +29,7 @@ namespace nlite{
 
                LPCWSTR what(){
 
-                       return wErrMessage.c_str();
+                       return wErrMessage;
 
                }
 
@@ -40,7 +40,7 @@ namespace nlite{
 
                LPCWSTR getFileName(){
                        
-                       return fileName.c_str();
+                       return fileName;
                
                }
 
index 3666e33..4767171 100644 (file)
@@ -6,13 +6,13 @@
 #define NLITE_READ_INI_INT(cs,mm,path)         cs.mm = GetPrivateProfileInt(cs.GetSectionName(),TEXT(#mm),cs.mm,path)
 
 #define NLITE_READ_INI_STR(cs,mm,bv,path)      \
-       GetPrivateProfileString(cs.GetSectionName(),TEXT(#mm),cs.mm.c_str(),&bv[0],bv.size(),path);\
+       GetPrivateProfileString(cs.GetSectionName(),TEXT(#mm),cs.mm,&bv[0],bv.size(),path);\
        cs.mm = &bv[0]\
        /*\83}\83N\83\8d\81@\8fI\97¹*/
 
 #define NLITE_WRITE_INI_INT(cs,mm,path)                WritePrivateProfileInt(cs.GetSectionName(),TEXT(#mm),cs.mm,path)
 
-#define NLITE_WRITE_INI_STR(cs,mm,path)                WritePrivateProfileString(cs.GetSectionName(),TEXT(#mm),cs.mm.c_str(),path)
+#define NLITE_WRITE_INI_STR(cs,mm,path)                WritePrivateProfileString(cs.GetSectionName(),TEXT(#mm),cs.mm,path)
 
 static LPCTSTR headerFormat = TEXT("headerholSize%u");
 static LPCTSTR headerOrderFormat = TEXT("headerOrderArray%u");
@@ -51,46 +51,46 @@ VOID Property::ReadIniFile(){
        
        //crp\82Ì\90Ý\92è\92l\93Ç\82Ý\8d\9e\82Ý
 
-       NLITE_READ_INI_INT(crp,besideLengthFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(crp,besideLengthFlag,propertyPath);
 
-       NLITE_READ_INI_INT(crp,bspReadFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(crp,bspReadFlag,propertyPath);
 
-       NLITE_READ_INI_INT(crp,commentReadFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(crp,commentReadFlag,propertyPath);
 
-       NLITE_READ_INI_INT(crp,managementReadFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(crp,managementReadFlag,propertyPath);
 
-       NLITE_READ_INI_INT(crp,maxCommentLength,propertyPath.c_str());
+       NLITE_READ_INI_INT(crp,maxCommentLength,propertyPath);
 
-       NLITE_READ_INI_INT(crp,newLineReadFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(crp,newLineReadFlag,propertyPath);
 
-       NLITE_READ_INI_INT(crp,ngUserReadFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(crp,ngUserReadFlag,propertyPath);
 
-       NLITE_READ_INI_INT(crp,ngWordReadFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(crp,ngWordReadFlag,propertyPath);
 
-       NLITE_READ_INI_INT(crp,teropReadFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(crp,teropReadFlag,propertyPath);
 
-       NLITE_READ_INI_INT(crp,userCommentReadFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(crp,userCommentReadFlag,propertyPath);
 
-       NLITE_READ_INI_STR(crp,outString,buffer,propertyPath.c_str());
+       NLITE_READ_INI_STR(crp,outString,buffer,propertyPath);
 
-       NLITE_READ_INI_STR(crp,shortComment,buffer,propertyPath.c_str());
+       NLITE_READ_INI_STR(crp,shortComment,buffer,propertyPath);
 
 
        //commentview\90Ý\92è\92l\93Ç\82Ý\8d\9e\82Ý
 
-       NLITE_READ_INI_INT(cvp,anonymousIDLinkColor,propertyPath.c_str());
+       NLITE_READ_INI_INT(cvp,anonymousIDLinkColor,propertyPath);
 
-       NLITE_READ_INI_INT(cvp,backColor,propertyPath.c_str());
+       NLITE_READ_INI_INT(cvp,backColor,propertyPath);
 
-       NLITE_READ_INI_INT(cvp,baseStringColor,propertyPath.c_str());
+       NLITE_READ_INI_INT(cvp,baseStringColor,propertyPath);
 
-       NLITE_READ_INI_INT(cvp,commentFoldingFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(cvp,commentFoldingFlag,propertyPath);
 
-       NLITE_READ_INI_INT(cvp,commentTimeType,propertyPath.c_str());
+       NLITE_READ_INI_INT(cvp,commentTimeType,propertyPath);
 
-       NLITE_READ_INI_INT(cvp,IDLinkColor,propertyPath.c_str());
+       NLITE_READ_INI_INT(cvp,IDLinkColor,propertyPath);
 
-       NLITE_READ_INI_INT(cvp,lineColor,propertyPath.c_str());
+       NLITE_READ_INI_INT(cvp,lineColor,propertyPath);
 
        
        TCHAR headerKey[_MAX_PATH];
@@ -99,39 +99,39 @@ VOID Property::ReadIniFile(){
        for(UINT_PTR index = 0;index < ARRAY_LENGTH(cvp.headerholSize);index++){
                _stprintf(headerKey,headerFormat,index);
                _stprintf(headerOrderKey,headerOrderFormat,index);
-               cvp.headerholSize[index] = GetPrivateProfileInt(cvp.GetSectionName(),headerKey,cvp.headerholSize[index],propertyPath.c_str());
-               cvp.headerOraderArray[index] = GetPrivateProfileInt(cvp.GetSectionName(),headerOrderKey,index,propertyPath.c_str());
+               cvp.headerholSize[index] = GetPrivateProfileInt(cvp.GetSectionName(),headerKey,cvp.headerholSize[index],propertyPath);
+               cvp.headerOraderArray[index] = GetPrivateProfileInt(cvp.GetSectionName(),headerOrderKey,index,propertyPath);
        }
 
        //mainframe\90Ý\92è\92l\93Ç\8eæ
 
-       NLITE_READ_INI_INT(mfp,windowFrontFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(mfp,windowFrontFlag,propertyPath);
                        
-       NLITE_READ_INI_INT(mfp,windowSize.cx,propertyPath.c_str());
+       NLITE_READ_INI_INT(mfp,windowSize.cx,propertyPath);
 
-       NLITE_READ_INI_INT(mfp,windowSize.cy,propertyPath.c_str());
+       NLITE_READ_INI_INT(mfp,windowSize.cy,propertyPath);
 
        //general\90Ý\92è\92l\93Ç\8eæ
                        
-       NLITE_READ_INI_INT(gp,activeCountTimeFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(gp,activeCountTimeFlag,propertyPath);
 
-       NLITE_READ_INI_INT(gp,autoColorRegisterFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(gp,autoColorRegisterFlag,propertyPath);
 
-       NLITE_READ_INI_INT(gp,autoNameRegisterFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(gp,autoNameRegisterFlag,propertyPath);
 
-       NLITE_READ_INI_INT(gp,autoNameUpdateFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(gp,autoNameUpdateFlag,propertyPath);
 
-       NLITE_READ_INI_STR(gp,browserPath,buffer,propertyPath.c_str());
+       NLITE_READ_INI_STR(gp,browserPath,buffer,propertyPath);
 
-       NLITE_READ_INI_INT(gp,commentLogAutoSaveFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(gp,commentLogAutoSaveFlag,propertyPath);
 
-       NLITE_READ_INI_STR(gp,commentPath,buffer,propertyPath.c_str());
+       NLITE_READ_INI_STR(gp,commentPath,buffer,propertyPath);
                        
-       NLITE_READ_INI_INT(gp,defaultBroserFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(gp,defaultBroserFlag,propertyPath);
 
-       NLITE_READ_INI_INT(gp,numberNameFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(gp,numberNameFlag,propertyPath);
 
-       NLITE_READ_INI_INT(gp,userCountUpdateFlag,propertyPath.c_str());
+       NLITE_READ_INI_INT(gp,userCountUpdateFlag,propertyPath);
 
 
 
@@ -146,7 +146,7 @@ VOID Property::ReadIniFile(){
 
     CNLiteString browserTypeName;
 
-       GetPrivateProfileString(gp.GetSectionName(),TEXT(TOSTR(browserType)),bt_none,&buffer[0],buffer.size(),propertyPath.c_str());
+       GetPrivateProfileString(gp.GetSectionName(),TEXT(TOSTR(browserType)),bt_none,&buffer[0],buffer.size(),propertyPath);
        browserTypeName = &buffer[0];
 
     funcs_type::iterator it = funcs.find(browserTypeName);
@@ -167,9 +167,9 @@ VOID Property::CreatePropertyFile(){
 
        propertyPath += TEXT("\\qwerty_nico");
 
-       if(PathIsDirectory(propertyPath.c_str()) == FALSE){
+       if(PathIsDirectory(propertyPath) == FALSE){
 
-               if(CreateDirectory(propertyPath.c_str(),NULL) == 0){
+               if(CreateDirectory(propertyPath,NULL) == 0){
                        throw Exception(TEXT("\90Ý\92è\83t\83@\83C\83\8b\8dì\90¬\82É\8e¸\94s\82µ\82Ü\82µ\82½"),__LINE__,TEXT(__FILE__));
                }
 
@@ -177,9 +177,9 @@ VOID Property::CreatePropertyFile(){
 
        propertyPath += TEXT("\\nlite");
 
-       if(PathIsDirectory(propertyPath.c_str()) == FALSE){
+       if(PathIsDirectory(propertyPath) == FALSE){
 
-               if(CreateDirectory(propertyPath.c_str(),NULL) == 0){
+               if(CreateDirectory(propertyPath,NULL) == 0){
                        throw Exception(TEXT("\90Ý\92è\83t\83@\83C\83\8b\8dì\90¬\82É\8e¸\94s\82µ\82Ü\82µ\82½"),__LINE__,TEXT(__FILE__));
                }
 
@@ -188,8 +188,8 @@ VOID Property::CreatePropertyFile(){
        propertyPath += TEXT("\\property.ini");
 
                
-       if(PathFileExists(propertyPath.c_str())== FALSE || PathIsDirectory(propertyPath.c_str()) == TRUE){
-               HANDLE hPropertyini =   CreateFile(propertyPath.c_str(),GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
+       if(PathFileExists(propertyPath)== FALSE || PathIsDirectory(propertyPath) == TRUE){
+               HANDLE hPropertyini =   CreateFile(propertyPath,GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
 
                if(hPropertyini == INVALID_HANDLE_VALUE ){
 
@@ -211,46 +211,46 @@ VOID Property::WriteIniFile(){
 
        //\83R\83\81\83\93\83g\93Ç\82Ý\8fã\82°\90Ý\92è\8f\91\82«\8d\9e\82Ý
 
-       NLITE_WRITE_INI_INT(crp,besideLengthFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(crp,besideLengthFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(crp,bspReadFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(crp,bspReadFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(crp,commentReadFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(crp,commentReadFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(crp,managementReadFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(crp,managementReadFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(crp,maxCommentLength,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(crp,maxCommentLength,propertyPath);
 
-       NLITE_WRITE_INI_INT(crp,newLineReadFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(crp,newLineReadFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(crp,ngUserReadFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(crp,ngUserReadFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(crp,ngWordReadFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(crp,ngWordReadFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(crp,teropReadFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(crp,teropReadFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(crp,userCommentReadFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(crp,userCommentReadFlag,propertyPath);
 
-       NLITE_WRITE_INI_STR(crp,outString,propertyPath.c_str());
+       NLITE_WRITE_INI_STR(crp,outString,propertyPath);
 
-       NLITE_WRITE_INI_STR(crp,shortComment,propertyPath.c_str());
+       NLITE_WRITE_INI_STR(crp,shortComment,propertyPath);
 
 
        //commentview\90Ý\92è\92l\8f\91\82«\8d\9e\82Ý
 
-       NLITE_WRITE_INI_INT(cvp,anonymousIDLinkColor,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(cvp,anonymousIDLinkColor,propertyPath);
 
-       NLITE_WRITE_INI_INT(cvp,backColor,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(cvp,backColor,propertyPath);
 
-       NLITE_WRITE_INI_INT(cvp,baseStringColor,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(cvp,baseStringColor,propertyPath);
 
-       NLITE_WRITE_INI_INT(cvp,commentFoldingFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(cvp,commentFoldingFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(cvp,commentTimeType,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(cvp,commentTimeType,propertyPath);
 
-       NLITE_WRITE_INI_INT(cvp,IDLinkColor,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(cvp,IDLinkColor,propertyPath);
 
-       NLITE_WRITE_INI_INT(cvp,lineColor,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(cvp,lineColor,propertyPath);
 
        
        TCHAR headerKey[_MAX_PATH];
@@ -259,41 +259,41 @@ VOID Property::WriteIniFile(){
        for(UINT_PTR index = 0;index < ARRAY_LENGTH(cvp.headerholSize);index++){
                _stprintf(headerKey,headerFormat,index);
                _stprintf(headerOrderKey,headerOrderFormat,index);
-               cvp.headerholSize[index] = WritePrivateProfileInt(cvp.GetSectionName(),headerKey,cvp.headerholSize[index],propertyPath.c_str());
-               cvp.headerholSize[index] = WritePrivateProfileInt(cvp.GetSectionName(),headerOrderKey,cvp.headerOraderArray[index],propertyPath.c_str());
+               cvp.headerholSize[index] = WritePrivateProfileInt(cvp.GetSectionName(),headerKey,cvp.headerholSize[index],propertyPath);
+               cvp.headerholSize[index] = WritePrivateProfileInt(cvp.GetSectionName(),headerOrderKey,cvp.headerOraderArray[index],propertyPath);
        }
 
 
 
        //mainframe\90Ý\92è\92l\8f\91\82«\8d\9e\82Ý
 
-       NLITE_WRITE_INI_INT(mfp,windowFrontFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(mfp,windowFrontFlag,propertyPath);
                        
-       NLITE_WRITE_INI_INT(mfp,windowSize.cx,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(mfp,windowSize.cx,propertyPath);
 
-       NLITE_WRITE_INI_INT(mfp,windowSize.cy,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(mfp,windowSize.cy,propertyPath);
 
        //general\90Ý\92è\92l\8f\91\82«\8d\9e\82Ý
                        
-       NLITE_WRITE_INI_INT(gp,activeCountTimeFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(gp,activeCountTimeFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(gp,autoColorRegisterFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(gp,autoColorRegisterFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(gp,autoNameRegisterFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(gp,autoNameRegisterFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(gp,autoNameUpdateFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(gp,autoNameUpdateFlag,propertyPath);
 
-       NLITE_WRITE_INI_STR(gp,browserPath,propertyPath.c_str());
+       NLITE_WRITE_INI_STR(gp,browserPath,propertyPath);
 
-       NLITE_WRITE_INI_INT(gp,commentLogAutoSaveFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(gp,commentLogAutoSaveFlag,propertyPath);
 
-       NLITE_WRITE_INI_STR(gp,commentPath,propertyPath.c_str());
+       NLITE_WRITE_INI_STR(gp,commentPath,propertyPath);
                        
-       NLITE_WRITE_INI_INT(gp,defaultBroserFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(gp,defaultBroserFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(gp,numberNameFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(gp,numberNameFlag,propertyPath);
 
-       NLITE_WRITE_INI_INT(gp,userCountUpdateFlag,propertyPath.c_str());
+       NLITE_WRITE_INI_INT(gp,userCountUpdateFlag,propertyPath);
 
        CNLiteString browserTypeName;
 
@@ -334,7 +334,7 @@ VOID Property::WriteIniFile(){
 
        }
 
-       WritePrivateProfileString(gp.GetSectionName(),TEXT(TOSTR(browserType)),browserTypeName.c_str(),propertyPath.c_str());
+       WritePrivateProfileString(gp.GetSectionName(),TEXT(TOSTR(browserType)),browserTypeName,propertyPath);
 
        return;
 }
\ No newline at end of file
index a37d84a..e549537 100644 (file)
@@ -153,7 +153,7 @@ skip:
 
                LPCTSTR GetSectionName(){
 
-                       return sectionName.c_str();
+                       return sectionName;
 
                }
 
@@ -195,7 +195,7 @@ skip:
 
                LPCTSTR GetSectionName(){
 
-                       return sectionName.c_str();
+                       return sectionName;
 
                }
 
@@ -236,7 +236,7 @@ skip:
 
                LPCTSTR GetSectionName(){
 
-                       return sectionName.c_str();
+                       return sectionName;
 
                }
        };
@@ -269,7 +269,7 @@ skip:
 
                LPCTSTR GetSectionName(){
 
-                       return sectionName.c_str();
+                       return sectionName;
                }
 
        };
index 7868d7d..9a6b8b3 100644 (file)
@@ -12,12 +12,12 @@ namespace nlite{
                //
        private:
                typedef CString InternalString;
-               typedef CString::PCXSTR StrPtr;
-               typedef CString::PXSTR StrCPtr;
-               typedef CString::PCYSTR WStrPtr;
-               typedef CString::PYSTR WStrCPtr;
-               typedef CString::XCHAR Char_Type;
-               typedef CString::YCHAR WChar_Type;
+               typedef LPSTR StrPtr;
+               typedef LPCSTR StrCPtr;
+               typedef LPWSTR WStrPtr;
+               typedef LPCWSTR WStrCPtr;
+               typedef CHAR Char_Type;
+               typedef WCHAR WChar_Type;
 
        public:
                typedef WStrPtr NLiteStrPtr;
@@ -37,29 +37,48 @@ namespace nlite{
                ///
                CNLiteString():is_string(){}
 
-               CNLiteString(NLiteStrCPtr in_str):is_string(in_str){}
+               CNLiteString(const NLiteStrCPtr in_str):is_string(in_str){}
 
-               CNLiteString(InternalString &in_str):is_string(in_str){}
+               CNLiteString(const InternalString &in_str):is_string(in_str){}
 
-               CNLiteString(CNLiteString &in_str):is_string(in_str){}
+               CNLiteString(const CNLiteString &in_str):is_string(in_str.is_string){}
 
 
 
 
 
-               NLiteStrCPtr c_str(){
+               UINT_PTR length(){
 
-                       return *this;
+                       return _tcslen(is_string);
                }
 
                operator NLiteStrCPtr(){
                        return (NLiteStrCPtr)(LPCWSTR)is_string;
                }
-
-               ThisType &operator=(NLiteStrCPtr lpstr){
-                       is_string = lpstr;
-                       return (LPCWSTR)is_string;
+               
+               template<typename T>
+               ThisType &operator=(const T &instr){
+                       is_string = instr;
+                       return *this;
+               }
+               
+               template<typename T>
+               ThisType &operator=(const T instr[]){
+                       is_string = instr;
+                       return *this;
                }
                
+               template<typename T>
+               ThisType &operator+=(const T &instr){
+                       is_string += instr;
+                       return *this;
+               }
+
+               
+               
+               bool operator< (const ThisType &instr) const{
+                       return is_string < instr.is_string;
+               }
+
        };
 }
\ No newline at end of file