Code Search for Developers
 
 
  

ChPtrArr.h from bccSDK at Krugle


Show ChPtrArr.h syntax highlighted

//***************************************************************************
//
//  Copyright © Microsoft Corporation.  All rights reserved.
//
//  chptrarr.h
//
//  Purpose: Non-MFC CPtrArray class definition
//
//***************************************************************************

#if _MSC_VER > 1000
#pragma once
#endif

#ifndef __CHPTRARRAY__
#define __CHPTRARRAY__

#ifdef __BORLANDC__
#pragma option push -b -a8 -pc -A- /*P_O_Push*/
#endif

#include <windows.h>
#include <limits.h>
#include <assert.h>
#include <tchar.h>
#include <polarity.h>
#include <ProvExce.h>

class POLARITY CHPtrArray
{
    public :

        // Construction/destruction
        //=========================

    CHPtrArray() ;

// Attributes
    int GetSize() const ;
    int GetUpperBound() const ;
    void SetSize(int nNewSize, int nGrowBy = -1) throw ( CHeap_Exception ) ;

// Operations
    // Clean up
    void FreeExtra() throw ( CHeap_Exception ) ;
    void RemoveAll() ;

    // Accessing elements
    void* GetAt(int nIndex) const ;
    void SetAt(int nIndex, void* newElement) ;
    void*& ElementAt(int nIndex) ;

    // Direct Access to the element data (may return NULL)
    const void** GetData() const ;
    void** GetData() ;

    // Potentially growing the array
    void SetAtGrow(int nIndex, void* newElement) throw ( CHeap_Exception ) ;
    int Add(void* newElement) throw ( CHeap_Exception ) ;
    int Append(const CHPtrArray& src) throw ( CHeap_Exception ) ;
    void Copy(const CHPtrArray& src) throw ( CHeap_Exception ) ;

    // overloaded operator helpers
    void* operator[](int nIndex) const ;
    void*& operator[](int nIndex) ;

    // Operations that move elements around
    void InsertAt(int nIndex, void* newElement, int nCount = 1) throw ( CHeap_Exception ) ;
    void RemoveAt(int nIndex, int nCount = 1) ;
    void InsertAt(int nStartIndex, CHPtrArray* pNewArray) throw ( CHeap_Exception ) ;

// Implementation
protected:
    void** m_pData ;   // the actual array of data
    int m_nSize ;     // # of elements (upperBound - 1)
    int m_nMaxSize ;  // max allocated
    int m_nGrowBy ;   // grow amount

public:
    ~CHPtrArray() ;
#ifdef _DEBUG
//    void Dump(CDumpContext&) const ;
    void AssertValid() const ;
#endif

protected:
    // local typedefs for class templates
    typedef void* BASE_TYPE ;
    typedef void* BASE_ARG_TYPE ;
} ;

#ifdef __BORLANDC__
#pragma option pop /*P_O_Pop*/
#endif

#endif




See more files for this project here

bccSDK

This project has a goal to provide complete port of latest MS Platform SDK along with some other commonly used separate SDK\'s for both older and newer Borland compilers. This includes headers, idl files and static and import lib files.

Project homepage: http://sourceforge.net/projects/bccsdk
Programming language(s): C,C++,IDL
License: mit

  atl/
  idl/
  wtl/
  ADSIid.h
  AF_Irda.h
  AccCtrl.h
  AclAPI.h
  AclUI.h
  ActivScp.h
  ActiveDS.h
  Admex.h
  Adptif.h
  AdsDb.h
  AdsErr.h
  AdsHlp.h
  AdsProp.h
  Adsnms.h
  Adssts.h
  AdtGen.h
  AgtCtl.h
  AgtCtl_i.c
  AgtErr.h
  AgtSvr.h
  AgtSvr_i.c
  AppAvCap.h
  AqAdmTyp.h
  AqErr.mc
  Asptlb.h
  AtalkWsh.h
  AuthZ.h
  Authif.h
  AviFmt.h
  BLBErr.h
  BaseTsd.h
  BaseTyps.h
  BatClass.h
  BiDiSpl.h
  Bits.h
  BitsMsg.h
  BluetoothAPIs.h
  CChannel.h
  CDONTS.h
  CDOSys.h
  CDOSysErr.h
  CDOSysStr.h
  CDOSys_I.c
  CGuid.h
  CatErr.mc
  CdErr.h
  CeLib.h
  CertAdm.h
  CertBCli.h
  CertBase.h
  CertCli.h
  CertEnc.h
  CertExit.h
  CertMod.h
  CertPol.h
  CertSrv.h
  CertView.h
  Certif.h
  ChPtrArr.h
  ChStrArr.h
  ChString.h
  ChanMgr.h
  CiError.h
  CluAdmEx.h
  ClusApi.h
  ClusCfgGuids.h
  ClusCfgServer.h
  ClusCfgWizard.h
  CmnQuery.h
  Codecs.h
  Color.Dlg
  ColorDlg.h
  ComAdmin.h
  ComCat.h
  ComDef.h
  ComSvcs.h
  CommCtrl.h
  CommCtrl.rh
  CommDlg.h
  CompObj.h
  ConfPriv.h
  CorReg.h
  Cpl.h
  Cplext.h
  CustCntl.h
  CustomAw.h
  DHtmldid.h
  DHtmled.h
  DHtmled.js
  DHtmled.vbs
  DHtmliid.h
  DSAdmin.h
  DSClient.h
  DSQuery.h
  DSRole.h
  DShow.h
  DataPath.h
  DbgEng.h
  DbgHelp.h
  DbgProp.h
  Dbt.h