MNE-CPP  beta 1.0
rawcommand.cpp
Go to the documentation of this file.
1 //=============================================================================================================
36 //*************************************************************************************************************
37 //=============================================================================================================
38 // Includes
39 //=============================================================================================================
40 
41 #include "rawcommand.h"
42 
43 
44 //*************************************************************************************************************
45 //=============================================================================================================
46 // USED NAMESPACES
47 //=============================================================================================================
48 
49 using namespace RTCOMMANDLIB;
50 
51 
52 //*************************************************************************************************************
53 //=============================================================================================================
54 // DEFINE MEMBER METHODS
55 //=============================================================================================================
56 
57 RawCommand::RawCommand(QObject *parent)
58 : QObject(parent)
59 {
60 }
61 
62 
63 //*************************************************************************************************************
64 
65 RawCommand::RawCommand(const QString &p_sCommand, bool p_bIsJson, QObject *parent)
66 : QObject(parent)
67 , m_sCommand(p_sCommand)
68 , m_bIsJson(p_bIsJson)
69 {
70 }
71 
72 
73 //*************************************************************************************************************
74 
75 RawCommand::RawCommand(const RawCommand &p_rawCommand)
76 : QObject(p_rawCommand.parent())
77 , m_sCommand(p_rawCommand.m_sCommand)
78 , m_bIsJson(p_rawCommand.m_bIsJson)
79 , m_qListRawParameters(p_rawCommand.m_qListRawParameters)
80 {
81 
82 }
83 
84 
85 //*************************************************************************************************************
86 
88 {
89  emit executed(m_qListRawParameters);
90 }
91 
92 
93 //*************************************************************************************************************
94 
96 {
97  if (this != &rhs) // protect against invalid self-assignment
98  {
99  m_sCommand = rhs.m_sCommand;
100  m_bIsJson = rhs.m_bIsJson;
101  m_qListRawParameters = rhs.m_qListRawParameters;
102  }
103  // to support chained assignment operators (a=b=c), always return *this
104  return *this;
105 }
RawCommand(QObject *parent=0)
Definition: rawcommand.cpp:57
RawCommand & operator=(const RawCommand &rhs)
Definition: rawcommand.cpp:95
void executed(QList< QString > p_qListParameters)
Declaration of the RawCommand Class.
virtual void execute()
Definition: rawcommand.cpp:87