ANNA Suite  2020b
Multipurpose development suite for Telco applications
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
anna::diameter::codec::Engine Class Reference

#include <Engine.hpp>

Inheritance diagram for anna::diameter::codec::Engine:
Inheritance graph
[legend]
Collaboration diagram for anna::diameter::codec::Engine:
Collaboration graph
[legend]

Public Member Functions

 Engine (const char *className, const stack::Dictionary *dictionary)
 
void releaseAvp (Avp *avp)
 
void releaseMessage (Message *message)
 
- Public Member Functions inherited from anna::diameter::codec::EngineImpl
AvpcreateAvp (const AvpId *id) noexcept(false)
 
MessagecreateMessage (const CommandId *id) noexcept(false)
 
 EngineImpl (const char *className, const stack::Dictionary *dictionary)
 
virtual ~EngineImpl ()
 
const stack::DictionarygetDictionary () const
 
void setValidationDepth (const ValidationDepth::_v validationDepth)
 
ValidationDepth::_v getValidationDepth () const
 
void ignoreFlagsOnValidation (bool ignoreFlags)
 
bool ignoreFlagsOnValidation () const
 
void setValidationMode (const ValidationMode::_v validationMode)
 
ValidationMode::_v getValidationMode () const
 
void setFixMode (const FixMode::_v fixMode)
 
FixMode::_v getFixMode () const
 
void setSingleFailedAVP (bool single=true)
 
bool getSingleFailedAVP () const
 
AvpcreateAvp (AvpId id) noexcept(false)
 
AvpcreateAvp () noexcept(false)
 
MessagecreateMessage (CommandId id) noexcept(false)
 
MessagecreateMessage () noexcept(false)
 
MessagecreateMessage (const std::string &xmlPathFile_or_string, bool pathfile_or_string=true) noexcept(false)
 
virtual std::string asString (void) const
 
virtual anna::xml::NodeasXML (anna::xml::Node *parent) const
 
AvpId avpIdForName (const char *name) noexcept(false)
 
CommandId commandIdForName (const char *name) noexcept(false)
 
- Public Member Functions inherited from anna::Component
virtual ~Component ()
 
const char * getClassName () const
 
- Public Member Functions inherited from anna::Mutex
 Mutex (const Mode::_v mode=Mode::Recursive)
 
virtual ~Mutex ()
 
virtual void lock () noexcept(false)
 
virtual void unlock ()
 
bool trylock () noexcept(false)
 
 operator const pthread_mutex_t * () const
 

Protected Member Functions

anna::diameter::codec::AvpallocateAvp ()
 
anna::diameter::codec::MessageallocateMessage ()
 
- Protected Member Functions inherited from anna::diameter::codec::EngineImpl
void validationAnomaly (const std::string &description) const noexcept(false)
 
- Protected Member Functions inherited from anna::Component
 Component (const char *className)
 
 Component (const Component &other)
 
- Protected Member Functions inherited from anna::Safe
 Safe ()
 

Protected Attributes

anna::Recycler< Avpa_avps
 
anna::Recycler< Messagea_messages
 
- Protected Attributes inherited from anna::Component
const std::string a_className
 

Friends

class Message
 
class Avp
 

Detailed Description

Standard inheritance for engine component implementation, allocating basic Avp and Message classes.

Constructor & Destructor Documentation

◆ Engine()

anna::diameter::codec::Engine::Engine ( const char *  className,
const stack::Dictionary dictionary 
)
inline

Constructor

Parameters
classNameLogical name for the class.
50 : EngineImpl(className, dictionary) {;}
EngineImpl(const char *className, const stack::Dictionary *dictionary)

Member Function Documentation

◆ allocateAvp()

anna::diameter::codec::Avp* anna::diameter::codec::Engine::allocateAvp ( )
inlineprotectedvirtual

Avp allocator method.

It is recommended to use anna::Recycler for Avps creation/releasing.

See also
anna::Recycler

Implements anna::diameter::codec::EngineImpl.

73 { return a_avps.create(); }
anna::Recycler< Avp > a_avps
Definition: Engine.hpp:70
Here is the call graph for this function:

◆ allocateMessage()

anna::diameter::codec::Message* anna::diameter::codec::Engine::allocateMessage ( )
inlineprotectedvirtual

Message allocator method.

It is recommended to use anna::Recycler for Message creation/releasing.

See also
anna::Recycler

Implements anna::diameter::codec::EngineImpl.

74 { return a_messages.create(); }
anna::Recycler< Message > a_messages
Definition: Engine.hpp:71
Here is the call graph for this function:

◆ releaseAvp()

void anna::diameter::codec::Engine::releaseAvp ( Avp )
inlinevirtual

Invoked to free Avps.

See also
anna::Recycler

Implements anna::diameter::codec::EngineImpl.

52  {
53  if(avp == NULL) return;
54 
55  //Avp* aux = static_cast <Avp*> (avp);
56 // avp/*aux*/->clear(); // free internal data-part storage specially for grouped avps which will release its childrens
57  a_avps.release(avp/*aux*/);
58  }
anna::Recycler< Avp > a_avps
Definition: Engine.hpp:70

◆ releaseMessage()

void anna::diameter::codec::Engine::releaseMessage ( Message )
inlinevirtual

Invoked to free Messages.

See also
anna::Recycler

Implements anna::diameter::codec::EngineImpl.

60  {
61  if(message == NULL) return;
62 
63  //Message* aux = static_cast <Message*> (message);
64 // message/*aux*/->clear(); // free internal data-part storage specially for childrens releasing
65  a_messages.release(message/*aux*/);
66  }
anna::Recycler< Message > a_messages
Definition: Engine.hpp:71

Friends And Related Function Documentation

◆ Avp

friend class Avp
friend

◆ Message

friend class Message
friend

Member Data Documentation

◆ a_avps

anna::Recycler<Avp> anna::diameter::codec::Engine::a_avps
protected

◆ a_messages

anna::Recycler<Message> anna::diameter::codec::Engine::a_messages
protected

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