ConstString::ConstString(const char* pData) { if (pData == NULL) { throw NullpointerException(); } _pAllocString = NULL; _pConstantString = pData; _iLen = strlen(pData); }
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); }
void Bikebase::remove(BikePtr bikeptr) { if (bikeptr == NULL) throw NullpointerException(); hash_table[toHash(bikeptr->license)].remove(bikeptr); }