#ifndef LINK_H
#define LINK_H

#include "global.h"

/**
* This class represents the <LINK> element. 
*/
//Date created - 05 May 2002

class Link {

	public:
		/**
		* Default constructor.
		*/
		Link();

		//Link(char *ID, char * pcdata, char * contentType, content_role contentRole,
		//	  char * title, char * linkvalue, char *value, char * href, char * gref, 
		//	  char *action);

		/**
		* Destructor.
		*/
		~Link();

		/**
		* Assignment operator overloaded.
		*/
		Link operator=(const Link &f);

		/**
		* Copy constructor.
		*/
		Link(const Link &l);

		int setID(char * ID, int * status);
		int setPCData(char * pcdata, int *status);
		int setContentType(char * contentType, int *status);
		int setContentRole(content_role contentRole , int *status);
		int setTitle(char * title, int *status);
		int setValue(char * value, int *status);
		int setHRef(char * href, int *status);
		int setGRef(char * gref, int *status);
		int setAction(char * action, int *status);	

		/**
		* Gets the 'ID'.
		*/
		int getID(char * &ID, int * status);

		/**
		* Gets the 'PCData'.
		*/
		int getPCData(char * &pcdata, int *status);

		/**
		* Gets the 'content-type'.
		*/
		int getContentType(char * &contentType, int *status);

		/**
		* Gets the 'content-role'.'content-role' is defined in 'global.h'.
		*/
		int getContentRole(content_role & contentRole , int *status);

		/**
		* Gets the 'title'.
		*/
		int getTitle(char * &title, int *status);

		/**
		* Gets the 'value'.
		*/
		int getValue(char * &value, int *status);

		/**
		* Gets the 'href'.
		*/
		int getHRef(char * &href, int *status);

		/**
		* Gets the 'gref'.
		*/
		int getGRef(char * &gref, int *status);

		/**
		* Gets the 'action'.
		*/
		int getAction(char * &action, int *status);		
	
	private: 
		char * ID;
		char * pcdata;
		char * contentType;
		content_role contentRole;
		char * title;
		char * linkvalue;
		char * href;
		char * gref;
		char * action;

		void makeCopy(const Link &l);
		void cleanup(void);
		void init(void);


};

#endif