feisty meow concerns codebase  2.140
sockets::machine_uid Class Reference

#include <machine_uid.h>

Inheritance diagram for sockets::machine_uid:
Collaboration diagram for sockets::machine_uid:

Public Types

enum  known_location_types { INVALID_LOCATION , TCPIP_LOCATION , IPX_LOCATION , NETBIOS_LOCATION }
 

Public Member Functions

 machine_uid ()
 
 machine_uid (known_location_types type, const basis::byte_array &address)
 
 machine_uid (const machine_uid &to_copy)
 
virtual ~machine_uid ()
 
known_location_types type () const
 
bool valid () const
 
machine_uidoperator= (const machine_uid &to_copy)
 
void reset (known_location_types type, const basis::byte_array &address)
 
basis::astring text_form () const
 
basis::astring compact_form () const
 
basis::byte_array native () const
 
bool operator== (const machine_uid &to_compare) const
 
virtual int packed_size () const
 Estimates the space needed for the packed structure. More...
 
virtual void pack (basis::byte_array &packed_form) const
 Creates a packed form of the packable object in "packed_form". More...
 
virtual bool unpack (basis::byte_array &packed_form)
 Restores the packable from the "packed_form". More...
 
const basis::byte_arrayraw () const
 

Static Public Member Functions

static const basis::astringtype_name (known_location_types type)
 
static machine_uid expand (const basis::astring &compacted)
 

Detailed Description

Definition at line 42 of file machine_uid.h.

Member Enumeration Documentation

◆ known_location_types

Enumerator
INVALID_LOCATION 
TCPIP_LOCATION 
IPX_LOCATION 
NETBIOS_LOCATION 

Definition at line 45 of file machine_uid.h.

Constructor & Destructor Documentation

◆ machine_uid() [1/3]

sockets::machine_uid::machine_uid ( )

Definition at line 33 of file machine_uid.cpp.

References INVALID_LOCATION.

◆ machine_uid() [2/3]

sockets::machine_uid::machine_uid ( known_location_types  type,
const basis::byte_array address 
)

Definition at line 37 of file machine_uid.cpp.

References type().

◆ machine_uid() [3/3]

sockets::machine_uid::machine_uid ( const machine_uid to_copy)

Definition at line 45 of file machine_uid.cpp.

◆ ~machine_uid()

sockets::machine_uid::~machine_uid ( )
virtual

Definition at line 50 of file machine_uid.cpp.

References basis::WHACK().

Member Function Documentation

◆ compact_form()

astring sockets::machine_uid::compact_form ( ) const

Definition at line 99 of file machine_uid.cpp.

Referenced by cromp::cromp_common::chew_hostname().

◆ expand()

machine_uid sockets::machine_uid::expand ( const basis::astring compacted)
static

Definition at line 106 of file machine_uid.cpp.

References basis::array< contents >::reset().

◆ native()

byte_array sockets::machine_uid::native ( ) const

◆ operator=()

machine_uid & sockets::machine_uid::operator= ( const machine_uid to_copy)

Definition at line 76 of file machine_uid.cpp.

◆ operator==()

bool sockets::machine_uid::operator== ( const machine_uid to_compare) const

◆ pack()

void sockets::machine_uid::pack ( basis::byte_array packed_form) const
virtual

Creates a packed form of the packable object in "packed_form".

This must append to the data in "packed_form" rather than clearing prior contents.

Implements basis::packable.

Definition at line 136 of file machine_uid.cpp.

References structures::attach(), and basis::array< contents >::length().

◆ packed_size()

int sockets::machine_uid::packed_size ( ) const
virtual

Estimates the space needed for the packed structure.

Implements basis::packable.

Definition at line 131 of file machine_uid.cpp.

References basis::array< contents >::length(), and structures::PACKED_SIZE_INT32.

◆ raw()

const byte_array & sockets::machine_uid::raw ( ) const

Definition at line 59 of file machine_uid.cpp.

Referenced by sockets::machine_uid_array::member().

◆ reset()

void sockets::machine_uid::reset ( known_location_types  type,
const basis::byte_array address 
)

◆ text_form()

astring sockets::machine_uid::text_form ( ) const

◆ type()

◆ type_name()

const astring & sockets::machine_uid::type_name ( known_location_types  type)
static

Definition at line 61 of file machine_uid.cpp.

References IPX_LOCATION, NETBIOS_LOCATION, TCPIP_LOCATION, and type().

Referenced by text_form().

◆ unpack()

bool sockets::machine_uid::unpack ( basis::byte_array packed_form)
virtual

Restores the packable from the "packed_form".

This object becomes the unpacked form, and therefore must lose any of its prior contents that depend on the data in "packed_form". This is up to the derived unpack function to figure out. The "packed_form" is modified by extracting all of the pieces that are used for this object; the remainder stays in "packed_form". true is returned if the unpacking was successful.

Implements basis::packable.

Definition at line 142 of file machine_uid.cpp.

References structures::detach(), basis::array< contents >::length(), basis::array< contents >::subarray(), and basis::array< contents >::zap().

◆ valid()


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