2000-03-29 12:11:59 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/*
|
2000-08-08 04:14:35 +04:00
|
|
|
* The contents of this file are subject to the Mozilla Public
|
2000-03-29 12:11:59 +04:00
|
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
2000-08-08 04:14:35 +04:00
|
|
|
* the License at http://www.mozilla.org/MPL/
|
|
|
|
*
|
2000-03-29 12:11:59 +04:00
|
|
|
* Software distributed under the License is distributed on an "AS
|
|
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
* implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
2000-08-08 04:14:35 +04:00
|
|
|
*
|
|
|
|
* The Original Code is Mozilla XPCOM.
|
|
|
|
*
|
2000-03-29 12:11:59 +04:00
|
|
|
* The Initial Developer of the Original Code is Netscape
|
|
|
|
* Communications Corporation. Portions created by Netscape are
|
2000-08-08 04:14:35 +04:00
|
|
|
* Copyright (C) 2000 Netscape Communications Corporation. All
|
2000-03-29 12:11:59 +04:00
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
2000-09-02 08:10:44 +04:00
|
|
|
* Scott Collins <scc@mozilla.org> (original author)
|
|
|
|
*
|
2000-03-29 12:11:59 +04:00
|
|
|
*/
|
|
|
|
|
2000-05-21 00:43:26 +04:00
|
|
|
#ifndef nsFragmentedString_h___
|
|
|
|
#define nsFragmentedString_h___
|
2000-03-29 12:11:59 +04:00
|
|
|
|
|
|
|
// WORK IN PROGRESS
|
|
|
|
|
2000-05-21 00:43:26 +04:00
|
|
|
#ifndef nsAWritableString_h___
|
2000-03-29 12:11:59 +04:00
|
|
|
#include "nsAWritableString.h"
|
2000-05-21 00:43:26 +04:00
|
|
|
#endif
|
2000-03-29 12:11:59 +04:00
|
|
|
|
2000-09-09 10:42:45 +04:00
|
|
|
#ifndef nsSharedBufferList_h___
|
|
|
|
#include "nsSharedBufferList.h"
|
|
|
|
#endif
|
2000-08-09 06:47:33 +04:00
|
|
|
|
|
|
|
|
2000-09-09 10:42:45 +04:00
|
|
|
class nsFragmentedString
|
|
|
|
: public basic_nsAWritableString<PRUnichar>
|
2000-03-29 12:11:59 +04:00
|
|
|
/*
|
|
|
|
...
|
|
|
|
*/
|
|
|
|
{
|
2000-08-08 04:14:35 +04:00
|
|
|
protected:
|
2000-09-09 10:42:45 +04:00
|
|
|
virtual const PRUnichar* GetReadableFragment( nsReadableFragment<PRUnichar>&, nsFragmentRequest, PRUint32 ) const;
|
|
|
|
virtual PRUnichar* GetWritableFragment( nsWritableFragment<PRUnichar>&, nsFragmentRequest, PRUint32 );
|
2000-08-08 04:14:35 +04:00
|
|
|
|
2000-03-29 12:11:59 +04:00
|
|
|
public:
|
2000-09-09 10:42:45 +04:00
|
|
|
nsFragmentedString() { }
|
2000-08-10 04:45:33 +04:00
|
|
|
|
2000-08-08 04:14:35 +04:00
|
|
|
virtual PRUint32 Length() const;
|
|
|
|
|
|
|
|
virtual void SetLength( PRUint32 aNewLength );
|
2000-08-09 06:47:33 +04:00
|
|
|
// virtual void SetCapacity( PRUint32 aNewCapacity );
|
|
|
|
|
|
|
|
// virtual void Cut( PRUint32 cutStart, PRUint32 cutLength );
|
|
|
|
|
|
|
|
protected:
|
2000-09-09 10:42:45 +04:00
|
|
|
// virtual void do_AssignFromReadable( const basic_nsAReadableString<PRUnichar>& );
|
|
|
|
// virtual void do_AppendFromReadable( const basic_nsAReadableString<PRUnichar>& );
|
|
|
|
// virtual void do_InsertFromReadable( const basic_nsAReadableString<PRUnichar>&, PRUint32 );
|
|
|
|
// virtual void do_ReplaceFromReadable( PRUint32, PRUint32, const basic_nsAReadableString<PRUnichar>& );
|
2000-08-08 04:14:35 +04:00
|
|
|
|
|
|
|
private:
|
2000-09-09 10:42:45 +04:00
|
|
|
nsSharedBufferList mBufferList;
|
2000-03-29 12:11:59 +04:00
|
|
|
};
|
|
|
|
|
2000-05-21 00:43:26 +04:00
|
|
|
#endif // !defined(nsFragmentedString_h___)
|