machine_uid Class Reference

#include <machine_uid.h>

Inheritance diagram for machine_uid:

Inheritance graph
[legend]
Collaboration diagram for 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 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 byte_array &address)
istring text_form () const
istring compact_form () const
byte_array native () const
bool operator== (const machine_uid &to_compare) const
bool operator!= (const machine_uid &to_compare) const
virtual void pack (byte_array &packed_form) const
 Creates a packed form of the packable object in "packed_form".
virtual bool unpack (byte_array &packed_form)
 Restores the packable from the "packed_form".
const byte_arrayraw () const

Static Public Member Functions

static const istringtype_name (known_location_types type)
static machine_uid expand (const istring &compacted)


Detailed Description

Definition at line 41 of file machine_uid.h.


Member Enumeration Documentation

Enumerator:
INVALID_LOCATION 
TCPIP_LOCATION 
IPX_LOCATION 
NETBIOS_LOCATION 

Definition at line 44 of file machine_uid.h.


Constructor & Destructor Documentation

machine_uid::machine_uid (  ) 

Definition at line 29 of file machine_uid.cpp.

References INVALID_LOCATION.

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

Definition at line 33 of file machine_uid.cpp.

machine_uid::machine_uid ( const machine_uid to_copy  ) 

Definition at line 41 of file machine_uid.cpp.

machine_uid::~machine_uid (  )  [virtual]

Definition at line 46 of file machine_uid.cpp.

References WHACK().


Member Function Documentation

const istring & machine_uid::type_name ( known_location_types  type  )  [static]

Definition at line 57 of file machine_uid.cpp.

References IPX_LOCATION, NETBIOS_LOCATION, and TCPIP_LOCATION.

Referenced by text_form().

machine_uid::known_location_types machine_uid::type (  )  const

Definition at line 121 of file machine_uid.cpp.

References array< contents >::get(), INVALID_LOCATION, and array< contents >::length().

Referenced by text_form().

bool machine_uid::valid (  )  const [inline]

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

Definition at line 72 of file machine_uid.cpp.

References _contents.

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

Definition at line 48 of file machine_uid.cpp.

References array< contents >::reset().

Referenced by internet_machine_uid::internet_machine_uid().

istring machine_uid::text_form (  )  const

istring machine_uid::compact_form (  )  const

Definition at line 95 of file machine_uid.cpp.

References byte_format::bytes_to_shifted_string().

Referenced by cromp_common::chew_hostname().

machine_uid machine_uid::expand ( const istring compacted  )  [static]

byte_array machine_uid::native (  )  const

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

Definition at line 110 of file machine_uid.cpp.

References _contents, array< contents >::get(), and array< contents >::length().

bool machine_uid::operator!= ( const machine_uid to_compare  )  const [inline]

Definition at line 91 of file machine_uid.h.

void machine_uid::pack ( 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 packable.

Definition at line 127 of file machine_uid.cpp.

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

bool machine_uid::unpack ( 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 packable.

Definition at line 133 of file machine_uid.cpp.

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

const byte_array & machine_uid::raw (  )  const

Definition at line 55 of file machine_uid.cpp.

Referenced by machine_uid_array::member().


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

Generated on Mon Jul 26 04:23:03 2010 for HOOPLE Libraries by  doxygen 1.5.6