mirror of
https://github.com/corda/corda.git
synced 2025-06-23 09:25:36 +00:00
NOTICK - Move CompositeFactory into amqp::internal namespace
This commit is contained in:
@ -1,48 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
#include "types.h"
|
||||
#include "amqp/schema/Schema.h"
|
||||
#include "amqp/schema/Envelope.h"
|
||||
#include "amqp/schema/Composite.h"
|
||||
#include "amqp/consumer/PropertyReader.h"
|
||||
#include "amqp/consumer/CompositeReader.h"
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
class CompositeFactory {
|
||||
private :
|
||||
using SchemaPtr = uPtr<amqp::internal::schema::Schema>;
|
||||
using CompositePtr = uPtr<amqp::internal::schema::Composite>;
|
||||
using EnvelopePtr = uPtr<amqp::internal::schema::Envelope>;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
spStrMap_t<amqp::Reader> m_readersByType;
|
||||
spStrMap_t<amqp::Reader> m_readersByDescriptor;
|
||||
|
||||
public :
|
||||
CompositeFactory() = default;
|
||||
|
||||
void process (const SchemaPtr &);
|
||||
|
||||
const std::shared_ptr<amqp::Reader> byType (const std::string &);
|
||||
const std::shared_ptr<amqp::Reader> byDescriptor (const std::string &);
|
||||
|
||||
private :
|
||||
std::shared_ptr<amqp::Reader> process(const amqp::internal::schema::AMQPTypeNotation &);
|
||||
|
||||
std::shared_ptr<amqp::Reader>
|
||||
processComposite (const amqp::internal::schema::AMQPTypeNotation &);
|
||||
|
||||
std::shared_ptr<amqp::Reader>
|
||||
processRestricted (const amqp::internal::schema::AMQPTypeNotation &);
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
32
experimental/cpp-serializer/include/ICompositeFactory.h
Normal file
32
experimental/cpp-serializer/include/ICompositeFactory.h
Normal file
@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
#include "types.h"
|
||||
#include "amqp/schema/Schema.h"
|
||||
#include "amqp/schema/Envelope.h"
|
||||
#include "amqp/schema/Composite.h"
|
||||
#include "amqp/consumer/PropertyReader.h"
|
||||
#include "amqp/consumer/CompositeReader.h"
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
class ICompositeFactory {
|
||||
public :
|
||||
using SchemaPtr = uPtr<amqp::internal::schema::Schema>;
|
||||
|
||||
ICompositeFactory() = default;
|
||||
virtual ~ICompositeFactory() = default;
|
||||
|
||||
virtual void process (const SchemaPtr &) = 0;
|
||||
|
||||
virtual const std::shared_ptr<amqp::Reader> byType (const std::string &) = 0;
|
||||
virtual const std::shared_ptr<amqp::Reader> byDescriptor (const std::string &) = 0;
|
||||
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
Reference in New Issue
Block a user