Ejemplo n.º 1
0
	void Employee::display() const
	{
		cout << "Employee: " << getLastName() << ", " << getFirstName() << endl;
		cout << "-----------------------------------" << endl;
		cout << (bHired ? "Current Employee" : "Former Employee") << endl;
		cout << "Employee Number: " << getEmployeeNumber() << endl;
		cout << "Salary: $" << getSalary() << endl;
		cout << endl;
	}
Ejemplo n.º 2
0
bool FullName::operator==( const FullName & right) const
{
    int lastResult = strcmp(getLastName(),right.getLastName());
	if ( lastResult != 0 ) return false;
	int firstResult = strcmp(getFirstName(),right.getFirstName());
	if ( firstResult != 0 ) return false;
	return getMiddleInitial() == right.getMiddleInitial();
	return false;
}
Ejemplo n.º 3
0
bool FullName::isSmaller(const FullName & right) const   // is invoking instance smaller than parameter
{
	int lastResult = strcmp(getLastName(),right.getLastName());
	if ( lastResult < 0 ) return true;
	if ( lastResult > 0 ) return false;
	int firstResult = strcmp(getFirstName(),right.getFirstName());
	if ( firstResult < 0 ) return true;
	if ( firstResult > 0 ) return false;
	return getMiddleInitial() < right.getMiddleInitial();
	return false;
}
Ejemplo n.º 4
0
ContactvCard::ConvertStatus ContactvCard::convert(Contact* contact)
{ 
  contact->first_name       = getFirstName().toStdString();
  contact->last_name        = getLastName().toStdString();
  contact->dac_id_string    = getKHID().toStdString();
  contact->notes            = getNotes().toStdString();
  contact->privacy_setting  = bts::addressbook::secret_contact;
  contact->setIcon(QIcon(":/images/user.png"));
  if (public_key_address::convert(getPublicKey().toStdString(), &contact->public_key) == false)
    return ConvertStatus::PUBLIC_KEY_INVALID;

  return ConvertStatus::SUCCESS;
}
Ejemplo n.º 5
0
void CLdapSecUser::copyTo(ISecUser& destination)
{
    CLdapSecUser* dest = dynamic_cast<CLdapSecUser*>(&destination);
    if(!dest)
        return;

    dest->setAuthenticated(isAuthenticated());
    dest->setName(getName());
    dest->setFullName(getFullName());
    dest->setFirstName(getFirstName());
    dest->setLastName(getLastName());
    dest->setRealm(getRealm());
    dest->credentials().setPassword(credentials().getPassword());
    dest->setUserSid(m_usersid.length(), m_usersid.toByteArray());
    dest->setUserID(m_userid);
    dest->setPasswordExpiration(m_passwordExpiration);
}
Ejemplo n.º 6
0
void AddressBookContact::keywordMatching(const QString& keywordLowercase)
{
	QString fn = getFirstName().toLower();
	QString ln = getLastName().toLower();
	QString latin = getLatinFullName().toLower();
	int indexInFirstname = fn.indexOf( keywordLowercase );
	int indexInLastname = ln.indexOf( keywordLowercase );
	int indexInLatinName = latin.indexOf( keywordLowercase );
	qDebug() << "keywordMatching():fn=" << fn
			 << ",ln=" << ln
			 << ",latin=" << latin;
	qDebug() << "keywordMatching():indexInFirstname=" << indexInFirstname
			 << ":indexInLastname=" << indexInLastname
			 << ":indexInLatinName=" << indexInLatinName;
	if ( indexInFirstname >= 0 || indexInLastname >= 0 || indexInLatinName >= 0 )
	{
		setIsKeywordMatched(true);
	}
	else
	{
		setIsKeywordMatched(false);
	}
}
Ejemplo n.º 7
0
void CLdapSecUser::copyTo(ISecUser& destination)
{
    if (this == &destination)
        return;

    CLdapSecUser* dest = dynamic_cast<CLdapSecUser*>(&destination);
    if(!dest)
        return;

    dest->setAuthenticateStatus(getAuthenticateStatus());
    dest->setName(getName());
    dest->setFullName(getFullName());
    dest->setFirstName(getFirstName());
    dest->setLastName(getLastName());
    dest->setEmployeeID(getEmployeeID());
    dest->setRealm(getRealm());
    dest->credentials().setPassword(credentials().getPassword());
    dest->setUserSid(m_usersid.length(), m_usersid.toByteArray());
    dest->setUserID(m_userid);
    dest->setPasswordExpiration(m_passwordExpiration);
    dest->setDistinguishedName(m_distinguishedName);
    dest->credentials().setSessionToken(&m_sessionToken);
    dest->credentials().setSignature(&m_signature);
}
Ejemplo n.º 8
0
const std::string LLSavedLoginEntry::getDisplayString() const
{
	std::ostringstream etitle;
	etitle << getFirstName() << " " << getLastName() << " (" <<	getGridName() << ")";
	return etitle.str();
}
Ejemplo n.º 9
0
void FullName::print(ostream & out ) const  // of the form:    Doe, John A.
{
	out << getLastName() << ',' << getFirstName() << ' ' << getMiddleInitial() << '.';
}
// print Employee's information (virtual, but not pure virtual)
void Employee::print() const
{
	cout << getFirstName() << " " << getLastName()
		<< "\nsocial security number: " << getSocialSecurityNumber()
		<< "\nbirthday: " << getBirthDate();
}