home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************
- * .FILE: skill.cpv *
- * *
- * .DESCRIPTION: Implementation of additional member functions for the class *
- * OASkill *
- * *
- * .CLASSES: *
- * *
- * .COPYRIGHT: *
- * Licensed Material - Program-Property of IBM *
- * (C) Copyright IBM Corp. 1992, 1995, 1996 - All Rights Reserved *
- * *
- * .DISCLAIMER: *
- * 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();
- }