예제 #1
0
const BString&
BUrl::UserInfo() const
{
	if (!fUserInfoValid) {
		fUserInfo = fUser;

		if (HasPassword())
			fUserInfo << ':' << fPassword;

		fUserInfoValid = true;
	}

	return fUserInfo;
}
예제 #2
0
void CWeddingRoom::SetRoomBriefInfo(CWeddingRoomBriefInfo & rRoomBriefIno) const
{
    rRoomBriefIno.m_nRoomID = m_nRoomID;
    rRoomBriefIno.m_strRoomName = m_strRoomName;
    rRoomBriefIno.m_bHasPassword = HasPassword();
    rRoomBriefIno.m_nWeddingType = (unsigned char)m_eWeddingType;
    int i = 0;
    for (WeddingRoomPlayerMap_t::const_iterator itr = m_mapPlayers.begin(); itr != m_mapPlayers.end() && i < C_WEDDINGROOM_GEUST_COUNT; ++itr) {
        if (itr->second != NULL && itr->second->RoleAttr() != NULL && itr->second->RoomRoleType() != EWeddingRoomRoleType_Groom && itr->second->RoomRoleType() != EWeddingRoomRoleType_Bride) {
            rRoomBriefIno.m_arrPlayerSex[i++] = itr->second->RoleAttr()->GetSex();
        }
    }
    rRoomBriefIno.m_nGroomID = m_nGroomID;
    rRoomBriefIno.m_strGroomName = m_strGroomName;
    rRoomBriefIno.m_nBrideID = m_nBrideID;
    rRoomBriefIno.m_strBrideName = m_strBrideName;
}