sockets::machine_uid Class Reference

#include <machine_uid.h>

Inheritance diagram for sockets::machine_uid:
Inheritance graph
[legend]
Collaboration diagram for sockets::machine_uid:
Collaboration graph
[legend]

List of all members.

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.
virtual void pack (basis::byte_array &packed_form) const
 Creates a packed form of the packable object in "packed_form".
virtual bool unpack (basis::byte_array &packed_form)
 Restores the packable from the "packed_form".
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

Enumerator:
INVALID_LOCATION 
TCPIP_LOCATION 
IPX_LOCATION 
NETBIOS_LOCATION 

Definition at line 45 of file machine_uid.h.


Constructor & Destructor Documentation

sockets::machine_uid::machine_uid (  ) 

Definition at line 33 of file machine_uid.cpp.

References INVALID_LOCATION.

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

Definition at line 37 of file machine_uid.cpp.

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

Definition at line 45 of file machine_uid.cpp.

sockets::machine_uid::~machine_uid (  )  [virtual]

Definition at line 50 of file machine_uid.cpp.

References basis::WHACK().


Member Function Documentation

astring sockets::machine_uid::compact_form (  )  const

Definition at line 99 of file machine_uid.cpp.

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

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().

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

Definition at line 76 of file machine_uid.cpp.

bool sockets::machine_uid::operator== ( const machine_uid to_compare  )  const
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 basis::attach(), and basis::array< contents >::length().

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.

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

Definition at line 59 of file machine_uid.cpp.

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

void sockets::machine_uid::reset ( known_location_types  type,
const basis::byte_array address 
)
astring sockets::machine_uid::text_form (  )  const
machine_uid::known_location_types sockets::machine_uid::type (  )  const
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, and TCPIP_LOCATION.

Referenced by text_form().

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().

bool sockets::machine_uid::valid (  )  const [inline]

The documentation for this class was generated from the following files:
Generated on Sat Jan 28 04:25:53 2012 for hoople2 project by  doxygen 1.6.3