Go to the documentation of this file.
   29 #define QA_IN "algin_" 
   34 #define QA_OUT "algout_" 
   64 #define QA_INPUT(Type, Name)                                                            \ 
   65 Q_PROPERTY(Type algin_##Name MEMBER m_algin_##Name READ getIn##Name WRITE setIn##Name)  \ 
   67     Type m_algin_##Name;                                                                \ 
   69     void setIn##Name (Type value){                                                      \ 
   70         this->m_algin_##Name = value;                                                   \ 
   72     Type getIn##Name () const{                                                          \ 
   73         return this->m_algin_##Name;                                                    \ 
   75     Type& getInRef##Name (){                                                            \ 
   76         return std::ref(this->m_algin_##Name);                                          \ 
   78     Type&& getInMove##Name (){                                                          \ 
   79         return std::move(this->m_algin_##Name);                                         \ 
  108 #define QA_INPUT_LIST(Type, Name)                                           \ 
  109 Q_PROPERTY(Type algin_##Name MEMBER m_algin_##Name WRITE setIn##Name)       \ 
  111     Type m_algin_##Name;                                                    \ 
  112     QList<Type> m_listin_##Name;                                            \ 
  114     void setIn##Name (Type value){                                          \ 
  115         this->m_algin_##Name = value;                                       \ 
  116         this->m_listin_##Name << value;                                     \ 
  118     QList<Type> getIn##Name () const{                                       \ 
  119         return this->m_listin_##Name;                                       \ 
  121     QList<Type>& getInRef##Name (){                                         \ 
  122         return std::ref(this->m_listin_##Name);                             \ 
  124     QList<Type>&& getInMove##Name (){                                       \ 
  125         return std::move(this->m_listin_##Name);                            \ 
  142 #define QA_INPUT_VEC(Type, Name)                                                \ 
  143 Q_PROPERTY(Type algin_##Name MEMBER m_algin_##Name WRITE setIn##Name)           \ 
  145     Type m_algin_##Name;                                                        \ 
  146     QVector<Type> m_vecin_##Name;                                               \ 
  148     void setIn##Name (Type value){                                              \ 
  149         this->m_algin_##Name = value;                                           \ 
  150         this->m_vecin_##Name << value;                                          \ 
  152     QVector<Type> getIn##Name () const{                                         \ 
  153         return this->m_vecin_##Name;                                            \ 
  155     QVector<Type>& getInRef##Name (){                                           \ 
  156         return std::ref(this->m_vecin_##Name);                                  \ 
  158     QVector<Type>&& getInMove##Name (){                                         \ 
  159         return std::move(this->m_vecin_##Name);                                 \ 
  181 #define QA_OUTPUT(Type, Name)                                                                   \ 
  182 Q_PROPERTY(Type algout_##Name MEMBER m_algout_##Name READ getOut##Name WRITE setOut##Name)      \ 
  184     Type m_algout_##Name;                                                                       \ 
  186     void setOut##Name (Type value){                                                             \ 
  187         this->m_algout_##Name = value;                                                          \ 
  190     Type getOut##Name () const{                                                                 \ 
  191         return this->m_algout_##Name;                                                           \ 
  193     Type& getOutRef##Name (){                                                                   \ 
  194         return std::ref(this->m_algout_##Name);                                                 \ 
  196     Type&& getOutMove##Name (){                                                                 \ 
  197         return std::move(this->m_algout_##Name);                                                \ 
  221 #define QA_PARAMETER(Type, Name, Default)                                                   \ 
  222 Q_PROPERTY(Type par_##Name READ get##Name WRITE set##Name)                                  \ 
  224     Type par_##Name = Default;                                                              \ 
  226     void set##Name (Type value){                                                            \ 
  227     this->par_##Name = value;                                                               \ 
  230     return this->par_##Name;                                                                \ 
  244 #ifndef QA_CTOR_INHERIT 
  245 #define QA_CTOR_INHERIT                                                                     \ 
  247     using QAlgorithm::QAlgorithm;                                                           \ 
  249     using QAlgorithm::setup; 
  272 #ifndef QA_IMPL_CREATE 
  273 #define QA_IMPL_CREATE(ClassName)                                                                   \ 
  275     static inline QSharedPointer<ClassName> create(QAPropertyMap parameters = QAPropertyMap(),      \ 
  276                                                     QObject* parent = Q_NULLPTR){                   \ 
  277         auto ptr = QSharedPointer<ClassName>(new ClassName(parent), &QObject::deleteLater);         \ 
  279         if(!parameters.isEmpty()){                                                                  \ 
  280             ptr->setParameters(parameters);                                                         \