summaryrefslogtreecommitdiff
path: root/orkbasecxx/Object.h
blob: ba8128e5dadc921ea62ee160edc0b236ef0053ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 * Oreka -- A media capture and retrieval platform
 * 
 * Copyright (C) 2005, orecx LLC
 *
 * http://www.orecx.com
 *
 * This program is free software, distributed under the terms of
 * the GNU General Public License.
 * Please refer to http://www.gnu.org/copyleft/gpl.html
 *
 */

#ifndef __OBJECT_H__
#define __OBJECT_H__

#include "OrkBase.h"
#include "boost/shared_ptr.hpp"
#include "xercesc/dom/DOMNode.hpp"

class Serializer;
class Object;

using namespace XERCES_CPP_NAMESPACE;

typedef boost::shared_ptr<Object> ObjectRef;

#define OBJECT_TYPE_TAG "type"

/** An Object is the equivalent of a Java Object
*/
class DLL_IMPORT_EXPORT Object
{
public:
	virtual void Define(Serializer* s) = 0;
	virtual void Validate() = 0;

	CStdString SerializeSingleLine();
	void DeSerializeSingleLine(CStdString& input);

	void SerializeDom(XERCES_CPP_NAMESPACE::DOMDocument* doc);
	void DeSerializeDom(DOMNode* doc);

	CStdString SerializeUrl();
	void DeSerializeUrl(CStdString& input);

	virtual CStdString GetClassName() = 0;
	virtual ObjectRef NewInstance() = 0;

	virtual ObjectRef Process() = 0;
};



#endif