home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
VISBUILD
/
OASEARCH
/
SKILL.CPV
< prev
next >
Wrap
Text File
|
1995-05-15
|
3KB
|
110 lines
//****************************************************************************
// OASkill Class - C++ Code File (skill.cpv) *
// *
// COPYRIGHT: Copyright (C) International Business Machines Corp., 1994,1995 *
// *
// DISCLAIMER OF WARRANTIES: *
// The following [enclosed] code is sample code created by IBM *
// Corporation. This sample code is not part of any standard IBM product *
// and is provided to you solely for the purpose of assisting you in the *
// development of your applications. The code is provided "AS IS", *
// without warranty of any kind. IBM shall not be liable for any damages *
// arising out of your use of the sample code, even if they have been *
// advised of the possibility of such damages. *
//****************************************************************************
//NOTE: WE RECOMMEND USING A FIXED-SPACE FONT TO LOOK AT THE SOURCE.
//
// Default Part Code Generation begins here...
INotificationId OASkill::skillNameId = "OASkill::skillName";
INotificationId OASkill::contractorIDId = "OASkill::contractorID";
INotificationId OASkill::yearsExpId = "OASkill::yearsExp";
INotificationId OASkill::keyId = "OASkill::key";
IString OASkill::skillName() const
{
return iSkillName;
}
OASkill & OASkill::setSkillName(const IString & aSkillName)
{
if (iSkillName != aSkillName)
{
iSkillName = aSkillName;
notifyObservers(INotificationEvent(OASkill::skillNameId, *this));
} // endif
return *this;
}
IString OASkill::contractorID() const
{
return iContractorID;
}
OASkill & OASkill::setContractorID(const IString & aContractorID)
{
if (iContractorID != aContractorID)
{
iContractorID = aContractorID;
setKey("");
notifyObservers(INotificationEvent(OASkill::contractorIDId, *this));
} // endif
return *this;
}
IString OASkill::yearsExp() const
{
return iYearsExp;
}
OASkill & OASkill::setYearsExp(const long aValue)
{
IString tempYears = IString(aValue);
if (iYearsExp != tempYears)
iYearsExp = tempYears;
// Signal event even when value of yearsExp attribute has not changed
notifyObservers(INotificationEvent(OASkill::yearsExpId, *this));
return *this;
}
OASkill & OASkill::setYearsExp(const IString & aYearsExp)
{
if (iYearsExp != aYearsExp)
{
iYearsExp = aYearsExp;
notifyObservers(INotificationEvent(OASkill::yearsExpId, *this));
} // endif
return *this;
}
IString OASkill::key() const
{
return iKey;
}
OASkill & OASkill::setKey(const IString & aKey)
{
if (iKey != aKey)
{
iKey = aKey;
notifyObservers(INotificationEvent(OASkill::keyId, *this));
}
return *this;
}
// Copy constructor
// Necessary for skillBase support
OASkill::OASkill(const OASkill & aSkill)
: IStandardNotifier(aSkill),
iSkillName(aSkill.skillName()),
iContractorID(aSkill.contractorID()),
iYearsExp(aSkill.yearsExp()),
iKey(aSkill.key())
{
enableNotification();
}