EpcTools
An event based multi-threaded C++ development framework.
Public Member Functions | Protected Member Functions | List of all members
FDExtractor Class Reference

A wrapper around a grouped AVP used to locate and access the AVP's in the parent message or grouped AVP. More...

#include <efd.h>

Inheritance diagram for FDExtractor:
FDExtractorBase

Public Member Functions

 FDExtractor ()
 Default constructor. More...
 
 FDExtractor (FDMessage &msg)
 Constructs an extractor from a message (answer or request). More...
 
 FDExtractor (FDDictionaryEntryCommand &de)
 Class constructor. More...
 
 FDExtractor (FDExtractor &parent, FDDictionaryEntryAVP &de)
 Class constructor. More...
 
virtual ~FDExtractor ()
 Class destructor. More...
 
eFDExtractorType getExtractorType ()
 Retrieves the extractor type. More...
 
Void setReference (FDMessage &msg)
 Assigns the reference that this extractor is associated wtih. More...
 
Void setReference (FDAvp &avp)
 Assigns the reference that this extractor is associated wtih. More...
 
Void setReference (msg_or_avp *m)
 Assigns the reference that this extractor is associated wtih. More...
 
FDExtractorgetParent ()
 retrieves the parent of this extractor. More...
 
msg_or_avp * getReference ()
 retrieves the freeDiameter reference for this extractor. More...
 
Void add (FDExtractorBase &base)
 Adds a child extractor to this extractor. More...
 
Bool exists (Bool skipResolve=false)
 Determines if this extractor exists in the underlying freeDiameter message or grouped AVP. More...
 
Void dump ()
 Prints the underlying freeDiameter message or AVP to stdout. More...
 
Bool getJson (std::string &json)
 Retrieves a JSON representation of the message or AVP. More...
 
- Public Member Functions inherited from FDExtractorBase
 FDExtractorBase (FDDictionaryEntryAVP *de)
 Class constructor. More...
 
virtual ~FDExtractorBase ()
 Class destructor. More...
 
Int getIndex ()
 Retrieves the location of the AVP in the parent (message or AVP). More...
 
Int setIndex (Int idx)
 Assigns the index of this AVP. More...
 
Bool getResolved ()
 Retrieves the resolved status. Being resolved means that the underlying freeDiameter AVP has been located and assigned. More...
 
Bool setResolved (Bool resolved=true)
 Assigns the resolved state. More...
 
Bool exists ()
 Retrieves status indicating if the AVP is present/exists in the message. More...
 
FDDictionaryEntryAVPgetDictionaryEntry ()
 Retrieves the dictionary entry associated with the AVP. More...
 

Protected Member Functions

Void resolve ()
 Locates this AVP in the freeDiameter message or grouped AVP. More...
 

Detailed Description

A wrapper around a grouped AVP used to locate and access the AVP's in the parent message or grouped AVP.

Constructor & Destructor Documentation

◆ FDExtractor() [1/4]

FDExtractor::FDExtractor ( )

Default constructor.

◆ FDExtractor() [2/4]

FDExtractor::FDExtractor ( FDMessage msg)

Constructs an extractor from a message (answer or request).

Parameters
msgthe message to encapsulate.

◆ FDExtractor() [3/4]

FDExtractor::FDExtractor ( FDDictionaryEntryCommand de)

Class constructor.

Parameters
dethe command dictionary entry for this extractor.

◆ FDExtractor() [4/4]

FDExtractor::FDExtractor ( FDExtractor parent,
FDDictionaryEntryAVP de 
)

Class constructor.

Parameters
parentthe parent extractor object.
dethe AVP dictionary entry for this extractor.

◆ ~FDExtractor()

FDExtractor::~FDExtractor ( )
virtual

Class destructor.

Member Function Documentation

◆ add()

Void FDExtractor::add ( FDExtractorBase base)

Adds a child extractor to this extractor.

◆ dump()

Void FDExtractor::dump ( )

Prints the underlying freeDiameter message or AVP to stdout.

◆ exists()

Bool FDExtractor::exists ( Bool  skipResolve = false)

Determines if this extractor exists in the underlying freeDiameter message or grouped AVP.

Returns
True if the AVP has been found in the message or grouped AVP.

◆ getExtractorType()

eFDExtractorType FDExtractor::getExtractorType ( )
inlinevirtual

Retrieves the extractor type.

Returns
the extractor type.

Implements FDExtractorBase.

◆ getJson()

Bool FDExtractor::getJson ( std::string &  json)

Retrieves a JSON representation of the message or AVP.

Parameters
jsonthe destination for the JSON representation.
Returns
True if the message or AVP was successfully converted to JSON, otherwise False.

◆ getParent()

FDExtractor* FDExtractor::getParent ( )
inline

retrieves the parent of this extractor.

Returns
pointer to the parent extractor.

◆ getReference()

msg_or_avp * FDExtractor::getReference ( )

retrieves the freeDiameter reference for this extractor.

Returns
the freeDiameter message or AVP reference pointer.

◆ resolve()

Void FDExtractor::resolve ( )
protected

Locates this AVP in the freeDiameter message or grouped AVP.

◆ setReference() [1/3]

Void FDExtractor::setReference ( FDAvp avp)
inline

Assigns the reference that this extractor is associated wtih.

Parameters
avpa AVP reference.

◆ setReference() [2/3]

Void FDExtractor::setReference ( FDMessage msg)
inline

Assigns the reference that this extractor is associated wtih.

Parameters
msga message reference.

◆ setReference() [3/3]

Void FDExtractor::setReference ( msg_or_avp *  m)
inline

Assigns the reference that this extractor is associated wtih.

Parameters
ma freeDiameter AVP or message pointer.

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