From b9c99ae26586683cef5f5b950396d6f3fe4dc703 Mon Sep 17 00:00:00 2001 From: caiyuzheng <290198252@qq.com> Date: Thu, 28 May 2020 23:20:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=91=BD=E4=BB=A4=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 28 ++++++++-------------------- general/src/encrypt/aes.cpp | 2 +- general/src/pattern/cmd.hpp | 25 +++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 general/src/pattern/cmd.hpp diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 5f356bd..89a1409 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -30,11 +30,10 @@ + - - + - - - - - + @@ -171,24 +158,25 @@ + + - + diff --git a/general/src/encrypt/aes.cpp b/general/src/encrypt/aes.cpp index e7da967..153da32 100644 --- a/general/src/encrypt/aes.cpp +++ b/general/src/encrypt/aes.cpp @@ -1131,6 +1131,6 @@ void AES::Decrypt(char const* in, char* result, size_t n, int iMode) pin += m_blockSize; presult += m_blockSize; } - } + } } diff --git a/general/src/pattern/cmd.hpp b/general/src/pattern/cmd.hpp new file mode 100644 index 0000000..f9eadde --- /dev/null +++ b/general/src/pattern/cmd.hpp @@ -0,0 +1,25 @@ +#define GENERAL_CMD_H +#include +template +class Command{ +public: + virtual int excute(T){ + return 0; + } +}; +template +class CommandBroker{ +public: + void AddCommand(Command order){ + + } + void DoCommand(){ + for (Order order : orderList) { + order.execute(); + } + orderList.clear(); + } +private: + std::vector mCommands; +}; +#endif \ No newline at end of file