Changeset 720 for cpp/common/virtfile


Ignore:
Timestamp:
01/14/18 11:24:22 (7 years ago)
Author:
Maciej Komosinski
Message:

Param::save2() renamed to saveSingleLine(); unified Param::load() so that it gets a single-line/multi-line format selector

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/virtfile/stringfile.h

    r382 r720  
    1616        int pos;
    1717public:
    18         StringFILE(string& s): VirtFILE(""), str(s), pos(0) {}
     18        StringFILE(string& s,int _pos=0): VirtFILE(""), str(s), pos(_pos) {}
    1919        size_t Vread(void *ptr, size_t size, size_t nmemb);
    2020        size_t Vwrite(const void *ptr, size_t size, size_t nmemb) { str.append((const char*)ptr, (int)(size*nmemb)); return size*nmemb; }
     
    2727        long Vtell() { return pos; }
    2828        int Vflush() { return 0; }
     29
     30        const string& getString() { return str; }
    2931};
    3032
     
    3436        string str;
    3537public:
    36         StringFILE2(const string& s) :StringFILE(str), str(s) {}
     38        StringFILE2(const string& s,int pos=0) :StringFILE(str,pos), str(s) {}
    3739        StringFILE2() :StringFILE(str) {}
    38         const string& getString() { return str; }
    3940};
    4041
Note: See TracChangeset for help on using the changeset viewer.