コード例 #1
0
ファイル: ConstString.cpp プロジェクト: sprenger120/FastCraft
ConstString::ConstString(const char* pData) {
    if (pData == NULL) {
        throw NullpointerException();
    }

    _pAllocString = NULL;
    _pConstantString = pData;

    _iLen = strlen(pData);
}
コード例 #2
0
ファイル: bikebase.cpp プロジェクト: williamd4112/DS_Final
BikePtr Bikebase::get(LicenseType license) {
    HNode& hnode = hash_table[toHash(license)];
    for (HNode::iterator it = hnode.begin(); it != hnode.end(); it++) {
        if (*it == NULL)
            throw NullpointerException();
        if ((*it)->license == license)
            return *it;
    }

    throw LicenseNotFoundException(license);
}
コード例 #3
0
ファイル: bikebase.cpp プロジェクト: williamd4112/DS_Final
void Bikebase::remove(BikePtr bikeptr) {
    if (bikeptr == NULL)
        throw NullpointerException();
    hash_table[toHash(bikeptr->license)].remove(bikeptr);
}