Changeset 80 in dev for ProjectEditor/NonVolatile.cpp


Ignore:
Timestamp:
Mar 26, 2007, 6:33:06 AM (17 years ago)
Author:
dai_9181
Message:

TheText用のリソースを追加。
単語単位での検索を可能にした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ProjectEditor/NonVolatile.cpp

    r24 r80  
    127127}
    128128
    129 BOOL CSettingFile::GetDataLine(char *name,char *parms){
     129BOOL CSettingFile::GetDataLine( const char *name,char *parms){
    130130    int i,i2,length;
    131131    length=lstrlen(name);
     
    150150}
    151151
    152 BOOL CSettingFile::GetWholeValue(char *name,int *pi32data){
     152BOOL CSettingFile::GetWholeValue( const char *name, int *pi32data ){
    153153    char temporary[8192];
    154154    if(!GetDataLine(name,temporary)) return 0;
    155155    *pi32data=atoi(temporary);
     156    return 1;
     157}
     158bool CSettingFile::GetBoolean( const char *name,bool &b ){
     159    int i=0;
     160    if( !GetWholeValue( name, &i ) ){
     161        return 0;
     162    }
     163
     164    b = ( i != 0 ) ? true:false;
     165
    156166    return 1;
    157167}
     
    402412    if(!GetWholeValue("IsFindStrBigSmall",&bFindStrBigSmall)) bFindStrBigSmall=0;
    403413
     414    // 単語単位で検索するか
     415    if( !GetBoolean("isWordUnit",isWordUnit) ){
     416        isWordUnit = false;
     417    }
     418
    404419    //検索時に、正規表現を利用するかどうか
    405420    if(!GetWholeValue("IsRegExp",&bRegExp)) bRegExp=0;
     
    612627}
    613628
    614 void CSettingFile::SetWholeValue(char *name,long i32data){
     629void CSettingFile::SetWholeValue(const char *name,long i32data){
    615630    sprintf(buffer+lstrlen(buffer),"%s=%d\r\n",name,i32data);
     631}
     632void CSettingFile::SetBoolean(const char *name,bool b){
     633    sprintf(buffer+lstrlen(buffer),"%s=%d\r\n",name,b?1:0);
    616634}
    617635void CSettingFile::Set3WholeValue(char *name,long d1,long d2,long d3){
     
    779797    SetWholeValue("IsFindStrBigSmall",bFindStrBigSmall);
    780798
     799    // 単語単位で検索するか
     800    SetBoolean("isWordUnit",isWordUnit);
     801
    781802    //検索時に、正規表現を利用するか
    782803    SetWholeValue("IsRegExp",bRegExp);
Note: See TracChangeset for help on using the changeset viewer.