123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- #ifndef nsID_h__
- #define nsID_h__
- #include <string.h>
- #ifndef nscore_h___
- #include "nscore.h"
- #endif
- struct nsID {
-
-
- PRUint32 m0;
- PRUint16 m1;
- PRUint16 m2;
- PRUint8 m3[8];
-
-
-
-
- inline PRBool Equals(const nsID& other) const {
-
-
-
-
-
-
- return (PRBool)
- ((((PRUint32*) &m0)[0] == ((PRUint32*) &other.m0)[0]) &&
- (((PRUint32*) &m0)[1] == ((PRUint32*) &other.m0)[1]) &&
- (((PRUint32*) &m0)[2] == ((PRUint32*) &other.m0)[2]) &&
- (((PRUint32*) &m0)[3] == ((PRUint32*) &other.m0)[3]));
- }
-
- NS_COM_GLUE PRBool Parse(const char *aIDStr);
-
- NS_COM_GLUE char* ToString() const;
-
- };
- typedef nsID nsCID;
- #define NS_DEFINE_CID(_name, _cidspec) \
- const nsCID _name = _cidspec
- #define REFNSCID const nsCID&
- typedef nsID nsIID;
- #define REFNSIID const nsIID&
-
- #define NS_DEFINE_IID(_name, _iidspec) \
- const nsIID _name = _iidspec
- #define NS_DEFINE_STATIC_IID_ACCESSOR(the_iid) \
- static const nsIID& GetIID() {static const nsIID iid = the_iid; return iid;}
- #define NS_DEFINE_STATIC_CID_ACCESSOR(the_cid) \
- static const nsID& GetCID() {static const nsID cid = the_cid; return cid;}
- #endif
|