Blame view

src/connection.h 2.35 KB
30448f62   Peter M. Groen   Replace Qt with s...
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
  #pragma once
  
  #include <string>
  
  namespace osdev {
  namespace components {
  
  /*
   *   _________________________________________
   *  / In a hierarchy every employee tends to  \
   *  | rise to his level of incompetence ...   |
   *  | in time every post tends to be occupied |
   *  | by an employee who is incompetent to    |
   *  | carry out its duties ... Work is        |
   *  | accomplished by those employees who     |
   *  | have not yet reached their level of     |
   *  | incompetence.                           |
   *  |                                         |
   *  | -- Dr. Laurence J. Peter, "The Peter    |
   *  \ Principle"                              /
   *   -----------------------------------------
   *     \
   *      \
   *          .--.
   *         |o_o |
   *         |:_/ |
   *        //   \ \
   *       (|     | )
   *      /'\_   _/`\
   *      \___)=(___/
   ***********************************************
   */
  /*!
   * \brief The Connection class is a representation of the connection section in the Modelmapper configurator
   */
  class Connection
  {
  public:
      Connection();
      /*!
       * \brief CTor
       * \param _source   - The object we want to connect from
       * \param _target   - The object we want to connect to
       * \param _output   - The endpoint on the SOURCE
       * \param _input    - The endpoint on the TARGET
       */
      Connection(const std::string& _source, const std::string& _target, const std::string& _output, const std::string& _input);
  
      // GETTERS
      /*!
       * \brief source
       * \return The object-ID we want to connect from as std::string
       */
      const std::string& source() const { return m_source; }
  
      /*!
       * \brief target
       * \return The object-ID we want to connect to as std::string
       */
      const std::string& target() const { return m_target; }
  
      /*!
       * \brief output
       * \return The output endpoint on the Source object
       */
      const std::string& output() const { return m_output; }
  
      /*!
       * \brief input
       * \return The input endpoint on the Target object.
       */
      const std::string& input() const { return m_input; }
  
  private:
      std::string m_source; ///< The object we want to connect from
      std::string m_target; ///< The object we want to connect to
      std::string m_input;  ///< The endpoint ont the SOURCE
      std::string m_output; ///< The endpoint ont the TARGET
  };
  
  } // namespace components
  } // namespace osdev