filters

myfile.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 1999 Werner Trobin <trobin@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017    Boston, MA 02111-1307, USA.
00018 
00019 DESCRIPTION
00020 
00021     A data-structure to hold the file data for an OLE stream. Shared storage is
00022     used to implement reference counting and storage reclamation.
00023 */
00024 
00025 #ifndef MYFILE_H
00026 #define MYFILE_H
00027 
00028 #include <qcstring.h>
00029 
00030 class myFile: public QByteArray
00031 {
00032 public:
00033     myFile() { data = 0L; length = 0; }
00034 
00035     // NOTE: this implementation may look completely ugly, but its features are
00036     // mostly for backwards compatibility. If you feel like cleaning up, be my
00037     // guest!
00038 
00039     const unsigned char *data;
00040     unsigned int length;
00041 
00042     void setRawData(const unsigned char *data, unsigned length)
00043     {
00044         this->data = data;
00045         this->length = length;
00046         QByteArray::setRawData((const char *)data, length);
00047     }
00048 };
00049 #endif // MYFILE_H
KDE Home | KDE Accessibility Home | Description of Access Keys