TypeInfoArray Class Reference

Holds the list of choices that appears in a drop-down list. More...

#include <HPropert.h>

Collaboration diagram for TypeInfoArray:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TypeInfoArray ()
 ~TypeInfoArray ()
void SetArraySize (int count)
void DeleteArray ()
HTypeInfooperator[] (int index)
HTypeInfoGetTypeInfoArrayData ()
int GetCount () const

Private Member Functions

void AllocArray (HTypeInfo **array, int count)
void DeleteArray (HTypeInfo *array)
HTypeInfoElementAt (HTypeInfo *array, int index)

Private Attributes

HTypeInfom_typeinfoarray
int m_count

Detailed Description

Holds the list of choices that appears in a drop-down list.

This class is to be used with HTypePropertyInfo and supplies the list of HTypeInfo that are to appear in the UI drop-down list

See also:
HTypePropertyInfo
Note:
There are no functions for adding HTypeInfo in this array. See TypeInfoArray::SetArraySize for an example of how to fill the array.

Definition at line 648 of file HPropert.h.


Constructor & Destructor Documentation

TypeInfoArray::TypeInfoArray  )  [inline]
 

Definition at line 659 of file HPropert.h.

TypeInfoArray::~TypeInfoArray  )  [inline]
 

Definition at line 663 of file HPropert.h.


Member Function Documentation

void TypeInfoArray::AllocArray HTypeInfo **  array,
int  count
[private]
 

void TypeInfoArray::DeleteArray  )  [inline]
 

Definition at line 671 of file HPropert.h.

void TypeInfoArray::DeleteArray HTypeInfo array  )  [private]
 

HTypeInfo* TypeInfoArray::ElementAt HTypeInfo array,
int  index
[private]
 

int TypeInfoArray::GetCount  )  const [inline]
 

Retrieves the number of HTypeInfo elements in the array.

Definition at line 680 of file HPropert.h.

HTypeInfo* TypeInfoArray::GetTypeInfoArrayData  )  [inline]
 

Definition at line 679 of file HPropert.h.

HTypeInfo* TypeInfoArray::operator[] int  index  )  [inline]
 

Definition at line 676 of file HPropert.h.

void TypeInfoArray::SetArraySize int  count  )  [inline]
 

Sets the size of the array a priori.

Parameters:
count - The number of elements in the array.
m_typeinfoarray.SetArraySize(4);
for(int i=0; i < NUMTYPES; i++) {
   HTypeInfo *typeinfo = m_typeinfoarray[i];
   CString string;
   switch (i) {
   case TYPE1:
      typeinfo->SetMatchName("MyType1");
      string.LoadString(IDS_MYTYPE1);
      break;
   case TYPE2:
      typeinfo->SetMatchName("MyType2");
      string.LoadString(IDS_MYTYPE2);
      break;
   case TYPE3:
      typeinfo->SetMatchName("MyType3");
      string.LoadString(IDS_MYTYPE3);
      break;
   case TYPE4:
      typeinfo->SetMatchName("MyType4");
      string.LoadString(IDS_MYTYPE4);
      break;
   }
   typeinfo->SetLocalizedName(string);
}
Note:
The array may not be resized dynamically since any data in it will be lost upon resizing.

Definition at line 666 of file HPropert.h.


Member Data Documentation

int TypeInfoArray::m_count [private]
 

Definition at line 652 of file HPropert.h.

HTypeInfo* TypeInfoArray::m_typeinfoarray [private]
 

Definition at line 651 of file HPropert.h.


The documentation for this class was generated from the following files:
This A:M SDK v12.0 documentation is maintained by Hash Inc. Please address any comments concerning this documentation to AMReports. If you have any information, knowledge, or documentation to share with the A:M developer community, please post them on the Hash SDK forum.

Generated on Thu Oct 27 11:47:04 2005 with doxygen 1.4.5 written by Dimitri van Heesch, © 1997-2001