OSDN Git Service

attrproc.hpp と attrprocfactory.hpp を追加するのを忘れていたので追加
authorstarg <starg@users.osdn.me>
Tue, 13 Sep 2016 17:08:17 +0000 (02:08 +0900)
committerstarg <starg@users.osdn.me>
Tue, 13 Sep 2016 17:08:17 +0000 (02:08 +0900)
include/irprocessor/attrproc.hpp [new file with mode: 0644]
include/irprocessor/attrprocfactory.hpp [new file with mode: 0644]

diff --git a/include/irprocessor/attrproc.hpp b/include/irprocessor/attrproc.hpp
new file mode 100644 (file)
index 0000000..7bb177e
--- /dev/null
@@ -0,0 +1,22 @@
+
+#pragma once
+
+#include <ir/event.hpp>
+
+namespace YAMML
+{
+
+namespace IRProcessor
+{
+
+class IAttributeProcessor
+{
+public:
+    virtual ~IAttributeProcessor() = default;
+
+    virtual void TransformEvent(IR::Event& ev) = 0;
+};
+
+} // namespace IRProcessor
+
+} // namespace YAMML
diff --git a/include/irprocessor/attrprocfactory.hpp b/include/irprocessor/attrprocfactory.hpp
new file mode 100644 (file)
index 0000000..3bea672
--- /dev/null
@@ -0,0 +1,28 @@
+
+#pragma once
+
+#include <memory>
+#include <string>
+
+#include <ast/attribute.hpp>
+
+#include <irprocessor/attrproc.hpp>
+
+namespace YAMML
+{
+
+namespace IRProcessor
+{
+
+class IAttributeProcessorFactory
+{
+public:
+    virtual ~IAttributeProcessorFactory() = default;
+
+    virtual std::unique_ptr<IAttributeProcessor> CreateProcessor(const AST::Attribute& ast) = 0;
+    virtual std::string GetAttributeName() const = 0;
+};
+
+} // namespace IRProcessor
+
+} // namespace YAMML