Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
/* $XConsortium: DataTask.h /main/2 1996/07/18 16:42:57 drk $ */
/* $Id: DataTask.h /main/2 1996/07/18 16:42:57 drk $ */
#ifndef __DataTask_h
#define __DataTask_h
#include <stddef.h>
#include "Task.h"
#include "FlexBuffer.h"
class DataTask : public Task{
/*
* A DataTask collects all the data for an element.
*
* USE:
* if(t.type() == START && t.attrMatch(OLAF::OLIAS, OLAF::Title)){
* titleTask = addSubTask(new DataTask());
*
* ... (more markup(), data() calls) ...
*
* const char *title = titleTask.content()
*/
public:
DataTask(const Token& t);
virtual void markup(const Token& t) /* throw(Unexpected) */;
virtual void data(const char *chars,
size_t len) /* throw(ResourcesExhausted) */;
const char *content(size_t *length_return = NULL);
private:
int level; /* how far nested are we? */
FlexBuffer buf;
};
#endif /* __DataTask_h */