mrg_ui/src/mtktextbuffer.cxx
//============================================================================
// Return the tag name of the region's marker.  If the region doesn't
// have one yet, then construct one with a unique, new tag name.
//
Return the tag name of the region's marker.  If the region doesn't
have one yet, then construct one with a unique, new tag name.
Return the tag name of the region ' s marker . If the region doesn ' t have one yet then construct one with a unique new tag name .
char *textBuffer::GetMarker(Region *region)
{
	static int marker_count = 0;
	if (region->marker == NULL) {
		genString tagstr;
		tagstr.printf("marker%d", ++marker_count);
		char *mname = new char[tagstr.length() + 1];
		strcpy(mname, tagstr.str());
		Marker *m = new Marker;
		region->marker = m;
		m->tag_name = mname;
		m->owner = this;
		return mname;
	}
	else {
		return (region->marker)->tag_name;
	}
}
char * textBuffer :: GetMarker ( Region * region ) { static int marker_count = 0 ; if ( region -> marker == NULL ) { genString tagstr ; tagstr . printf ( " " , ++ marker_count ) ; char * mname = new char [ tagstr . length ( ) + 1 ] ; strcpy ( mname , tagstr . str ( ) ) ; Marker * m = new Marker ; region -> marker = m ; m -> tag_name = mname ; m -> owner = this ; return mname ; } else { return ( region -> marker ) -> tag_name ; } }
Return the tag name of the region's marker.
Return the tag name of the region ' s marker .