Back to index

lightning-sunbird  0.9+nobinonly
Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
nsPropertyTable Class Reference

#include <nsPropertyTable.h>

Collaboration diagram for nsPropertyTable:
Collaboration graph
[legend]

List of all members.

Classes

struct  PropertyList

Public Member Functions

voidGetProperty (const void *aObject, nsIAtom *aPropertyName, nsresult *aResult=nsnull)
 Get the value of the property |aPropertyName| for node |aObject|.
 NS_HIDDEN_ (nsresult) SetProperty(const void *aObject
 Set the value of the property |aPropertyName| to |aPropertyValue| for node |aObject|.
 NS_HIDDEN_ (nsresult) DeleteProperty(const void *aObject
 Delete the property |aPropertyName| for object |aObject|.
voidUnsetProperty (const void *aObject, nsIAtom *aPropertyName, nsresult *aStatus=nsnull)
 Unset the property |aPropertyName| for object |aObject|, but do not call the property's destructor function.
 NS_HIDDEN_ (void) DeleteAllPropertiesFor(const void *aObject)
 Deletes all of the properties for object |aObject|, calling the destructor function for each property.
 NS_HIDDEN_ (void) DeleteAllProperties()
 Deletes all of the properties for all objects in the property table, calling the destructor function for each property.
 ~nsPropertyTable ()

Public Attributes

nsIAtomaPropertyName
nsIAtom voidaPropertyValue
nsIAtom void NSPropertyDtorFunc aDtor
nsIAtom void
NSPropertyDtorFunc void
aDtorData

Private Member Functions

 NS_HIDDEN_ (void) DestroyPropertyList()
 NS_HIDDEN_ (PropertyList *) GetPropertyListFor(nsIAtom *aPropertyName) const
 NS_HIDDEN_ (void *) GetPropertyInternal(const void *aObject

Private Attributes

nsIAtom PRBool aRemove
nsIAtom PRBool nsresultaStatus
PropertyListmPropertyList

Detailed Description

Definition at line 74 of file nsPropertyTable.h.


Constructor & Destructor Documentation

Definition at line 130 of file nsPropertyTable.h.

                     {
    DeleteAllProperties();
  }

Member Function Documentation

void* nsPropertyTable::GetProperty ( const void aObject,
nsIAtom aPropertyName,
nsresult aResult = nsnull 
) [inline]

Get the value of the property |aPropertyName| for node |aObject|.

|aResult|, if supplied, is filled in with a return status code.

Definition at line 81 of file nsPropertyTable.h.

  { return GetPropertyInternal(aObject, aPropertyName, PR_FALSE, aResult); }

Here is the caller graph for this function:

Set the value of the property |aPropertyName| to |aPropertyValue| for node |aObject|.

|aDtor| is a destructor for the property value to be called if the property is removed. It can be null if no destructor is required. |aDtorData| is an optional opaque context to be passed to the property destructor. Note that the destructor is global for each property name regardless of node; it is an error to set a given property with a different destructor than was used before (this will return NS_ERROR_INVALID_ARG).

Delete the property |aPropertyName| for object |aObject|.

The property's destructor function will be called.

Deletes all of the properties for object |aObject|, calling the destructor function for each property.

Deletes all of the properties for all objects in the property table, calling the destructor function for each property.

nsPropertyTable::NS_HIDDEN_ ( PropertyList ) const [private]
nsPropertyTable::NS_HIDDEN_ ( void ) const [private]
void* nsPropertyTable::UnsetProperty ( const void aObject,
nsIAtom aPropertyName,
nsresult aStatus = nsnull 
) [inline]

Unset the property |aPropertyName| for object |aObject|, but do not call the property's destructor function.

The property value is returned.

Definition at line 113 of file nsPropertyTable.h.

  { return GetPropertyInternal(aObject, aPropertyName, PR_TRUE, aStatus); }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 97 of file nsPropertyTable.h.

Definition at line 97 of file nsPropertyTable.h.

Definition at line 97 of file nsPropertyTable.h.

Definition at line 97 of file nsPropertyTable.h.

Definition at line 140 of file nsPropertyTable.h.

Definition at line 140 of file nsPropertyTable.h.

Definition at line 144 of file nsPropertyTable.h.


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