gPTP Documentation
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InterfaceName Class Reference

#include <avbts_osnet.hpp>

Inheritance diagram for InterfaceName:
Inheritance graph
Collaboration diagram for InterfaceName:
Collaboration graph

Public Member Functions

 InterfaceName ()
 
 InterfaceName (char *name, int length)
 
bool operator== (const InterfaceName &cmp) const
 Operator '==' overloading method. Compares parameter cmp to the interface name. More...
 
bool operator< (const InterfaceName &cmp) const
 Operator '<' overloading method. Compares cmp to the interface name. More...
 
bool operator> (const InterfaceName &cmp) const
 Operator '>' overloading method. Compares cmp to the interface name. More...
 
bool toString (char *string, size_t length)
 Gets interface name from the class' internal variable. More...
 

Detailed Description

Class InterfaceName Provides methods for dealing with the network interface name

Todo:
: Destructor doesnt delete this->name.

Constructor & Destructor Documentation

InterfaceName::InterfaceName ( )
inline

Default constructor

InterfaceName::InterfaceName ( char *  name,
int  length 
)
inline

Initializes Interface name with name and size lenght+1

Parameters
name[in] String with the interface name
lengthSize of name

Member Function Documentation

bool InterfaceName::operator< ( const InterfaceName cmp) const
inline

Operator '<' overloading method. Compares cmp to the interface name.

Parameters
cmpString to be compared
Returns
TRUE if interface name is found to be less than cmd. FALSE otherwise
bool InterfaceName::operator== ( const InterfaceName cmp) const
inline

Operator '==' overloading method. Compares parameter cmp to the interface name.

Parameters
cmpString to be compared
Returns
TRUE if they are equal, FALSE otherwise
bool InterfaceName::operator> ( const InterfaceName cmp) const
inline

Operator '>' overloading method. Compares cmp to the interface name.

Parameters
cmpString to be compared
Returns
TRUE if the interface name is found to be greater than cmd. FALSE otherwise
bool InterfaceName::toString ( char *  string,
size_t  length 
)
inline

Gets interface name from the class' internal variable.

Parameters
string[out] String to store interface's name
lengthLength of string
Returns
TRUE if length is greater than size of interface name plus one. FALSE otherwise.
Todo:
If string is null, strncpy will fail silently.

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