os/mm/mmtestenv/mmtestfw/Source/TestFramework/Filename.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmtestenv/mmtestfw/Source/TestFramework/Filename.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,195 @@
     1.4 +// Copyright (c) 2002-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 "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 +#include "Filename.h"
    1.20 +
    1.21 +/**
    1.22 + *
    1.23 + * CFileName static constructor.
    1.24 + *
    1.25 + * @xxxx
    1.26 + *
    1.27 + */
    1.28 +CFileName* CFileName::NewL()
    1.29 +	{
    1.30 +	CFileName* s = CFileName::NewLC();
    1.31 +	CleanupStack::Pop();
    1.32 +	return s;
    1.33 +	}
    1.34 +
    1.35 +/**
    1.36 + *
    1.37 + * CFileName static constructor.
    1.38 + *
    1.39 + * @xxxx
    1.40 + *
    1.41 + */
    1.42 +CFileName* CFileName::NewLC()
    1.43 +	{
    1.44 +	CFileName* s = new(ELeave) CFileName;
    1.45 +	CleanupStack::PushL(s);
    1.46 +	return s;
    1.47 +	}
    1.48 +
    1.49 +/**
    1.50 + *
    1.51 + * CFileName assignment operator.
    1.52 + *
    1.53 + * @xxxx
    1.54 + *
    1.55 + */
    1.56 +TFileName& CFileName::operator=(const TText* aString)
    1.57 +	{
    1.58 +	iBuf = aString;
    1.59 +	return iBuf;
    1.60 +	}
    1.61 +
    1.62 +/**
    1.63 + *
    1.64 + * CFileName assignment operator.
    1.65 + *
    1.66 + * @xxxx
    1.67 + *
    1.68 + */
    1.69 +TFileName& CFileName::operator=(const TDesC& aDes)
    1.70 +	{
    1.71 +	iBuf = aDes;
    1.72 +	return iBuf;
    1.73 +	}
    1.74 +
    1.75 +/**
    1.76 + *
    1.77 + * CFileName assignment operator.
    1.78 + *
    1.79 + * @xxxx
    1.80 + *
    1.81 + */
    1.82 +TFileName& CFileName::operator=(const TPtrC16& aPtr)
    1.83 +	{
    1.84 +	iBuf = aPtr;
    1.85 +	return iBuf;
    1.86 +	}
    1.87 +
    1.88 +/**
    1.89 + *
    1.90 + * CFileName assignment operator.
    1.91 + *
    1.92 + * @xxxx
    1.93 + *
    1.94 + */
    1.95 +TFileName& CFileName::operator=(const TFileName& aBuf)
    1.96 +	{
    1.97 +	iBuf = aBuf;
    1.98 +	return iBuf;
    1.99 +	}
   1.100 +
   1.101 +/**
   1.102 + *
   1.103 + * CFileName assignment operator.
   1.104 + *
   1.105 + * @xxxx
   1.106 + *
   1.107 + */
   1.108 +TFileName& CFileName::operator=(const CFileName& aFilename)
   1.109 +	{
   1.110 +	iBuf = aFilename.FileName();
   1.111 +	return iBuf;
   1.112 +	}
   1.113 +
   1.114 +/**
   1.115 + *
   1.116 + * CFileName copy function wrapper
   1.117 + *
   1.118 + * @xxxx
   1.119 + *
   1.120 + */
   1.121 +void CFileName::Copy(const TDesC8 &aDes)
   1.122 +	{
   1.123 +	iBuf.Copy(aDes);
   1.124 +	}
   1.125 +
   1.126 +/**
   1.127 + *
   1.128 + * CFileName copy function wrapper
   1.129 + *
   1.130 + * @xxxx
   1.131 + *
   1.132 + */
   1.133 +void CFileName::Copy(const TDesC16 &aDes)
   1.134 +	{
   1.135 +	iBuf.Copy(aDes);
   1.136 +	}
   1.137 +
   1.138 +/**
   1.139 + *
   1.140 + * CFileName copy function wrapper
   1.141 + *
   1.142 + * @xxxx
   1.143 + *
   1.144 + */
   1.145 +void CFileName::Copy(const TUint16 *aBuf,TInt aLength)
   1.146 +	{
   1.147 +	iBuf.Copy(aBuf,aLength);
   1.148 +	}
   1.149 +
   1.150 +/**
   1.151 + *
   1.152 + * CFileName copy function wrapper
   1.153 + *
   1.154 + * @xxxx
   1.155 + *
   1.156 + */
   1.157 +void CFileName::Copy(const TUint16 *aString)
   1.158 +	{	
   1.159 +	iBuf.Copy(aString);
   1.160 +	}
   1.161 +
   1.162 +/**
   1.163 + *
   1.164 + * CFileName location function wrapper
   1.165 + *
   1.166 + * @xxxx
   1.167 + *
   1.168 + */
   1.169 +TInt CFileName::Locate(TChar aChar) const
   1.170 +	{
   1.171 +	return iBuf.Locate(aChar);
   1.172 +	}
   1.173 +
   1.174 +/**
   1.175 + *
   1.176 + * CFileName left function wrapper
   1.177 + *
   1.178 + * @xxxx
   1.179 + *
   1.180 + */
   1.181 +TPtrC16 CFileName::Left(TInt aLength) const
   1.182 +	{
   1.183 +	return iBuf.Left(aLength);
   1.184 +	}
   1.185 +
   1.186 +/**
   1.187 + *
   1.188 + * CFileName accessor : file name
   1.189 + *
   1.190 + * @xxxx
   1.191 + *
   1.192 + */
   1.193 +TFileName CFileName::FileName() const
   1.194 +{ 
   1.195 +	return iBuf;
   1.196 +}
   1.197 +
   1.198 +