/******************************************************************************
 GNBNoteNode.h

	Interface for GNBNoteNode class.

	Copyright © 1998 by Glenn W. Bach. All rights reserved.

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

#ifndef _H_GNBNoteNode
#define _H_GNBNoteNode

#include "GNBBaseNode.h"
#include <JFileArray.h>

class JString;
class ostream;

class GNBNoteNode : public GNBBaseNode
{
public:

	GNBNoteNode(JNamedTreeNode* parent,
						const char* name, 
						const JFAID_t id);

	GNBNoteNode(JTree* tree, 
						const JCharacter* name,
						const JFAID_t id);

	virtual ~GNBNoteNode();

	virtual void	SaveNode(ostream& os);
	virtual void	ReadNodeSetup(istream& is, const JFileVersion version);
	virtual void	DiscardNode();
	JFAID_t			GetID() const;
	void			SetHasName(const JBoolean hasname);
	void			AdjustName(const JString& newname);

private:

	JFAID_t		itsFileID;
	JBoolean	itsHasName;
	
private:

	// not allowed

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

};

/******************************************************************************
 GetID (public)

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

inline JFAID_t
GNBNoteNode::GetID()
	const
{
	return itsFileID;
}

#endif
