Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Public Attributes
nsXPTCVariant Struct Reference

#include <xptcall.h>

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

List of all members.

Public Types

enum  {
  PTR_IS_DATA = 0x1, VAL_IS_ALLOCD = 0x2, VAL_IS_IFACE = 0x4, VAL_IS_ARRAY = 0x8,
  VAL_IS_DOMSTR = 0x10, VAL_IS_UTF8STR = 0x20, VAL_IS_CSTR = 0x40
}

Public Member Functions

void ClearFlags ()
void SetPtrIsData ()
void SetValIsAllocated ()
void SetValIsInterface ()
void SetValIsArray ()
void SetValIsDOMString ()
void SetValIsUTF8String ()
void SetValIsCString ()
PRBool IsPtrData () const
PRBool IsValAllocated () const
PRBool IsValInterface () const
PRBool IsValArray () const
PRBool IsValDOMString () const
PRBool IsValUTF8String () const
PRBool IsValCString () const
void Init (const nsXPTCMiniVariant &mv, const nsXPTType &t, PRUint8 f)

Public Attributes

voidptr
nsXPTType type
PRUint8 flags
union nsXPTCMiniVariant.val val

Detailed Description

Definition at line 93 of file xptcall.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
PTR_IS_DATA 
VAL_IS_ALLOCD 
VAL_IS_IFACE 
VAL_IS_ARRAY 
VAL_IS_DOMSTR 
VAL_IS_UTF8STR 
VAL_IS_CSTR 

Definition at line 103 of file xptcall.h.

    {
        // these are bitflags!
        PTR_IS_DATA    = 0x1,  // ptr points to 'real' data in val
        VAL_IS_ALLOCD  = 0x2,  // val.p holds alloc'd ptr that must be freed
        VAL_IS_IFACE   = 0x4,  // val.p holds interface ptr that must be released
        VAL_IS_ARRAY   = 0x8,  // val.p holds a pointer to an array needing cleanup
        VAL_IS_DOMSTR  = 0x10, // val.p holds a pointer to domstring needing cleanup
        VAL_IS_UTF8STR = 0x20, // val.p holds a pointer to utf8string needing cleanup
        VAL_IS_CSTR    = 0x40  // val.p holds a pointer to cstring needing cleanup        
    };

Member Function Documentation

Definition at line 115 of file xptcall.h.

{flags = 0;}

Here is the caller graph for this function:

Definition at line 132 of file xptcall.h.

    {
        type = t;
        flags = f;

        if(f & PTR_IS_DATA)
        {
            ptr = mv.val.p;
            val.p = nsnull;
        }
        else
        {
            ptr = nsnull;
            switch(t.TagPart()) {
              case nsXPTType::T_I8:                val.i8  = mv.val.i8;  break;
              case nsXPTType::T_I16:               val.i16 = mv.val.i16; break;
              case nsXPTType::T_I32:               val.i32 = mv.val.i32; break;
              case nsXPTType::T_I64:               val.i64 = mv.val.i64; break;
              case nsXPTType::T_U8:                val.u8  = mv.val.u8;  break;
              case nsXPTType::T_U16:               val.u16 = mv.val.u16; break;
              case nsXPTType::T_U32:               val.u32 = mv.val.u32; break;
              case nsXPTType::T_U64:               val.u64 = mv.val.u64; break;
              case nsXPTType::T_FLOAT:             val.f   = mv.val.f;   break;
              case nsXPTType::T_DOUBLE:            val.d   = mv.val.d;   break;
              case nsXPTType::T_BOOL:              val.b   = mv.val.b;   break;
              case nsXPTType::T_CHAR:              val.c   = mv.val.c;   break;
              case nsXPTType::T_WCHAR:             val.wc  = mv.val.wc;  break;
              case nsXPTType::T_VOID:              /* fall through */
              case nsXPTType::T_IID:               /* fall through */
              case nsXPTType::T_DOMSTRING:         /* fall through */
              case nsXPTType::T_CHAR_STR:          /* fall through */
              case nsXPTType::T_WCHAR_STR:         /* fall through */
              case nsXPTType::T_INTERFACE:         /* fall through */
              case nsXPTType::T_INTERFACE_IS:      /* fall through */
              case nsXPTType::T_ARRAY:             /* fall through */
              case nsXPTType::T_PSTRING_SIZE_IS:   /* fall through */
              case nsXPTType::T_PWSTRING_SIZE_IS:  /* fall through */
              case nsXPTType::T_UTF8STRING:        /* fall through */
              case nsXPTType::T_CSTRING:           /* fall through */              
              default:                             val.p   = mv.val.p;   break;
            }
        }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsXPTCVariant::IsPtrData ( ) const [inline]

Definition at line 124 of file xptcall.h.

{return 0 != (flags & PTR_IS_DATA);}

Here is the caller graph for this function:

Definition at line 125 of file xptcall.h.

{return 0 != (flags & VAL_IS_ALLOCD);}

Here is the caller graph for this function:

PRBool nsXPTCVariant::IsValArray ( ) const [inline]

Definition at line 127 of file xptcall.h.

{return 0 != (flags & VAL_IS_ARRAY);}

Here is the caller graph for this function:

PRBool nsXPTCVariant::IsValCString ( ) const [inline]

Definition at line 130 of file xptcall.h.

{return 0 != (flags & VAL_IS_CSTR);}    

Here is the caller graph for this function:

Definition at line 128 of file xptcall.h.

{return 0 != (flags & VAL_IS_DOMSTR);}

Here is the caller graph for this function:

Definition at line 126 of file xptcall.h.

{return 0 != (flags & VAL_IS_IFACE);}

Here is the caller graph for this function:

Definition at line 129 of file xptcall.h.

{return 0 != (flags & VAL_IS_UTF8STR);}

Here is the caller graph for this function:

Definition at line 116 of file xptcall.h.

Here is the caller graph for this function:

Definition at line 117 of file xptcall.h.

Here is the caller graph for this function:

Definition at line 119 of file xptcall.h.

Here is the caller graph for this function:

Definition at line 122 of file xptcall.h.

Here is the caller graph for this function:

Definition at line 120 of file xptcall.h.

Here is the caller graph for this function:

Definition at line 118 of file xptcall.h.

Here is the caller graph for this function:

Definition at line 121 of file xptcall.h.

Here is the caller graph for this function:


Member Data Documentation

Definition at line 101 of file xptcall.h.

Definition at line 99 of file xptcall.h.

Definition at line 100 of file xptcall.h.

union { ... } nsXPTCMiniVariant::val [inherited]

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