const adjustments

This commit is contained in:
Jon Siwek 2013-06-07 13:19:36 -05:00
parent 203df4fa6b
commit eee16e1177
6 changed files with 22 additions and 22 deletions

View file

@ -58,7 +58,7 @@ analyzer::Tag Component::Tag() const
return tag;
}
void Component::Describe(ODesc* d)
void Component::Describe(ODesc* d) const
{
plugin::Component::Describe(d);
d->Add(name);

View file

@ -120,7 +120,7 @@ public:
* Generates a human-readable description of the component's main
* 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);

View file

@ -21,7 +21,7 @@ component::Type Component::Type() const
return type;
}
void Component::Describe(ODesc* d)
void Component::Describe(ODesc* d) const
{
d->Add(" ");
d->Add("[");

View file

@ -57,7 +57,7 @@ public:
*
* @param d The description object to use.
*/
virtual void Describe(ODesc* d);
virtual void Describe(ODesc* d) const;
private:
component::Type type;

View file

@ -59,7 +59,7 @@ Plugin::~Plugin()
delete [] description;
}
const char* Plugin::Name()
const char* Plugin::Name() const
{
return name;
}
@ -69,7 +69,7 @@ void Plugin::SetName(const char* arg_name)
name = copy_string(arg_name);
}
const char* Plugin::Description()
const char* Plugin::Description() const
{
return description;
}
@ -79,7 +79,7 @@ void Plugin::SetDescription(const char* arg_description)
description = copy_string(arg_description);
}
int Plugin::Version()
int Plugin::Version() const
{
return dynamic ? version : 0;
}
@ -89,12 +89,12 @@ void Plugin::SetVersion(int arg_version)
version = arg_version;
}
int Plugin::APIVersion()
int Plugin::APIVersion() const
{
return api_version;
}
bool Plugin::DynamicPlugin()
bool Plugin::DynamicPlugin() const
{
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 l2 = CustomBifItems();
@ -138,7 +138,7 @@ Plugin::bif_item_list Plugin::BifItems()
return l1;
}
Plugin::bif_item_list Plugin::CustomBifItems()
Plugin::bif_item_list Plugin::CustomBifItems() const
{
return bif_item_list();
}
@ -151,7 +151,7 @@ void Plugin::Done()
components.clear();
}
Plugin::component_list Plugin::Components()
Plugin::component_list Plugin::Components() const
{
return components;
}
@ -166,7 +166,7 @@ void Plugin::AddBifInitFunction(bif_init_func c)
bif_inits.push_back(c);
}
void Plugin::Describe(ODesc* d)
void Plugin::Describe(ODesc* d) const
{
d->Add("Plugin: ");
d->Add(name);

View file

@ -102,24 +102,24 @@ public:
/**
* Returns the name of the plugin.
*/
const char* Name();
const char* Name() const;
/**
* 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
* dynamically compiled plugins; for statically compiled ones, this
* will always return 0.
*/
int Version();
int Version() const;
/**
* 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
@ -128,18 +128,18 @@ public:
* dynamically loaded plugins may cause a mismatch if they were
* compiled for a different Bro version.
*/
int APIVersion();
int APIVersion() const;
/**
* 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
* 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
@ -171,7 +171,7 @@ public:
* is disabled, the rendering will include a list of all components
* and BiF items.
*/
void Describe(ODesc* d);
void Describe(ODesc* d) const;
protected:
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
* 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