[go: up one dir, main page]

File: Args.h

package info (click to toggle)
drbd-utils 9.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,388 kB
  • sloc: ansic: 43,698; xml: 15,968; cpp: 7,783; sh: 3,699; makefile: 1,353; perl: 353
file content (26 lines) | stat: -rw-r--r-- 457 bytes parent folder | download | duplicates (6)
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
#ifndef ARGS_H
#define	ARGS_H

class Args
{
  public:
    Args(int argc, char* argv[]);

    Args(const Args& orig) = delete;
    Args& operator=(const Args& orig) = delete;
    Args(Args&& orig) = default;
    Args& operator=(Args&& orig) = default;

    virtual ~Args() noexcept;

    virtual bool has_next() const;
    virtual char* next();

  private:
    const int    arg_count;
    char** const arg_values;

    int index {1};
};

#endif	/* ARGS_H */