gecko-dev/string/public/nsFragmentedString.h

74 lines
1.9 KiB
C
Raw Normal View History

2000-03-29 08:11:59 +00:00
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* 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
* 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.
*
* 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
* 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):
*/
#ifndef nsFragmentedString_h___
#define nsFragmentedString_h___
2000-03-29 08:11:59 +00:00
// WORK IN PROGRESS
#ifndef nsAWritableString_h___
2000-03-29 08:11:59 +00:00
#include "nsAWritableString.h"
#endif
2000-03-29 08:11:59 +00:00
template <class CharT>
class basic_nsFragmentedString
: public basic_nsAWritableString<CharT>
/*
...
*/
{
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:
virtual PRUint32 Length() const;
virtual void SetCapacity( PRUint32 aNewCapacity );
virtual void SetLength( PRUint32 aNewLength );
private:
2000-03-29 08:11:59 +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.
*/
#endif // !defined(nsFragmentedString_h___)