/* * Copyright 2004 Perforce Software. All rights reserved. * * Developed by Data Shades Ltd. */ #include "StrBufArray.h" #include "debug.h" StrBufArray::~StrBufArray() { for ( int i=0; i<Count(); i++ ) { StrBuf *buff = (StrBuf *)VarArray::Get( i ); delete buff; } } void StrBufArray::Put( TCHAR *v ) { StrBuf *buff = new StrBuf(); int len = _tcslen( v ); buff->Set( (const char *)v, (len + 1) * sizeof( TCHAR ) ); buff->SetLength( len * sizeof(TCHAR) ); VarArray::Put( buff ); // char debug[512]; // sprintf( debug, "String: %ls, Length: %d", buff->Text(), buff->Length() ); // DBG2_output(debug); } TCHAR *StrBufArray::Get( int i ) { StrBuf *buff = (StrBuf *)VarArray::Get( i ); return (TCHAR *)buff->Text(); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 11314 | Robert Cowham | Initial population of perforce_software version of P4OFC | ||
//guest/robert_cowham/perforce/P4OFC/main/libp4gt/StrBufArray.cpp | |||||
#1 | 10843 | Robert Cowham |
Initial version of P4OFC source code. See README.txt (and LICENSE.txt and doc\P4OFC-Design.docx) |