os/kernelhwsrv/kerneltest/e32test/device/t_new_classes.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/device/t_new_classes.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,91 @@
     1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef T_NEW_CLASSES
    1.20 +#define T_NEW_CLASSES
    1.21 +
    1.22 +#include <e32cmn.h>
    1.23 +
    1.24 +/**
    1.25 +A flag to record what part of lifecylce an object is in
    1.26 +*/
    1.27 +enum TObjState
    1.28 +	{
    1.29 +	ENull = 0,
    1.30 +	EConstructed = 1,
    1.31 +	EDeconstructed = 2
    1.32 +	};
    1.33 +
    1.34 +class XCtorAndDtor
    1.35 +	{
    1.36 +public:
    1.37 +	XCtorAndDtor();
    1.38 +	~XCtorAndDtor();
    1.39 +	TObjState iState;
    1.40 +	};
    1.41 +
    1.42 +class XCtorOnly
    1.43 +	{
    1.44 +public:
    1.45 +	XCtorOnly();
    1.46 +	TObjState iState;
    1.47 +	};
    1.48 +
    1.49 +class XDtorOnly
    1.50 +	{
    1.51 +public:
    1.52 +	~XDtorOnly();
    1.53 +	TObjState iState;
    1.54 +	};
    1.55 +
    1.56 +class XNoTors
    1.57 +	{
    1.58 +public:
    1.59 +	TObjState iState;
    1.60 +	};
    1.61 +
    1.62 +//A buffer length for an object so large that we always
    1.63 +//expect allocation to fail.
    1.64 +const TInt KOOMBufferLength=10000000;
    1.65 +
    1.66 +class XVeryLargeClassCtorAndDtor
    1.67 +	{
    1.68 +public:
    1.69 +	XVeryLargeClassCtorAndDtor();
    1.70 +	~XVeryLargeClassCtorAndDtor();
    1.71 +	TInt iBust[KOOMBufferLength];
    1.72 +	};
    1.73 +
    1.74 +class XVeryLargeClassCtorOnly
    1.75 +	{
    1.76 +public:
    1.77 +	XVeryLargeClassCtorOnly();
    1.78 +	TInt iBust[KOOMBufferLength];
    1.79 +	};
    1.80 +
    1.81 +class XVeryLargeClassDtorOnly
    1.82 +	{
    1.83 +public:
    1.84 +	~XVeryLargeClassDtorOnly();
    1.85 +	TInt iBust[KOOMBufferLength];
    1.86 +	};
    1.87 +
    1.88 +class XVeryLargeClassNoTors
    1.89 +	{
    1.90 +public:
    1.91 +	TInt iBust[KOOMBufferLength];
    1.92 +	};
    1.93 +
    1.94 +#endif //T_NEW_CLASSES