Added an Init() method to allow the creator to specify an alternate

character size for the internal representation.
This commit is contained in:
waterson%netscape.com 1999-03-23 01:29:16 +00:00
parent ead840a4b7
commit 86604a8b50
2 changed files with 16 additions and 2 deletions

View File

@ -28,7 +28,7 @@
#define nsIString_h__
#include "nsISupports.h"
struct nsStr;
#include "nsStr.h" // need to include it for eCharSize
// {4C541410-E0B9-11d2-BDB3-000064657374}
#define NS_ISTRING_IID \
@ -39,6 +39,13 @@ class nsIString : public nsISupports
public:
static const nsID& GetIID() { static nsIID iid = NS_ISTRING_IID; return iid; }
/**
* Set the character size to something other than the default character
* size. By default, nsIString objects will have kDefaultCharSize (as defined
* in nsStr.h) as the default char size for their representation.
*/
NS_IMETHOD Init(eCharSize aCharSize) = 0;
/**
* Copy the caller's nsStr into the object's internal nsStr. The copy is "deep";
* that is, it duplicates the contents of "aStr.mStr" as well.

View File

@ -28,7 +28,7 @@
#define nsIString_h__
#include "nsISupports.h"
struct nsStr;
#include "nsStr.h" // need to include it for eCharSize
// {4C541410-E0B9-11d2-BDB3-000064657374}
#define NS_ISTRING_IID \
@ -39,6 +39,13 @@ class nsIString : public nsISupports
public:
static const nsID& GetIID() { static nsIID iid = NS_ISTRING_IID; return iid; }
/**
* Set the character size to something other than the default character
* size. By default, nsIString objects will have kDefaultCharSize (as defined
* in nsStr.h) as the default char size for their representation.
*/
NS_IMETHOD Init(eCharSize aCharSize) = 0;
/**
* Copy the caller's nsStr into the object's internal nsStr. The copy is "deep";
* that is, it duplicates the contents of "aStr.mStr" as well.