// //############################################################################# //############################################################################# // void MString::ToLower() { MStringRepresentation* old = representation; Check_Object(old); representation = new MStringRepresentation(*old); Register_Object(representation); representation->IncrementReferenceCount(); old->DecrementReferenceCount(); representation->ToLower(); }
// comparison methods inline int MString::Compare(const MString &str) const { Check_Object(&str); Check_Object(representation); return representation->Compare(*str.representation); }
inline MString::MString(const char *cstr) { representation = new MStringRepresentation(cstr); Register_Object(representation); representation->IncrementReferenceCount(); Verify(representation->referenceCount == 1); }
inline MString::MString(const MString &str) { Check_Object(&str); representation = str.representation; Check_Object(representation); representation->IncrementReferenceCount(); }
inline MString MString::GetNthToken( size_t nth_token, char *delimiters ) const { Check_Object(representation); MStringRepresentation temp = representation->GetNthToken(nth_token, delimiters); return MString(temp.stringText); }
inline size_t MString::GetSize() const { Check_Object(representation); return representation->GetSize(); }
inline void MString::AllocateLength(size_t length) { Check_Object(representation); representation->AllocateLength(length); }
inline void MString::SetLength(size_t length) { Check_Object(representation); representation->SetLength(length); }
inline MString::~MString() { Check_Object(representation); representation->DecrementReferenceCount(); }