mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
const adjustments
This commit is contained in:
parent
203df4fa6b
commit
eee16e1177
6 changed files with 22 additions and 22 deletions
|
@ -58,7 +58,7 @@ analyzer::Tag Component::Tag() const
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Component::Describe(ODesc* d)
|
void Component::Describe(ODesc* d) const
|
||||||
{
|
{
|
||||||
plugin::Component::Describe(d);
|
plugin::Component::Describe(d);
|
||||||
d->Add(name);
|
d->Add(name);
|
||||||
|
|
|
@ -120,7 +120,7 @@ public:
|
||||||
* Generates a human-readable description of the component's main
|
* Generates a human-readable description of the component's main
|
||||||
* parameters. This goes into the output of \c "bro -NN".
|
* parameters. This goes into the output of \c "bro -NN".
|
||||||
*/
|
*/
|
||||||
virtual void Describe(ODesc* d);
|
virtual void Describe(ODesc* d) const;
|
||||||
|
|
||||||
Component& operator=(const Component& other);
|
Component& operator=(const Component& other);
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ component::Type Component::Type() const
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Component::Describe(ODesc* d)
|
void Component::Describe(ODesc* d) const
|
||||||
{
|
{
|
||||||
d->Add(" ");
|
d->Add(" ");
|
||||||
d->Add("[");
|
d->Add("[");
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
*
|
*
|
||||||
* @param d The description object to use.
|
* @param d The description object to use.
|
||||||
*/
|
*/
|
||||||
virtual void Describe(ODesc* d);
|
virtual void Describe(ODesc* d) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
component::Type type;
|
component::Type type;
|
||||||
|
|
|
@ -59,7 +59,7 @@ Plugin::~Plugin()
|
||||||
delete [] description;
|
delete [] description;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* Plugin::Name()
|
const char* Plugin::Name() const
|
||||||
{
|
{
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ void Plugin::SetName(const char* arg_name)
|
||||||
name = copy_string(arg_name);
|
name = copy_string(arg_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* Plugin::Description()
|
const char* Plugin::Description() const
|
||||||
{
|
{
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ void Plugin::SetDescription(const char* arg_description)
|
||||||
description = copy_string(arg_description);
|
description = copy_string(arg_description);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Plugin::Version()
|
int Plugin::Version() const
|
||||||
{
|
{
|
||||||
return dynamic ? version : 0;
|
return dynamic ? version : 0;
|
||||||
}
|
}
|
||||||
|
@ -89,12 +89,12 @@ void Plugin::SetVersion(int arg_version)
|
||||||
version = arg_version;
|
version = arg_version;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Plugin::APIVersion()
|
int Plugin::APIVersion() const
|
||||||
{
|
{
|
||||||
return api_version;
|
return api_version;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Plugin::DynamicPlugin()
|
bool Plugin::DynamicPlugin() const
|
||||||
{
|
{
|
||||||
return dynamic;
|
return dynamic;
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ void Plugin::InitPostScript()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Plugin::bif_item_list Plugin::BifItems()
|
Plugin::bif_item_list Plugin::BifItems() const
|
||||||
{
|
{
|
||||||
bif_item_list l1 = bif_items;
|
bif_item_list l1 = bif_items;
|
||||||
bif_item_list l2 = CustomBifItems();
|
bif_item_list l2 = CustomBifItems();
|
||||||
|
@ -138,7 +138,7 @@ Plugin::bif_item_list Plugin::BifItems()
|
||||||
return l1;
|
return l1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Plugin::bif_item_list Plugin::CustomBifItems()
|
Plugin::bif_item_list Plugin::CustomBifItems() const
|
||||||
{
|
{
|
||||||
return bif_item_list();
|
return bif_item_list();
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ void Plugin::Done()
|
||||||
components.clear();
|
components.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
Plugin::component_list Plugin::Components()
|
Plugin::component_list Plugin::Components() const
|
||||||
{
|
{
|
||||||
return components;
|
return components;
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ void Plugin::AddBifInitFunction(bif_init_func c)
|
||||||
bif_inits.push_back(c);
|
bif_inits.push_back(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plugin::Describe(ODesc* d)
|
void Plugin::Describe(ODesc* d) const
|
||||||
{
|
{
|
||||||
d->Add("Plugin: ");
|
d->Add("Plugin: ");
|
||||||
d->Add(name);
|
d->Add(name);
|
||||||
|
|
|
@ -102,24 +102,24 @@ public:
|
||||||
/**
|
/**
|
||||||
* Returns the name of the plugin.
|
* Returns the name of the plugin.
|
||||||
*/
|
*/
|
||||||
const char* Name();
|
const char* Name() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a short textual description of the plugin, if provided.
|
* Returns a short textual description of the plugin, if provided.
|
||||||
*/
|
*/
|
||||||
const char* Description();
|
const char* Description() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the version of the plugin. Version are only meaningful for
|
* Returns the version of the plugin. Version are only meaningful for
|
||||||
* dynamically compiled plugins; for statically compiled ones, this
|
* dynamically compiled plugins; for statically compiled ones, this
|
||||||
* will always return 0.
|
* will always return 0.
|
||||||
*/
|
*/
|
||||||
int Version();
|
int Version() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if this is a dynamically linked in plugin.
|
* Returns true if this is a dynamically linked in plugin.
|
||||||
*/
|
*/
|
||||||
bool DynamicPlugin();
|
bool DynamicPlugin() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the internal API version that this plugin relies on. Only
|
* Returns the internal API version that this plugin relies on. Only
|
||||||
|
@ -128,18 +128,18 @@ public:
|
||||||
* dynamically loaded plugins may cause a mismatch if they were
|
* dynamically loaded plugins may cause a mismatch if they were
|
||||||
* compiled for a different Bro version.
|
* compiled for a different Bro version.
|
||||||
*/
|
*/
|
||||||
int APIVersion();
|
int APIVersion() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all components the plugin provides.
|
* Returns a list of all components the plugin provides.
|
||||||
*/
|
*/
|
||||||
component_list Components();
|
component_list Components() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all BiF items that the plugin provides. This
|
* Returns a list of all BiF items that the plugin provides. This
|
||||||
* must be called only after InitBif() has been executed.
|
* must be called only after InitBif() has been executed.
|
||||||
*/
|
*/
|
||||||
bif_item_list BifItems();
|
bif_item_list BifItems() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* First-stage initialization of the plugin called early during Bro's
|
* First-stage initialization of the plugin called early during Bro's
|
||||||
|
@ -171,7 +171,7 @@ public:
|
||||||
* is disabled, the rendering will include a list of all components
|
* is disabled, the rendering will include a list of all components
|
||||||
* and BiF items.
|
* and BiF items.
|
||||||
*/
|
*/
|
||||||
void Describe(ODesc* d);
|
void Describe(ODesc* d) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef std::list<std::pair<const char*, int> > bif_init_func_result;
|
typedef std::list<std::pair<const char*, int> > bif_init_func_result;
|
||||||
|
@ -225,7 +225,7 @@ protected:
|
||||||
* for informational purpuses only and will show up in the result of
|
* for informational purpuses only and will show up in the result of
|
||||||
* BifItems() as well as in the Describe() output.
|
* BifItems() as well as in the Describe() output.
|
||||||
*/
|
*/
|
||||||
virtual bif_item_list CustomBifItems() ;
|
virtual bif_item_list CustomBifItems() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal function adding an entry point for registering
|
* Internal function adding an entry point for registering
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue