Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
118
cde/programs/dtinfo/dtinfogen/infolib/etc/StyleTask.h
Normal file
118
cde/programs/dtinfo/dtinfogen/infolib/etc/StyleTask.h
Normal file
@@ -0,0 +1,118 @@
|
||||
/* $XConsortium: StyleTask.h /main/3 1996/08/21 15:47:29 drk $ */
|
||||
/* $XConsortium: StyleTask.h /main/3 1996/08/21 15:47:29 drk $ */
|
||||
|
||||
#ifndef __StyleTasks_h
|
||||
#define __StyleTasks_h
|
||||
|
||||
#include "Task.h"
|
||||
#include "FlexBuffer.h"
|
||||
#include "dti_cc/CC_String.h"
|
||||
#include "dti_cc/cc_hdict.h"
|
||||
#include "dti_cc/CC_Stack.h"
|
||||
|
||||
class BookCaseTask;
|
||||
class DataTask;
|
||||
class DB;
|
||||
class DBTable;
|
||||
class FlexBuffer;
|
||||
class OL_Data;
|
||||
|
||||
class imp_die;
|
||||
|
||||
class StyleTask : public ComplexTask{
|
||||
|
||||
public:
|
||||
|
||||
StyleTask();
|
||||
~StyleTask();
|
||||
|
||||
/*
|
||||
* USE:
|
||||
* StyleTask t;
|
||||
* t.markup(...); ... t.data(...); ...
|
||||
* const char *l = t.locator();
|
||||
*/
|
||||
const char * locator() /* throw(Unexpected) */;
|
||||
|
||||
void reset(void);
|
||||
|
||||
void markup(const Token&);
|
||||
|
||||
void data(const char *, size_t );
|
||||
|
||||
int exist( const char * view ); /*
|
||||
* Given a view determine if it exists?
|
||||
*/
|
||||
|
||||
/*
|
||||
* USE:
|
||||
* StyleTask st(...);
|
||||
* st.markup(...); st.data(...); ... // feed stylesheet to the task
|
||||
* const char *p = st.print();
|
||||
* const char *o = st.online();
|
||||
*/
|
||||
const char *print();
|
||||
int print_data_size();
|
||||
|
||||
const char *online();
|
||||
int online_data_size();
|
||||
|
||||
protected:
|
||||
void write_record( void );
|
||||
|
||||
/* comments below to avoid compiler warnings... */
|
||||
virtual void done(const char * /*name*/,
|
||||
const char * /*online*/, int /*online_len*/,
|
||||
const char * /*print*/, int /*print_len*/) {};
|
||||
|
||||
private:
|
||||
int
|
||||
f_base; /* tag nesting level of <STYLESHEET> elt */
|
||||
int f_select;
|
||||
|
||||
enum { inPath, startContent, inContent } f_dataMode;
|
||||
|
||||
FlexBuffer
|
||||
*f_buffer,
|
||||
*f_pathbuf,
|
||||
*onlineSS,
|
||||
*printSS; /*
|
||||
* The style sheet data proper.
|
||||
* Need to determine if it gets transformed
|
||||
* or not.
|
||||
*/
|
||||
OL_Data
|
||||
*f_locator;
|
||||
|
||||
hashTable<CC_String,int>
|
||||
*viewset; /*
|
||||
* List of views,
|
||||
* Must be a unique set of names.
|
||||
*/
|
||||
Stack<int> *feature_depth;
|
||||
|
||||
};
|
||||
|
||||
|
||||
class StyleTaskDB : public StyleTask{
|
||||
|
||||
public:
|
||||
|
||||
StyleTaskDB(BookCaseTask *);
|
||||
|
||||
BookCaseTask *bookcase() { return f_bookcase; };
|
||||
|
||||
protected:
|
||||
virtual void done(const char * name,
|
||||
const char * online, int online_len,
|
||||
const char * print, int print_len);
|
||||
|
||||
private:
|
||||
BookCaseTask
|
||||
*f_bookcase; /* 'parent' bookcase object */
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif /* __StyleTasks_h */
|
||||
|
||||
Reference in New Issue
Block a user