epoc32/include/test/testshareddata.h
branchSymbian3
changeset 4 837f303aceeb
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
       
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * 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
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * Demonstrate a container class with data objects
       
    16 * This class object is shared using the CTEFSharedData template object
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 /**
       
    22  @file TestSharedData.h
       
    23 */
       
    24 
       
    25 #if !(defined __TEST_SHARED_DATA_H__)
       
    26 #define __TEST_SHARED_DATA_H__
       
    27 #include "e32std.h"
       
    28 
       
    29 // Constant
       
    30 const TInt KMaxSharedDataLength = 255;
       
    31 
       
    32 class CTestSharedData : public CBase
       
    33 
       
    34 /**
       
    35  * Demonstrate a container class with data objects
       
    36  * This class object is shared using the CTEFSharedData template object
       
    37 
       
    38  @internalComponent
       
    39  @test
       
    40 */
       
    41  	{
       
    42 public:
       
    43 	CTestSharedData();
       
    44 	~CTestSharedData();
       
    45 	// Initializes the member variable
       
    46 	inline void Construct();
       
    47 	// Copies the values to member varible
       
    48 	inline void SetText(TDesC& aVal);
       
    49 	// Appends the text to member variable
       
    50 	inline void AppendText(TDesC& aVal);
       
    51 	// Reads the text from member varibale
       
    52 	inline void GetText(TDes& aVal);
       
    53 	// Returns the length of the text
       
    54 	inline TInt TextLength(){return User::StringLength(iText);}
       
    55 private:
       
    56 	// Member Variable
       
    57 	TText	iText[KMaxSharedDataLength];
       
    58 	};
       
    59 
       
    60 #include <test/testshareddata.inl>
       
    61 #endif