/*
 * doutput.h
 *
 *  Created on: 11 Jul 2013
 *      Author: john
 */

#ifndef DOUTPUT_H_
#define DOUTPUT_H_

#include <port.h>

class cObjectDOutput: public cObjectPort
{
public:
   cObjectDOutput();
   cObjectDOutput(cObjectDOutput *);
   ~cObjectDOutput();
   cTagList * getTags();
   bool parse(KourierObject *,std::vector<KTag*>* ct = NULL);


	//potential problem with conversion as library returns double and we are casting to float.
	bool parse(json_t *dataArray); //JSON
	   //uses the append_new function for return arrays so that the json ref stays at 1
	   //returns an array of all the values
	json_t * getJSONObj(); //for JSON



   bool compIndex(cObject *);
   bool operator <(cObject &);
   char * printKey();
   cObject * clone();
   eObjectIOState getDefaultState() const;
   void setDefaultState(eObjectIOState defaultState);
   eObjectIOState getOutputState() const;
   void setOutputState(eObjectIOState outputState);

private:
   void populate_tags(KTag* tag);
   eObjectIOState mOutputState;
   eObjectIOState mDefaultState;
};

#endif /* DOUTPUT_H_ */
