Example #1
0
//
//#############################################################################
//#############################################################################
//
void
MString::ToLower()
{
	MStringRepresentation* old = representation;
	Check_Object(old);
	representation = new MStringRepresentation(*old);
	Register_Object(representation);
	representation->IncrementReferenceCount();
	old->DecrementReferenceCount();
	representation->ToLower();
}
Example #2
0
	// comparison methods
	inline int
		MString::Compare(const MString &str) const
	{
		Check_Object(&str);
		Check_Object(representation);
		return representation->Compare(*str.representation);
   }
Example #3
0
	inline
		MString::MString(const char *cstr)
	{
		representation = new MStringRepresentation(cstr);
		Register_Object(representation);
		representation->IncrementReferenceCount();
		Verify(representation->referenceCount == 1);
	}
Example #4
0
	inline
		MString::MString(const MString &str)
	{
		Check_Object(&str);
		representation = str.representation;
		Check_Object(representation);
		representation->IncrementReferenceCount();
	}
Example #5
0
	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);
	}
Example #6
0
	inline size_t
		MString::GetSize() const
	{
		Check_Object(representation);
		return representation->GetSize();
	}
Example #7
0
	inline void
		MString::AllocateLength(size_t length)
	{
		Check_Object(representation);
		representation->AllocateLength(length);
	}
Example #8
0
	inline void
		MString::SetLength(size_t length)
	{
		Check_Object(representation);
		representation->SetLength(length);
	}
Example #9
0
	inline
		MString::~MString()
	{
		Check_Object(representation);
		representation->DecrementReferenceCount();
	}