/[cvs]/api/Classes/Element/StringElement.cpp
ViewVC logotype

Annotation of /api/Classes/Element/StringElement.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Sun Jul 1 20:47:58 2001 UTC (23 years ago) by bearsoft
Branch point for: lazy, MAIN
Initial revision

1 bearsoft 1.1 #include "StringElement.h"
2     #include "../System/SystemDefine.h"
3     #include "../String/StringTools.h"
4    
5     StringElement::StringElement(char *iBuffer, int iLength)
6     {
7     createElement(iBuffer, iLength);
8     }
9    
10     StringElement::~StringElement()
11     {
12     free(buffer);
13     }
14    
15     void StringElement::createElement(char *iBuffer, int iLength)
16     {
17     StringTools stringTools;
18     int size=(int)(sizeof(char)*iLength);
19     buffer=(char*)malloc(size+sizeof(char));
20     stringTools.copyString(iBuffer, size, buffer);
21     length=iLength;
22     }

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26