File: classes.h

package info (click to toggle)
icmake 13.05.01-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,132 kB
  • sloc: cpp: 11,595; fortran: 883; makefile: 853; sh: 546; pascal: 342
file content (40 lines) | stat: -rw-r--r-- 890 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef INCLUDED_CLASSES_
#define INCLUDED_CLASSES_

#include <vector>
#include <string>

class Options;

class Classes
{
    using StrVect = std::vector<std::string>;  

    Options const &d_options;

    StrVect d_classes;      // the classes in CLASSES
    size_t d_nr;            // the sequence nr of the entries in CLASSES,
                            // d_nr 0 is used for the main directory, 

    public:
        struct Info
        {
            size_t nr;
            std::string const &subdir;
        };

        Classes();
        Info next();            // idx 0: all classes done
        size_t reset();         // reset d_idx to d_classes.size()

    private:
        void read();                            // read CLASSES
        void subdirs();                         // determine all subdirs
};

inline size_t Classes::reset()
{
    return d_nr = 0;
}
        
#endif