File: ipcfunction.h

package info (click to toggle)
ssh-cron 1.05.00-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 820 kB
  • sloc: cpp: 1,616; makefile: 99; sh: 36; ansic: 10
file content (34 lines) | stat: -rw-r--r-- 487 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
28
29
30
31
32
33
34
#ifndef INCLUDED_IPCFUNCTION_
#define INCLUDED_IPCFUNCTION_

#include <bobcat/linearmap>

struct IPCFunction
{
    enum Function: unsigned int
    {
        NONE,
        DONE,
        LIST,
        MORE,
        RELOAD,
        TERMINATE
    };

    private:
        static FBB::LinearMap<Function, char const *> s_nameMap;

    public:
        static char const *nameOf(Function fun);
};

inline char const *IPCFunction::nameOf(Function fun)
{
    return s_nameMap[fun];
}

#endif