Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes
nsJSID Class Reference

#include <xpcprivate.h>

Inheritance diagram for nsJSID:
Inheritance graph
[legend]
Collaboration diagram for nsJSID:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIJSID PRBool 
InitWithName (const nsID &id, const char *nameString)
PRBool SetName (const char *name)
void SetNameToNoString ()
PRBool NameIsSet () const
const nsIDGetID () const
PRBool IsValid () const
 nsJSID ()
virtual ~nsJSID ()
boolean equals (in nsIJSID other)
void initialize (in string idString)
string toString ()

Static Public Member Functions

static nsJSIDNewID (const char *str)

Public Attributes

readonly attribute string name
readonly attribute string number
readonly attribute nsIDPtr id
readonly attribute boolean valid

Protected Member Functions

void Reset ()
const nsIDGetInvalidIID () const

Protected Attributes

nsID mID
char * mNumber
char * mName

Static Protected Attributes

static char gNoString [] = ""

Detailed Description

Definition at line 2633 of file xpcprivate.h.


Constructor & Destructor Documentation

Definition at line 53 of file xpcjsid.cpp.

Here is the caller graph for this function:

nsJSID::~nsJSID ( ) [virtual]

Definition at line 58 of file xpcjsid.cpp.


Member Function Documentation

boolean nsIJSID::equals ( in nsIJSID  other) [inherited]
const nsID* nsJSID::GetID ( ) const [inline]

Definition at line 2646 of file xpcprivate.h.

{return &mID;}
const nsID & nsJSID::GetInvalidIID ( ) const [protected]

Definition at line 216 of file xpcjsid.cpp.

{
    // {BB1F47B0-D137-11d2-9841-006008962422}
    static nsID invalid = {0xbb1f47b0, 0xd137, 0x11d2,
                            {0x98, 0x41, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22}};
    return invalid;
}

Here is the caller graph for this function:

void nsIJSID::initialize ( in string  idString) [inherited]
PRBool nsJSID::InitWithName ( const nsID id,
const char *  nameString 
)

Definition at line 186 of file xpcjsid.cpp.

{
    NS_ASSERTION(nameString, "no name");
    Reset();
    mID = id;
    return SetName(nameString);
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsJSID::IsValid ( ) const [inline]

Definition at line 2648 of file xpcprivate.h.

{return !mID.Equals(GetInvalidIID());}
PRBool nsJSID::NameIsSet ( ) const [inline]

Definition at line 2645 of file xpcprivate.h.

{return nsnull != mName;}

Here is the caller graph for this function:

nsJSID * nsJSID::NewID ( const char *  str) [static]

Definition at line 226 of file xpcjsid.cpp.

{
    if(!str)
    {
        NS_ASSERTION(0,"no string");
        return nsnull;
    }

    nsJSID* idObj = new nsJSID();
    if(idObj)
    {
        NS_ADDREF(idObj);
        if(NS_FAILED(idObj->Initialize(str)))
            NS_RELEASE(idObj);
    }
    return idObj;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsJSID::Reset ( void  ) [protected]

Definition at line 66 of file xpcjsid.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsJSID::SetName ( const char *  name)

Definition at line 79 of file xpcjsid.cpp.

{
    NS_ASSERTION(!mName || mName == gNoString ,"name already set");
    NS_ASSERTION(name,"null name");
    int len = strlen(name)+1;
    mName = (char*)PR_Malloc(len);
    if(!mName)
        return PR_FALSE;
    memcpy(mName, name, len);
    return PR_TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2643 of file xpcprivate.h.

        {NS_ASSERTION(!mName, "name already set"); mName = gNoString;}

Here is the caller graph for this function:

string nsIJSID::toString ( ) [inherited]

Member Data Documentation

char nsJSID::gNoString = "" [static, protected]

Definition at line 2660 of file xpcprivate.h.

readonly attribute nsIDPtr nsIJSID::id [inherited]

Definition at line 48 of file xpcjsid.idl.

nsID nsJSID::mID [protected]

Definition at line 2661 of file xpcprivate.h.

char* nsJSID::mName [protected]

Definition at line 2663 of file xpcprivate.h.

char* nsJSID::mNumber [protected]

Definition at line 2662 of file xpcprivate.h.

readonly attribute string nsIJSID::name [inherited]

Definition at line 46 of file xpcjsid.idl.

readonly attribute string nsIJSID::number [inherited]

Definition at line 47 of file xpcjsid.idl.

readonly attribute boolean nsIJSID::valid [inherited]

Definition at line 49 of file xpcjsid.idl.


The documentation for this class was generated from the following files: