Ignore:
Timestamp:
Apr 6, 2009, 5:13:01 AM (16 years ago)
Author:
gumby
Message:

Reader is pretty much finished. What to work on now?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • AE/Installer/trunk/source/methods.h

    r293 r294  
    88        bool    isInstalled; //replace with function
    99        string  name;
    10         string  modString;
     10        string  modStringName;
     11        int     modStringVersion;
    1112        bool    hasOnis;
    1213        bool    hasDeltas;
    1314        bool    hasBSL;
    1415        bool    hasDats;
    15         bool    category;
     16        string  category;
    1617        string  creator;
    1718        bool    isEngine;
    1819        string  readme;
    1920        bool    globalNeeded;
     21        ModPackage();
     22        void doOutput() {
     23                        cout << "Mod: " << name; cout << "\n"; //remove this when done
     24                        cout << "       String: " << modStringName << " v." << modStringVersion << "\n";
     25                        cout << "       Category: " << category << "\n";
     26                        cout << "       Creator: " << creator << "\n";
     27                        cout << "       HasOnis: " << hasOnis << "\n";
     28                        cout << "       HasBSL: " << hasBSL << "\n";
     29                        cout << "       HasDeltas: " << hasDeltas << "\n";
     30                        cout << "       HasDats: " << hasDats << "\n";
     31                        cout << "       IsEngine: " << isEngine << "\n";
     32                        cout << "       GlobalNeeded: " << globalNeeded << "\n";
     33                        cout << "       Readme: " << readme << "\n";
     34                        cout << "\n";
     35}
     36
    2037};
     38//Initialization
     39ModPackage::ModPackage() {
     40                isInstalled = 0; //replace with function
     41                name = "";
     42                modStringName = "";
     43                modStringVersion = 0;
     44                hasOnis = 0;
     45                hasDeltas = 0;
     46                hasBSL = 0;
     47                hasDats = 0;
     48                category = "";
     49                creator = "";
     50                isEngine = 0;
     51                readme = "";
     52                globalNeeded = 1;
     53//              void doOutput() const
     54//              { };
     55}
    2156
    2257int mainMenu();
     
    3267
    3368void Tokenize(const string& str,
    34                       vector<string>& tokens,
    35                       const string& delimiters = " ")
     69                          vector<string>& tokens,
     70                          const string& delimiters = " ")
    3671{
    37     // Skip delimiters at beginning.
    38     string::size_type lastPos = str.find_first_not_of(delimiters, 0);
    39     // Find first "non-delimiter".
    40     string::size_type pos     = str.find_first_of(delimiters, lastPos);
     72        // Skip delimiters at beginning.
     73        string::size_type lastPos = str.find_first_not_of(delimiters, 0);
     74        // Find first "non-delimiter".
     75        string::size_type pos     = str.find_first_of(delimiters, lastPos);
    4176
    42     while (string::npos != pos || string::npos != lastPos)
    43     {
    44         // Found a token, add it to the vector.
    45         tokens.push_back(str.substr(lastPos, pos - lastPos));
    46         // Skip delimiters.  Note the "not_of"
    47         lastPos = str.find_first_not_of(delimiters, pos);
    48         // Find next "non-delimiter"
    49         pos = str.find_first_of(delimiters, lastPos);
    50     }
     77        while (string::npos != pos || string::npos != lastPos)
     78        {
     79                // Found a token, add it to the vector.
     80                tokens.push_back(str.substr(lastPos, pos - lastPos));
     81                // Skip delimiters.  Note the "not_of"
     82                lastPos = str.find_first_not_of(delimiters, pos);
     83                // Find next "non-delimiter"
     84                pos = str.find_first_of(delimiters, lastPos);
     85        }
    5186}
Note: See TracChangeset for help on using the changeset viewer.