2000-03-29 08:11:59 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/*
|
2000-08-08 00:14:35 +00:00
|
|
|
* The contents of this file are subject to the Mozilla Public
|
2000-03-29 08:11:59 +00: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 00:14:35 +00:00
|
|
|
* the License at http://www.mozilla.org/MPL/
|
|
|
|
*
|
2000-03-29 08:11:59 +00: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 00:14:35 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Mozilla XPCOM.
|
|
|
|
*
|
2000-03-29 08:11:59 +00:00
|
|
|
* The Initial Developer of the Original Code is Netscape
|
|
|
|
* Communications Corporation. Portions created by Netscape are
|
2000-08-08 00:14:35 +00:00
|
|
|
* Copyright (C) 2000 Netscape Communications Corporation. All
|
2000-03-29 08:11:59 +00:00
|
|
|
* Rights Reserved.
|
|
|
|
*
|
2000-05-12 05:20:21 +00:00
|
|
|
* Original Author:
|
|
|
|
* Scott Collins <scc@mozilla.org>
|
|
|
|
*
|
2000-03-29 08:11:59 +00:00
|
|
|
* Contributor(s):
|
|
|
|
*/
|
|
|
|
|
2000-05-20 20:43:26 +00:00
|
|
|
#ifndef nsFragmentedString_h___
|
|
|
|
#define nsFragmentedString_h___
|
2000-03-29 08:11:59 +00:00
|
|
|
|
|
|
|
// WORK IN PROGRESS
|
|
|
|
|
2000-05-20 20:43:26 +00:00
|
|
|
#ifndef nsAWritableString_h___
|
2000-03-29 08:11:59 +00:00
|
|
|
#include "nsAWritableString.h"
|
2000-05-20 20:43:26 +00:00
|
|
|
#endif
|
2000-03-29 08:11:59 +00:00
|
|
|
|
|
|
|
template <class CharT>
|
|
|
|
class basic_nsFragmentedString
|
|
|
|
: public basic_nsAWritableString<CharT>
|
|
|
|
/*
|
|
|
|
...
|
|
|
|
*/
|
|
|
|
{
|
2000-08-08 00:14:35 +00:00
|
|
|
protected:
|
|
|
|
virtual const void* Implementation() const;
|
|
|
|
|
|
|
|
virtual const CharT* GetReadableFragment( nsReadableFragment<CharT>&, nsFragmentRequest, PRUint32 ) const;
|
|
|
|
virtual CharT* GetWritableFragment( nsWritableFragment<CharT>&, nsFragmentRequest, PRUint32 );
|
|
|
|
|
2000-03-29 08:11:59 +00:00
|
|
|
public:
|
2000-08-08 00:14:35 +00:00
|
|
|
virtual PRUint32 Length() const;
|
|
|
|
|
|
|
|
virtual void SetCapacity( PRUint32 aNewCapacity );
|
|
|
|
virtual void SetLength( PRUint32 aNewLength );
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2000-03-29 08:11:59 +00:00
|
|
|
// ...
|
|
|
|
};
|
|
|
|
|
2000-08-08 00:14:35 +00:00
|
|
|
/**
|
|
|
|
* |SetLength|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* |SetCapacity|.
|
|
|
|
*
|
|
|
|
* If a client tries to increase the capacity of multi-fragment string, perhaps a single
|
|
|
|
* empty fragment of the appropriate size should be appended.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-05-20 20:43:26 +00:00
|
|
|
#endif // !defined(nsFragmentedString_h___)
|