コード例 #1
0
ファイル: FullName.cpp プロジェクト: JoshuaKennedy/jccc_cs235
bool FullName::isEqual(const FullName& right) const
{
    if ( strcmp(getFirstName(),right.getFirstName()) == 0 )
        return true;
    else if (right.getMiddleInitial() == this->mI)
        return true;
    else if ( strcmp(getFirstName(),right.getFirstName()) == 0 )
        return true;
	else
        return false;
}
コード例 #2
0
ファイル: FullName.cpp プロジェクト: JoshuaKennedy/jccc_cs235
bool FullName::isSmaller(const FullName & right) const   // is invoking instance smaller than parameter
{
	if ( strcmp(getFirstName(),right.getFirstName()) < 0 )
        return true;
    else if (right.getMiddleInitial() < this->mI)
        return true;
    else if ( strcmp(getFirstName(),right.getFirstName()) < 0 )
        return true;
	else
        return false;
}
コード例 #3
0
ファイル: Member.cpp プロジェクト: derricp1/lionsbookbazaar
string Member::toFile()
{
    stringstream output;
    output << "\"" << getLastName() << "\",\"" << getFirstName() << "\",\"" << getEmail() << "\",\"" << getUsername() << "\",\"" << getPassword() << "\"," << creationTime.toFile();
    
    return output.str();
}
コード例 #4
0
    virtual void copyTo(ISecUser& destination)
    {
        destination.setAuthenticateStatus(getAuthenticateStatus());
        destination.setName(getName());
        destination.setFullName(getFullName());
        destination.setFirstName(getFirstName());
        destination.setLastName(getLastName());
        destination.setEmployeeID(getEmployeeID());
        destination.setRealm(getRealm());
        destination.setFqdn(getFqdn());
        destination.setPeer(getPeer());
        destination.credentials().setPassword(credentials().getPassword());
        destination.credentials().setSessionToken(credentials().getSessionToken());
        destination.credentials().setSignature(credentials().getSignature());
        CDateTime exp;
        credentials().getPasswordExpiration(exp);
        destination.credentials().setPasswordExpiration(exp);
        CDateTime tmpTime;
        destination.setPasswordExpiration(getPasswordExpiration(tmpTime));
        destination.setStatus(getStatus());
        CriticalBlock b(crit);
        Owned<IPropertyIterator> Itr = m_parameters->getIterator();
        ForEach(*Itr)
        {
            destination.setProperty(Itr->getPropKey(),m_parameters->queryProp(Itr->getPropKey()));
        }


//      DBGLOG("Copied name %s to %s",getName(),destination.getName());
    }
コード例 #5
0
    virtual void copyTo(ISecUser& destination)
    {
        destination.setAuthenticateStatus(getAuthenticateStatus());
        destination.setName(getName());
        destination.setFullName(getFullName());
        destination.setFirstName(getFirstName());
        destination.setLastName(getLastName());
        destination.setRealm(getRealm());
        destination.setFqdn(getFqdn());
        destination.setPeer(getPeer());
        destination.credentials().setPassword(credentials().getPassword());
        CDateTime tmpTime;
        destination.setPasswordExpiration(getPasswordExpiration(tmpTime));
        destination.setStatus(getStatus());
        if(m_parameters.get()==NULL)
            return;
        CriticalBlock b(crit);
        Owned<IPropertyIterator> Itr = m_parameters->getIterator();
        Itr->first();
        while(Itr->isValid())
        {
            destination.setProperty(Itr->getPropKey(),m_parameters->queryProp(Itr->getPropKey()));
            Itr->next();
        }


        //addToken is not currently implemented....
//      DBGLOG("Copied name %s to %s",getName(),destination.getName());
    }
コード例 #6
0
ファイル: Employee.cpp プロジェクト: GregWagner/Projects
 void Employee::display() const
 {
     std::cout << "Employee: " << getLastName() << ", " << getFirstName()
         << "\n--------------------------------\n"
         << (mHired ? "Current Employee" : "Former Employee")
         << "\nEmployee Number: " << getEmployeeNumber()
         << "\nSalary: $" << getSalary() << "\n\n";
 }
コード例 #7
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;
 }
コード例 #8
0
ファイル: FullName.cpp プロジェクト: JoshuaKennedy/jccc_cs235
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;
}
コード例 #9
0
ファイル: FullName.cpp プロジェクト: JoshuaKennedy/jccc_cs235
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;
}
コード例 #10
0
ファイル: ContactvCard.cpp プロジェクト: BrownBear2/keyhotee
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;
}
コード例 #11
0
int readFirstNames(char *firstnames[])
{
	int i;
	char *name;
	i = 0;
	FILE *fp;
	fp = fopen("names.txt", "r");
	while ((name = getFirstName(fp)) != NULL) {
		firstnames[i++] = name;
	}
	firstnames[i] = NULL;
	fclose(fp);
	return i;
}
コード例 #12
0
ファイル: ldapsecurity.cpp プロジェクト: xyuan/HPCC-Platform
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);
}
コード例 #13
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);
	}
}
コード例 #14
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);
}
コード例 #15
0
ファイル: llsavedlogins.cpp プロジェクト: AGoodPerson/Ascent
const std::string LLSavedLoginEntry::getDisplayString() const
{
	std::ostringstream etitle;
	etitle << getFirstName() << " " << getLastName() << " (" <<	getGridName() << ")";
	return etitle.str();
}
コード例 #16
0
ファイル: FullName.cpp プロジェクト: JoshuaKennedy/jccc_cs235
void FullName::print(ostream & out ) const  // of the form:    Doe, John A.
{
	out << getLastName() << ',' << getFirstName() << ' ' << getMiddleInitial() << '.';
}
コード例 #17
0
// print Employee's information (virtual, but not pure virtual)
void Employee::print() const
{
	cout << getFirstName() << " " << getLastName()
		<< "\nsocial security number: " << getSocialSecurityNumber()
		<< "\nbirthday: " << getBirthDate();
}