fipa_services
Public Types | Public Member Functions | Static Public Member Functions | List of all members
fipa::services::ServiceLocation Class Reference

Class to describe the location of a service. More...

#include <ServiceLocator.hpp>

Public Types

enum  Field { SIGNATURE_TYPE = 0x01, SERVICE_SIGNATURE = 0x02, SERVICE_ADDRESS = 0x04 }
 

Public Member Functions

 ServiceLocation ()
 
 ServiceLocation (const std::string &serviceAddress, const std::string &signatureType="", const std::string &serviceSignature="")
 
std::string getFieldContent (ServiceLocation::Field field) const
 
std::string getSignatureType () const
 
std::string getServiceSignature () const
 
std::string getServiceAddress () const
 
std::string toString () const
 
bool operator== (const ServiceLocation &other) const
 
std::string getProtocol () const
 

Static Public Member Functions

static ServiceLocation fromString (const std::string &locationString)
 

Detailed Description

Class to describe the location of a service.

Member Enumeration Documentation

◆ Field

Enumerator
SIGNATURE_TYPE 
SERVICE_SIGNATURE 
SERVICE_ADDRESS 

Constructor & Destructor Documentation

◆ ServiceLocation() [1/2]

fipa::services::ServiceLocation::ServiceLocation ( )
inline

The default constructor for service location

◆ ServiceLocation() [2/2]

fipa::services::ServiceLocation::ServiceLocation ( const std::string &  serviceAddress,
const std::string &  signatureType = "",
const std::string &  serviceSignature = "" 
)
inline

Member Function Documentation

◆ fromString()

ServiceLocation fipa::services::ServiceLocation::fromString ( const std::string &  locationString)
static

Create service location from string

Parameters
stringifiedservice location

◆ getFieldContent()

std::string fipa::services::ServiceLocation::getFieldContent ( ServiceLocation::Field  field) const

Get the content of a specific field

Parameters
fieldField for which the value should be retrieved
Returns
content of field

◆ getProtocol()

std::string fipa::services::ServiceLocation::getProtocol ( ) const

Helper function to retrieve the underlying transport protocol that is part of the service address

◆ getServiceAddress()

std::string fipa::services::ServiceLocation::getServiceAddress ( ) const
inline

Get the service address

Returns
service address

◆ getServiceSignature()

std::string fipa::services::ServiceLocation::getServiceSignature ( ) const
inline

Get the service signature

Returns
service signature

◆ getSignatureType()

std::string fipa::services::ServiceLocation::getSignatureType ( ) const
inline

Get the signature type of this service location

Returns
signature type

◆ operator==()

bool fipa::services::ServiceLocation::operator== ( const ServiceLocation other) const

Equals operator for service location

Returns
true if service locations are equal

◆ toString()

std::string fipa::services::ServiceLocation::toString ( ) const

Convert to ServiceLocation to string

Returns
stringified objects

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