// -*- C++ -*- /* This file is part of *====================================================== * *LyX,TheDocumentProcessor *Copyright(C)1995MatthiasEttrich * *ThisfileisCopyleft(C)1996 *LarsGullikBjønnes *
*======================================================*/
#ifndef _BUFFER_LIST_H_ #define _BUFFER_LIST_H_
#ifdef __GNUG__ #pragma interface #endif
#include"buffer.h" #include"error.h"
/** A class to hold all the buffers in a structure Thepointofthisclassistohidefrombufferlistwhatkind ofstructurethebuffersarestoredin.Shouldbenoconcernfor bufferlistifthebuffersisinaarrayorinalinkedlist.
ThisclassshouldideallybeenclosedinsideclassBufferList,butthat gavemean"internalgccerror".
*/ class BufferStorage { public: ///
BufferStorage(); /// bool isEmpty(); /// void release(Buffer* buf); ///
Buffer* newBuffer(LString const &s, LyXRC *, bool =false); private: enum { /** The max number of buffers there are possible to have loadedatthesametime.(thisonlyapplieswhenweusean array)
*/
NUMBER_OF_BUFFERS = 50
};
/** The Bufferlist is currently implemented as a static array. Thebuffersarenew'edanddeletedasreqested.
*/
Buffer *buffer[NUMBER_OF_BUFFERS]; /// friendclass BufferStorage_Iter;
};
/// An Iterator class for BufferStorage class BufferStorage_Iter { public: ///
BufferStorage_Iter(const BufferStorage & bs)
{ cs=&bs; index=0;} /// next
Buffer* operator() (); ///
Buffer* operator[] (int a); private: /// const BufferStorage *cs; /// unsignedchar index;
};
/** The class governing all the open buffers Thisclassgovernsallthecurrentlyopenbuffers.Currentlyallthebuffer arelocatedinastaticarray,soonthiswillchangeandwewillhavea linkedlistinstead.
*/ class BufferList { public: ///
BufferList();
///
~BufferList();
/// state info enum list_state { ///
OK, ///
CLOSING
};
/// returns the state of the bufferlist
list_state getState() { return _state; }
/// returns true if the buffer exists already bool exists(LString const &);
/// returns a pointer to the buffer with the given name.
Buffer* getBuffer(LString const &); /// returns a pointer to the buffer with the given number.
Buffer* getBuffer(int);
private: ///
BufferStorage bstore;
///
list_state _state;
};
#endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.19 Sekunden
(vorverarbeitet am 2026-09-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.