[poppler] poppler/goo: GooVector.h,NONE,1.1
Kristian Høgsberg
krh at freedesktop.org
Mon Dec 12 12:15:13 PST 2005
- Previous message: [poppler] poppler: ChangeLog, 1.259, 1.260 Makefile.am, 1.4,
1.5 configure.ac, 1.39, 1.40
- Next message: [poppler] poppler/utils: HtmlFonts.cc, NONE, 1.1 HtmlFonts.h, NONE,
1.1 HtmlLinks.cc, NONE, 1.1 HtmlLinks.h, NONE,
1.1 HtmlOutputDev.cc, NONE, 1.1 HtmlOutputDev.h, NONE,
1.1 ImageOutputDev.cc, NONE, 1.1 ImageOutputDev.h, NONE,
1.1 Makefile.am, NONE, 1.1 parseargs.c, NONE, 1.1 parseargs.h,
NONE, 1.1 pdffonts.1, NONE, 1.1 pdffonts.cc, NONE,
1.1 pdfimages.1, NONE, 1.1 pdfimages.cc, NONE, 1.1 pdfinfo.1,
NONE, 1.1 pdfinfo.cc, NONE, 1.1 pdftohtml.1, NONE,
1.1 pdftohtml.cc, NONE, 1.1 pdftoppm.1, NONE, 1.1 pdftoppm.cc,
NONE, 1.1 pdftops.1, NONE, 1.1 pdftops.cc, NONE,
1.1 pdftotext.1, NONE, 1.1 pdftotext.cc, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvs/poppler/poppler/goo
In directory gabe:/tmp/cvs-serv21377/goo
Added Files:
GooVector.h
Log Message:
2005-12-12 Kristian Høgsberg <krh at redhat.com>
* Makefile.am:
* configure.ac:
* goo/GooVector.h:
* utils/HtmlFonts.cc:
* utils/HtmlFonts.h:
* utils/HtmlLinks.cc:
* utils/HtmlLinks.h:
* utils/HtmlOutputDev.cc:
* utils/HtmlOutputDev.h:
* utils/ImageOutputDev.cc:
* utils/ImageOutputDev.h:
* utils/Makefile.am:
* utils/parseargs.c:
* utils/parseargs.h:
* utils/pdffonts.1:
* utils/pdffonts.cc:
* utils/pdfimages.1:
* utils/pdfimages.cc:
* utils/pdfinfo.1:
* utils/pdfinfo.cc:
* utils/pdftohtml.1:
* utils/pdftohtml.cc:
* utils/pdftoppm.1:
* utils/pdftoppm.cc:
* utils/pdftops.1:
* utils/pdftops.cc:
* utils/pdftotext.1:
* utils/pdftotext.cc: Add command line utilities from xpdf.
--- NEW FILE: GooVector.h ---
#ifndef _VECTOR_H
#define _VECTOR_H
#include "goo/gtypes.h"
template<class T>
class GooVector{
private:
int _size;
T* last;
T* storage;
void resize(){
if (_size==0) _size=2;else _size=2*_size;
T *tmp=new T[_size];
if (storage){
last=copy(storage,last,tmp);
delete [] storage;
}
else last=tmp;
storage=tmp;
}
T* copy(T* src1,T* scr2,T* dest){
T* tmp=src1;
T* d=dest;
while(tmp!=scr2){
*d=*tmp;
d++;tmp++;
}
return d;
}
public:
typedef T* iterator;
GooVector(){
_size=0;
last=0;
storage=0;
}
virtual ~GooVector(){
delete[] storage ;
}
void reset(){
last=storage;
}
int size(){
return (last-storage);
}
void push_back(const T& elem){
if (!storage||(size() >=_size)) resize();
*last=elem;
last++;
}
T pop_back() {
if (last!=storage) last--;
return *last;
}
T operator[](unsigned int i){
return *(storage+i);
}
GBool isEmpty() const{
return !_size || (last==storage) ;
}
iterator begin() const{
return storage;
}
iterator end() const {
return last;
}
};
#endif
- Previous message: [poppler] poppler: ChangeLog, 1.259, 1.260 Makefile.am, 1.4,
1.5 configure.ac, 1.39, 1.40
- Next message: [poppler] poppler/utils: HtmlFonts.cc, NONE, 1.1 HtmlFonts.h, NONE,
1.1 HtmlLinks.cc, NONE, 1.1 HtmlLinks.h, NONE,
1.1 HtmlOutputDev.cc, NONE, 1.1 HtmlOutputDev.h, NONE,
1.1 ImageOutputDev.cc, NONE, 1.1 ImageOutputDev.h, NONE,
1.1 Makefile.am, NONE, 1.1 parseargs.c, NONE, 1.1 parseargs.h,
NONE, 1.1 pdffonts.1, NONE, 1.1 pdffonts.cc, NONE,
1.1 pdfimages.1, NONE, 1.1 pdfimages.cc, NONE, 1.1 pdfinfo.1,
NONE, 1.1 pdfinfo.cc, NONE, 1.1 pdftohtml.1, NONE,
1.1 pdftohtml.cc, NONE, 1.1 pdftoppm.1, NONE, 1.1 pdftoppm.cc,
NONE, 1.1 pdftops.1, NONE, 1.1 pdftops.cc, NONE,
1.1 pdftotext.1, NONE, 1.1 pdftotext.cc, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the poppler
mailing list