Myra Canyon  v0.0.1-768
network control
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Myra::Traffic::Types Class Referencefinal

A std::set<> of Traffic::Type. More...

#include "Traffic.hpp"

Inheritance diagram for Myra::Traffic::Types:
Collaboration diagram for Myra::Traffic::Types:

Public Member Functions

bool contains (const Type t) const
 Determine if the set contains the type t. More...
 
bool does_not_contain (const Type t) const
 Determine if the set lacks the type t. More...
 
bool xreplace (const Type old_type, const Type new_type)
 Remove old_type (if it exists) and insert new_type. More...
 
std::string to_string (void) const
 Convert the set into a single readable text string. More...
 

Public Attributes

keys
 STL member. More...
 

Detailed Description

A std::set<> of Traffic::Type.

Used by Flow to track things we've discovered about specific traffic flows. Usually this is accessed through the member Myra::Flow::traffic_types.

Member Function Documentation

bool Myra::Traffic::Types::contains ( const Type  t) const
inline

Determine if the set contains the type t.

For example:

if ( flow.traffic_types.contains( Traffic::Type::HTTP )
{
// ...
}

Here is the caller graph for this function:

bool Myra::Traffic::Types::does_not_contain ( const Type  t) const
inline

Determine if the set lacks the type t.

For example:

if ( flow.traffic_types.does_not_contain( Traffic::Type::FlowEnded )
{
// ...
}

Here is the call graph for this function:

Here is the caller graph for this function:

std::string Myra::Traffic::Types::to_string ( void  ) const
inline

Convert the set into a single readable text string.

For example, this could return FlowStart+IP+IPv4+TCP+HTTP.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Myra::Traffic::Types::xreplace ( const Type  old_type,
const Type  new_type 
)
inline

Remove old_type (if it exists) and insert new_type.

Note that new_type will be inserted even if old_type did not exist in the set.

Returns
true if old_type was removed
false if old_type wasn't in the set

For example:

flow.traffic_types.replace( Traffic::Type::Unknown, Traffic::Type::SSH );

Member Data Documentation

K std::set< K >::keys
inherited

STL member.


The documentation for this class was generated from the following file: