Switch to unified view

a/src/Common/DAP.h b/src/Common/DAP.h
...
...
17
#define DAP_H_
17
#define DAP_H_
18
//Standard libraries
18
//Standard libraries
19
#include <string>
19
#include <string>
20
#include <sstream>
20
#include <sstream>
21
21
22
/**
23
 * @brief Distributed Application Process name a.k.a. DAP class
24
 * @authors Vladimir Vesely (ivesely@fit.vutbr.cz)
25
 * @date Last refactorized and documented on 2014-10-28
26
 */
22
class DAP {
27
class DAP {
23
  public:
28
  public:
29
    /**
30
     * @brief Constructor creating unspecified DAP
31
     */
24
    DAP();
32
    DAP();
33
34
    /**
35
     * @brief Constructor creating DAP of given name
36
     * @param nam Represents DAP string name
37
     */
25
    DAP(std::string nam);
38
    DAP(std::string nam);
39
40
    /**
41
     * @brief Destructor assigning empty string to name
42
     */
26
    virtual ~DAP();
43
    virtual ~DAP();
27
44
45
    /**
46
     * @brief Equal operator overloading
47
     * @param other DAP for comparison
48
     * @return True if DAPs string names are equal, otherwise returns false.
49
     */
28
    bool operator== (const DAP& other) const;
50
    bool operator== (const DAP& other) const;
29
51
52
    /**
53
     * @brief Info text output suitable for << string streams and  WATCH
54
     * @return DAP string name
55
     */
30
    std::string info() const;
56
    std::string info() const;
31
57
58
    /**
59
     * @brief Gets DAP string name representation
60
     * @return DAP string
61
     */
32
    const std::string& getName() const;
62
    const std::string& getName() const;
63
64
    /**
65
     * @brief Sets DAP string representation to a new value
66
     * @param name A new DAP string value
67
     */
33
    void setName(const std::string& name);
68
    void setName(const std::string& name);
34
69
35
  private:
70
  protected:
71
    /**
72
     * @brief Attribute holding DAP name
73
     * DAP is basically wrapper around string.
74
     */
36
    std::string name;
75
    std::string name;
37
};
76
};
38
77
39
//Free function
78
//Free function
79
/**
80
 * << operator overload that feeds ostream DAP string representation.
81
 * @param os Resulting ostream
82
 * @param dap APNList class that is being converted to string
83
 * @return Infotext representing DAP
84
 */
40
std::ostream& operator<< (std::ostream& os, const DAP& dap);
85
std::ostream& operator<< (std::ostream& os, const DAP& dap);
41
86
42
87
43
#endif /* DAP_H_ */
88
#endif /* DAP_H_ */