ExchangeFileContents
Lade ...
Suche ...
Keine Treffer
EuBlob.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_EUBLOB_H
2#define INC_EUBLOB_H
3//-----------------------------------------------------------------------------
51//-----------------------------------------------------------------------------
52#include "EuToolTypes.h"
53//#include <new>
54//#include <memory.h>
55#include <cstddef>
56//-----------------------------------------------------------------------------
57namespace eut
58{
59 //---------------------------------------------------------------------------
75 {
76 protected:
77 //============== Attributes
78 //-----------------------------------------------------------------------
88 char * m_pBlob;
89 //-----------------------------------------------------------------------
99 std::size_t m_nSize;
100 //-----------------------------------------------------------------------
111 //-----------------------------------------------------------------------
127 //-----------------------------------------------------------------------
128
129 public:
130 //============== Constructors, destructor
131 //-----------------------------------------------------------------------
142 //-----------------------------------------------------------------------
169 Blob( char * pData, std::size_t nDataSize, bool bCopy = true );
170 //-----------------------------------------------------------------------
182 Blob( const Blob & rBlob );
183 //-----------------------------------------------------------------------
193 virtual ~Blob();
194 //-----------------------------------------------------------------------
195
196 //============== Methoden
197 //-----------------------------------------------------------------------
222 int swap( Blob & rSwapBlob );
223 //-----------------------------------------------------------------------
250 int setData( char * pData, std::size_t nDataSize, bool bCopy = true );
251 //-----------------------------------------------------------------------
272 void setMemResponsible( bool bActiv = true );
273 //-----------------------------------------------------------------------
290 //-----------------------------------------------------------------------
306 void clear();
307 //-----------------------------------------------------------------------
327 void setNULL();
328 //-----------------------------------------------------------------------
354 virtual std::size_t getData( char *& prBlob, bool bCopy = true );
355 //-----------------------------------------------------------------------
378 int getData( char *& prBlob, std::size_t nStartPosition, std::size_t nSize );
379 //-----------------------------------------------------------------------
404 int getBlob( Blob *& prBlob, std::size_t nStartPosition, std::size_t nSize );
405 //-----------------------------------------------------------------------
423 char getChar( std::size_t nPosition );
424 //-----------------------------------------------------------------------
436 std::size_t getSize() const;
437 //-----------------------------------------------------------------------
468 bool findForward( std::size_t & nFoundPosition,
469 const char * pSearchMask,
470 std::size_t nSearchMaskSize,
471 bool bSearchAtTheBeginning );
472 //-----------------------------------------------------------------------
529 bool findForward( std::size_t & nFoundPosition,
530 const char * pSearchMask,
531 std::size_t nSearchMaskSize );
532 //-----------------------------------------------------------------------
561 bool findForwardNext( std::size_t & nFoundPosition,
562 const char * pSearchMask,
563 std::size_t nSearchMaskSize );
564 //-----------------------------------------------------------------------
595 bool findBackward( std::size_t & nFoundPosition,
596 const char * pSearchMask,
597 std::size_t nSearchMaskSize,
598 bool bSearchAtTheEnd );
599 //-----------------------------------------------------------------------
656 bool findBackward( std::size_t & nFoundPosition,
657 const char * pSearchMask,
658 std::size_t nSearchMaskSize );
659 //-----------------------------------------------------------------------
687 bool findBackwardNext( std::size_t & nFoundPosition,
688 const char * pSearchMask,
689 std::size_t nSearchMaskSize );
690 //-----------------------------------------------------------------------
710 int setCurrentPosition( std::size_t nNewPosition );
711 //-----------------------------------------------------------------------
723 std::size_t getCurrentPosition() const;
724 //-----------------------------------------------------------------------
759 int append( const char * pBuffer, std::size_t nBufferSize );
760 //-----------------------------------------------------------------------
774 int append( const Blob * pBlob );
775 //-----------------------------------------------------------------------
789 int append( const Blob & rBlob );
790 //-----------------------------------------------------------------------
829 int insert( const char * pBuffer,
830 std::size_t nBufferSize,
831 std::size_t nBufferPosition );
832 //-----------------------------------------------------------------------
850 int insert( const Blob * pBlob, std::size_t nBufferPosition );
851 //-----------------------------------------------------------------------
869 int insert( const Blob & rBlob, std::size_t nBufferPosition );
870 //-----------------------------------------------------------------------
890 int remove( std::size_t nNumberRemoveBytes, std::size_t nBufferPosition );
891 //-----------------------------------------------------------------------
917 int replace( const char * pOldContent,
918 std::size_t pOldContentSize,
919 const char * pNewContent,
920 std::size_t pNewContentSize );
921 //-----------------------------------------------------------------------
949 int replaceAll( const char * pOldContent,
950 std::size_t pOldContentSize,
951 const char * pNewContent,
952 std::size_t pNewContentSize );
953 //-----------------------------------------------------------------------
954
955 //============== Operatoren
956 //-----------------------------------------------------------------------
972 Blob & operator+= ( const Blob & rBlob );
973 //-----------------------------------------------------------------------
985 Blob & operator= ( const Blob & rBlob );
986 //-----------------------------------------------------------------------
1004 Blob & operator= ( int iNULL );
1005 //-----------------------------------------------------------------------
1016 int operator== ( const Blob & rBlob ) const;
1017 int operator!= ( const Blob & rBlob ) const;
1018 bool operator> ( const Blob & rBlob );
1019 bool operator< ( const Blob & rBlob );
1020 bool operator>= ( const Blob & rBlob );
1021 bool operator<= ( const Blob & rBlob );
1023 //-----------------------------------------------------------------------
1061 operator int() const;
1062 //-----------------------------------------------------------------------
1063 friend Blob operator+ ( Blob lT, const Blob & rrT )
1064 {
1065 lT += rrT;
1066 return lT;
1067 };
1068 //-----------------------------------------------------------------------
1069 };
1070 //---------------------------------------------------------------------------
1071} // namespace eut
1072#endif
Für jede Bibliothek, hier 'EuTools' gibt es eine Typen-Datei.
#define __tool_export_dll
Definition EuToolTypes.h:77
Diese Klasse erlaubt das Bearbeiten eines Blobs (einfügen, kopieren, durchsuchen etc....
Definition EuBlob.h:75
bool m_bMemResponsible
Definition EuBlob.h:126
Blob(const Blob &rBlob)
int swap(Blob &rSwapBlob)
int insert(const Blob &rBlob, std::size_t nBufferPosition)
int remove(std::size_t nNumberRemoveBytes, std::size_t nBufferPosition)
std::size_t m_nSize
Definition EuBlob.h:99
int setCurrentPosition(std::size_t nNewPosition)
char getChar(std::size_t nPosition)
int getData(char *&prBlob, std::size_t nStartPosition, std::size_t nSize)
int insert(const char *pBuffer, std::size_t nBufferSize, std::size_t nBufferPosition)
int replaceAll(const char *pOldContent, std::size_t pOldContentSize, const char *pNewContent, std::size_t pNewContentSize)
bool findForward(std::size_t &nFoundPosition, const char *pSearchMask, std::size_t nSearchMaskSize)
int append(const char *pBuffer, std::size_t nBufferSize)
int insert(const Blob *pBlob, std::size_t nBufferPosition)
bool findForward(std::size_t &nFoundPosition, const char *pSearchMask, std::size_t nSearchMaskSize, bool bSearchAtTheBeginning)
virtual ~Blob()
std::size_t getCurrentPosition() const
bool findBackward(std::size_t &nFoundPosition, const char *pSearchMask, std::size_t nSearchMaskSize, bool bSearchAtTheEnd)
int append(const Blob &rBlob)
virtual std::size_t getData(char *&prBlob, bool bCopy=true)
int append(const Blob *pBlob)
int getBlob(Blob *&prBlob, std::size_t nStartPosition, std::size_t nSize)
bool findBackward(std::size_t &nFoundPosition, const char *pSearchMask, std::size_t nSearchMaskSize)
void clear()
bool findForwardNext(std::size_t &nFoundPosition, const char *pSearchMask, std::size_t nSearchMaskSize)
std::size_t getSize() const
bool isMemResponsible()
int replace(const char *pOldContent, std::size_t pOldContentSize, const char *pNewContent, std::size_t pNewContentSize)
int setData(char *pData, std::size_t nDataSize, bool bCopy=true)
bool findBackwardNext(std::size_t &nFoundPosition, const char *pSearchMask, std::size_t nSearchMaskSize)
Blob(char *pData, std::size_t nDataSize, bool bCopy=true)
std::size_t m_nCurrentPosition
Definition EuBlob.h:110
void setMemResponsible(bool bActiv=true)
char * m_pBlob
Definition EuBlob.h:88
void setNULL()
Definition EuBlob.h:58