add Address::IsInvalid

This commit is contained in:
Mathieu Lacage
2007-08-01 09:01:54 +02:00
parent e05f635db5
commit 2687579986
2 changed files with 14 additions and 0 deletions

View File

@@ -40,6 +40,12 @@ Address::operator = (const Address &address)
return *this;
}
bool
Address::IsInvalid (void) const
{
return m_len == 0 && m_type == 0;
}
uint8_t
Address::GetLength (void) const
{

View File

@@ -86,6 +86,14 @@ public:
Address (const Address & address);
Address &operator = (const Address &address);
/**
* \returns true if this address is invalid, false otherwise.
*
* An address is invalid if and only if it was created
* through the default constructor and it was never
* re-initialized.
*/
bool IsInvalid (void);
/**
* \returns the length of the underlying address.
*/