Mozdev
mozilla/verbosio/datatypes/nsWritableDataMatrix.h
author Alex Vincent@SKYFIREDEMO1
Thu Dec 04 20:09:28 2008 -0800 (14 months ago)
changeset 52 1a65f4082381
parent 44b46d94dbdf03
permissions -rw-r--r--
Fix build bustage.
     1 #include "nsIDataMatrix.h"
     2 #include "nsTPtrArray.h"
     3 #include "nsIClassInfoImpl.h"
     4 #include "nsCOMPtr.h"
     5 #include "nsAutoPtr.h"
     6 
     7 typedef nsTPtrArray<nsISupports> MatrixRow;
     8 typedef nsAutoPtr<MatrixRow> MatrixAutoRow;
     9 
    10 class nsWritableDataMatrix : public nsIWritableDataMatrix
    11 {
    12 public:
    13   NS_DECL_ISUPPORTS
    14   NS_DECL_NSIDATAMATRIX
    15   NS_DECL_NSIWRITABLEDATAMATRIX
    16 
    17   nsWritableDataMatrix();
    18   nsresult Init();
    19 
    20 private:
    21   ~nsWritableDataMatrix();
    22 
    23   nsTArray<MatrixAutoRow> matrix;
    24   PRUint32 mColumnCount;
    25 
    26   nsresult GetEnsuredRow(PRUint32 rowIndex, MatrixRow **row);
    27   void EnsureColumnCount(PRUint32 columnCount);
    28   void TruncateExtraColumns();
    29 
    30 protected:
    31   /* additional members */
    32 };
    33 
    34 // fb77a827-a375-49d6-a723-79b2ac66fb21
    35 #define NSWRITABLEDATAMATRIX_CID \
    36 { 0xfb77a827, 0xa375, 0x49d6, \
    37   { 0xa7, 0x23, 0x79, 0xb2, 0xac, 0x66, 0xfb, 0x21 } }
    38 
    39 #define NSWRITABLEDATAMATRIX_CONTRACTID "@mozilla.org/data-matrix;1"