#ifndef OBJECT_LIST_H
#define OBJECT_LIST_H
// joycub V2 - an interpeter for the programming language Joy
// (c) 2004-2006 Sergey Zubkov 
//static char RCSID[] ="$Id: list.h,v 1.1 2006/02/27 18:50:34 cubbi Exp cubbi $";

#include "reference.h"
#include "token_list.h"

// global object counter (for memory debugging)
extern int list_type_count;

class JC_objref;
class JC_list : public JC_object {
protected:
	vector<JC_objref*> contents;
public:
	JC_list(void);
	JC_list(const vector<JC_objref*> &);
	JC_list(const JC_list&);
	virtual ~JC_list(void);

	virtual const obj_type get_type(void) const;
	virtual std::string to_output_string(void) const;
	virtual std::string to_string(void) const;
	virtual void debug_print(void) const;
	virtual std::string key(void) const;

	vector<JC_objref*> & get_contents(void) ;
	int size(void) const;
	JC_objref*& operator[](int);
	void push_front(JC_objref *);
	void push_back(JC_objref *);
	void drop(unsigned int);
	virtual void concat(JC_list &);
	virtual void erase(void);
};
#endif // OBJECT_LIST_H
