diff options
author | Yatian XU <yatian.xu@nokia-sbell.com> | 2019-09-10 13:51:48 +0800 |
---|---|---|
committer | Yatian XU <yatian.xu@nokia-sbell.com> | 2019-09-10 06:03:34 +0000 |
commit | 7966a4012c0eb263936e1b284801a79c5cb607a7 (patch) | |
tree | 87b9308ccfb01e19ddf2f3dd4cbb16523901c6d7 /veslibrary/ves_cpplibrary/src/lib/transport/XMemQueue.h | |
parent | be6db99ca9b99a3b72b71a8fb1f5fcd9fc8aaf8f (diff) |
Contribute C++ implement of VES spec 7.0.1 to ONAP/vnfsdk:
Part4: transport library.
Issue-ID: VNFSDK-466
Signed-off-by: Yatian XU <yatian.xu@nokia-sbell.com>
Change-Id: Icde7b8dad91002a8208ff0d058a44c78aa910cd7
Diffstat (limited to 'veslibrary/ves_cpplibrary/src/lib/transport/XMemQueue.h')
-rwxr-xr-x | veslibrary/ves_cpplibrary/src/lib/transport/XMemQueue.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/veslibrary/ves_cpplibrary/src/lib/transport/XMemQueue.h b/veslibrary/ves_cpplibrary/src/lib/transport/XMemQueue.h new file mode 100755 index 0000000..0a1a651 --- /dev/null +++ b/veslibrary/ves_cpplibrary/src/lib/transport/XMemQueue.h @@ -0,0 +1,24 @@ +#pragma once
+
+#include "XQueue.h"
+#include <queue>
+
+namespace vagt
+{
+ namespace queue
+ {
+ class XMemQueue: public XQueue
+ {
+ public:
+ XMemQueue(int capacity);
+ virtual bool empty() override;
+ virtual XErrorCode push(const std::string & val) override;
+ virtual void pop() override;
+ virtual std::string front() override;
+ private:
+ int capacity_;
+ int size_;
+ std::queue<std::string> queue_;
+ };
+ }
+}
|