/******************************************************************************
 GMessageFrom.h

	Interface for the GMessageFrom class

	Copyright © 1997 by Glenn W. Bach.  All rights reserved.
	
	Base code generated by Codemill v0.1.0

 *****************************************************************************/

#ifndef _H_GMessageFrom
#define _H_GMessageFrom

//includes

// Superclass Header
#include <jTypes.h>
#include <JOrderedSet.h>

class JString;
class GMessageHeader;

class GMessageFrom 
{
public:

	GMessageFrom(GMessageHeader* header);
	GMessageFrom(const JString& from, const JIndex position);
	virtual ~GMessageFrom();

	static JOrderedSetT::CompareResult
		CompareFromLines(GMessageFrom* const & n1, GMessageFrom* const & n2);
		
	const JString& 	GetFrom();
	GMessageHeader*	GetHeader();
	JIndex			GetPosition();
private:

	JString*		itsFrom;
	GMessageHeader*	itsHeader;			// We don't own this.
	JIndex			itsPosition;

private:

	// not allowed

	GMessageFrom(const GMessageFrom& source);
	const GMessageFrom& operator=(const GMessageFrom& source);

};

/******************************************************************************
 GetFrom

 *****************************************************************************/

inline const JString&
GMessageFrom::GetFrom()
{
	return *itsFrom;
}

/******************************************************************************
 GetHeader

 *****************************************************************************/

inline GMessageHeader*
GMessageFrom::GetHeader()
{
	return itsHeader;
}

/******************************************************************************
 GetPosition

 *****************************************************************************/

inline JIndex
GMessageFrom::GetPosition()
{
	return itsPosition;
}


#endif
