File: Configurable.h

package info (click to toggle)
drbd-utils 9.22.0-1.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,768 kB
  • sloc: ansic: 48,975; xml: 11,553; cpp: 9,843; sh: 4,568; makefile: 1,029; perl: 353; ruby: 43
file content (27 lines) | stat: -rw-r--r-- 571 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
27
#ifndef CONFIGURABLE_H
#define	CONFIGURABLE_H

#include <string>

class Configurator;

class Configurable
{
  public:
    virtual ~Configurable() noexcept
    {
    }

    // @throws std::bad_alloc
    virtual void announce_options(Configurator& collector) = 0;

    virtual void options_help() noexcept = 0;

    // @throws std::bad_alloc, ConfigurationException
    virtual void set_flag(std::string& key) = 0;

    // @throws std::bad_alloc, ConfigurationException
    virtual void set_option(std::string& key, std::string& value) = 0;
};

#endif	/* CONFIGURABLE_H */