home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
treecnr.zip
/
person.cpv
< prev
next >
Wrap
Text File
|
1996-03-13
|
2KB
|
72 lines
// Feature source code generation begins here...
INotificationId Person::nameId = "Person::name";
INotificationId Person::parentNameId = "Person::parentName";
INotificationId Person::phoneNumberId = "Person::phoneNumber";
IString Person::name() const
{
return iName;
}
Person& Person::setName(const IString& aName)
{
if (!(iName == aName))
{
iName = aName;
notifyObservers(INotificationEvent(Person::nameId, *this));
} // endif
return *this;
}
IString Person::parentName() const
{
return iParentName;
}
Person& Person::setParentName(const IString& aParentName)
{
if (!(iParentName == aParentName))
{
iParentName = aParentName;
notifyObservers(INotificationEvent(Person::parentNameId, *this));
} // endif
return *this;
}
IString Person::phoneNumber() const
{
return iPhoneNumber;
}
Person& Person::setPhoneNumber(const IString& aPhoneNumber)
{
if (!(iPhoneNumber == aPhoneNumber))
{
iPhoneNumber = aPhoneNumber;
notifyObservers(INotificationEvent(Person::phoneNumberId, *this));
} // endif
return *this;
}
Person& Person::initialize(const IString aName,
const IString aParentName,
const IString aPhoneNumber)
{
iName = aName;
iParentName = aParentName;
iPhoneNumber = aPhoneNumber;
}
IString Person::asString() const
{
return name();
}
Boolean Person::operator== (const Person& aPerson) const
{
return (aPerson.name() == name());
}
// Feature source code generation ends here.