ROSE 0.11.145.147
BoostSerializer.h
1#ifndef Rosebud_BoostSerializer_H
2#define Rosebud_BoostSerializer_H
3#include <Rosebud/Serializer.h>
4
5namespace Rosebud {
6
11public:
12 using Ptr = std::shared_ptr<BoostSerializer>;
13
14protected:
16
17public:
18 static Ptr instance();
19 virtual std::string name() const override;
20 virtual std::string purpose() const override;
21 virtual bool isSerializable(const Ast::ClassPtr&) const override;
22
23 virtual void genPrologue(std::ostream &header, std::ostream &impl, const Ast::ClassPtr&, const Hierarchy&,
24 const Generator&) const override;
25 virtual void genBody(std::ostream &header, std::ostream &impl, const Ast::ClassPtr&, const Hierarchy&,
26 const Generator&) const override;
27 virtual void genEpilogue(std::ostream &header, std::ostream &impl, const Ast::ClassPtr&, const Hierarchy&,
28 const Generator&) const override;
29};
30
31} // namespace
32#endif
Class serializer using Boost Serialization.
virtual std::string purpose() const override
Single-line description for the serializer.
virtual bool isSerializable(const Ast::ClassPtr &) const override
Determines if a class should be serialized.
virtual void genBody(std::ostream &header, std::ostream &impl, const Ast::ClassPtr &, const Hierarchy &, const Generator &) const override
Generate main serialization code for the specified class.
virtual void genPrologue(std::ostream &header, std::ostream &impl, const Ast::ClassPtr &, const Hierarchy &, const Generator &) const override
Generate prologue code.
virtual void genEpilogue(std::ostream &header, std::ostream &impl, const Ast::ClassPtr &, const Hierarchy &, const Generator &) const override
Generate epilogue code.
virtual std::string name() const override
Every serializer has a unique name.
Base class for backend code generators.
Definition Generator.h:10
Base class for serialization generators.
Definition Serializer.h:13
Graph containing user-defined vertices and edges.
Definition Graph.h:634
std::shared_ptr< Class > ClassPtr
Shared-ownership pointer to a Class.
Rosebud is a tool to generate abstract syntax trees.
Definition Ast.h:14