mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Reformat Zeek in Spicy style
This largely copies over Spicy's `.clang-format` configuration file. The one place where we deviate is header include order since Zeek depends on headers being included in a certain order.
This commit is contained in:
parent
7b8e7ed72c
commit
f5a76c1aed
786 changed files with 131714 additions and 153609 deletions
|
@ -5,8 +5,7 @@
|
|||
#include "zeek/Tag.h"
|
||||
#include "zeek/plugin/Component.h"
|
||||
|
||||
namespace zeek::logging
|
||||
{
|
||||
namespace zeek::logging {
|
||||
|
||||
class WriterFrontend;
|
||||
class WriterBackend;
|
||||
|
@ -14,50 +13,49 @@ class WriterBackend;
|
|||
/**
|
||||
* Component description for plugins providing log writers.
|
||||
*/
|
||||
class Component : public plugin::Component
|
||||
{
|
||||
class Component : public plugin::Component {
|
||||
public:
|
||||
using factory_callback = WriterBackend* (*)(WriterFrontend* frontend);
|
||||
using factory_callback = WriterBackend* (*)(WriterFrontend* frontend);
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param name The name of the provided writer. This name is used
|
||||
* across the system to identify the writer.
|
||||
*
|
||||
* @param factory A factory function to instantiate instances of the
|
||||
* writers's class, which must be derived directly or indirectly from
|
||||
* logging::WriterBackend. This is typically a static \c Instantiate()
|
||||
* method inside the class that just allocates and returns a new
|
||||
* instance.
|
||||
*/
|
||||
Component(const std::string& name, factory_callback factory);
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param name The name of the provided writer. This name is used
|
||||
* across the system to identify the writer.
|
||||
*
|
||||
* @param factory A factory function to instantiate instances of the
|
||||
* writers's class, which must be derived directly or indirectly from
|
||||
* logging::WriterBackend. This is typically a static \c Instantiate()
|
||||
* method inside the class that just allocates and returns a new
|
||||
* instance.
|
||||
*/
|
||||
Component(const std::string& name, factory_callback factory);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
~Component() override = default;
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
~Component() override = default;
|
||||
|
||||
/**
|
||||
* Initialization function. This function has to be called before any
|
||||
* plugin component functionality is used; it is used to add the
|
||||
* plugin component to the list of components and to initialize tags
|
||||
*/
|
||||
void Initialize() override;
|
||||
/**
|
||||
* Initialization function. This function has to be called before any
|
||||
* plugin component functionality is used; it is used to add the
|
||||
* plugin component to the list of components and to initialize tags
|
||||
*/
|
||||
void Initialize() override;
|
||||
|
||||
/**
|
||||
* Returns the writer's factory function.
|
||||
*/
|
||||
factory_callback Factory() const { return factory; }
|
||||
/**
|
||||
* Returns the writer's factory function.
|
||||
*/
|
||||
factory_callback Factory() const { return factory; }
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Overridden from plugin::Component.
|
||||
*/
|
||||
void DoDescribe(ODesc* d) const override;
|
||||
/**
|
||||
* Overridden from plugin::Component.
|
||||
*/
|
||||
void DoDescribe(ODesc* d) const override;
|
||||
|
||||
private:
|
||||
factory_callback factory;
|
||||
};
|
||||
factory_callback factory;
|
||||
};
|
||||
|
||||
} // namespace zeek::logging
|
||||
} // namespace zeek::logging
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue