epoc32/include/bamdesca.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 bamdesca.h
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Started by DavidW, March 1996
       
    15 // Mixin descriptor array
       
    16 // 
       
    17 //
       
    18 
       
    19 #if !defined(__BAMDESCA_H__)
       
    20 #define __BAMDESCA_H__
       
    21 
       
    22 #if !defined(__E32STD_H__)
       
    23 #include <e32std.h>
       
    24 #endif
       
    25 
       
    26 
       
    27 
       
    28 class MDesC8Array
       
    29 /** 
       
    30 Interface class for 8 bit descriptor arrays. 
       
    31 It should be inherited by classes which implement this protocol.
       
    32 
       
    33 This protocol is implemented by class CDesC8Array and the concrete class CPtrC8Array. 
       
    34 @publishedAll
       
    35 @released
       
    36 */
       
    37     {
       
    38 public:
       
    39 	/** Destructor. */
       
    40     virtual ~MDesC8Array() {}
       
    41 	/** Requirements
       
    42 	
       
    43 	Returns the number of descriptor elements in a descriptor array.
       
    44 	
       
    45 	@return The number of descriptor elements in a descriptor array. */
       
    46     virtual TInt MdcaCount() const =0;
       
    47 
       
    48 	/** Requirements
       
    49 	
       
    50 	Indexes into a descriptor array.
       
    51 	
       
    52 	@param aIndex The position of the descriptor element within a descriptor array. 
       
    53 	The position is relative to zero; i.e. zero implies the first descriptor element 
       
    54 	in a descriptor array. 
       
    55 	@return An 8 bit non-modifiable pointer descriptor representing the descriptor 
       
    56 	element located at position aIndex within a descriptor array. */
       
    57     virtual TPtrC8 MdcaPoint(TInt aIndex) const =0;
       
    58     };
       
    59 
       
    60 
       
    61 class MDesC16Array
       
    62 /**
       
    63 Interface class for 16 bit descriptor arrays. It should be inherited by classes 
       
    64 which implement this protocol.
       
    65 This protocol is implemented by class CDesC16Array and the concrete class 
       
    66 CPtrC16Array. 
       
    67 @publishedAll
       
    68 @released
       
    69 */
       
    70     {
       
    71 public:
       
    72 	/** Destructor. */
       
    73     virtual ~MDesC16Array() {}
       
    74 
       
    75 	/** Requirements
       
    76 	
       
    77 	Returns the number of descriptor elements in a descriptor array.
       
    78 	
       
    79 	@return The number of descriptor elements in a descriptor array. */
       
    80     virtual TInt MdcaCount() const =0;
       
    81 	/** Requirements
       
    82 	
       
    83 	Indexes into a descriptor array.
       
    84 	
       
    85 	@param aIndex The position of the descriptor element within a descriptor array. 
       
    86 	The position is relative to zero; i.e. zero implies the first descriptor element 
       
    87 	in a descriptor array. 
       
    88 	@return A 16 bit non-modifiable pointer descriptor representing the descriptor 
       
    89 	element located at position aIndex within a descriptor array. */
       
    90     virtual TPtrC16 MdcaPoint(TInt aIndex) const =0;
       
    91     };
       
    92 
       
    93 
       
    94 // The definitions below are macros rather than typedefs to avoid generating
       
    95 // warning C4097 every time the generic mixin class is used in a class
       
    96 // definition.
       
    97 
       
    98 #if defined(_UNICODE)
       
    99 /** 
       
   100 Build independent interface class for descriptor arrays.
       
   101 
       
   102 A 16 bit build variant is generated for a Unicode build and an 8 bit build 
       
   103 variant generated for a non-Unicode build.
       
   104 
       
   105 This build independent type should always be used unless an explicit 8 bit 
       
   106 or 16 bit build variant is required.
       
   107 
       
   108 @see MDesC16Array
       
   109 @see MDesC8Array 
       
   110 @publishedAll
       
   111 @released
       
   112 */
       
   113 #define MDesCArray MDesC16Array
       
   114 //typedef MDesC16Array MDesCArray;
       
   115 #else
       
   116 /** 
       
   117 Build independent interface class for descriptor arrays.
       
   118 
       
   119 A 16 bit build variant is generated for a Unicode build and an 8 bit build 
       
   120 variant generated for a non-Unicode build.
       
   121 
       
   122 This build independent type should always be used unless an explicit 8 bit 
       
   123 or 16 bit build variant is required.
       
   124 
       
   125 @see MDesC16Array
       
   126 @see MDesC8Array
       
   127 @publishedAll
       
   128 @released
       
   129 */
       
   130 #define MDesCArray MDesC8Array
       
   131 //typedef MDesC8Array  MDesCArray;
       
   132 #endif
       
   133 
       
   134 
       
   135 #endif // __BAMDESCA_H__