1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericservices/httputils/DelimitedParser/TDelimitedPathParser.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,110 @@
1.4 +// Copyright (c) 2001-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 <delimitedpath8.h>
1.20 +#include <delimitedpath16.h>
1.21 +
1.22 +//
1.23 +//
1.24 +// Implementation of TDelimitedPathParser8
1.25 +//
1.26 +//
1.27 +/**
1.28 + Constructor.
1.29 +
1.30 + @since 6.0
1.31 + */
1.32 +EXPORT_C TDelimitedPathParser8::TDelimitedPathParser8()
1.33 +: TDelimitedParserBase8()
1.34 + {
1.35 + SetDelimiter(TChar('/'));
1.36 + }
1.37 +
1.38 +/**
1.39 + This parses the descriptor into path segments from left to right.
1.40 +
1.41 + @since 6.0
1.42 + @param aPath A descriptor containing the path.
1.43 + @pre The delimiter must have been set.
1.44 + @post The current segment is the leftmost segment and the direction of
1.45 + parsing is set from left to right (EDelimitedDataForward).
1.46 + */
1.47 +EXPORT_C void TDelimitedPathParser8::Parse(const TDesC8& aPath)
1.48 + {
1.49 + // Call base class functions
1.50 + TDelimitedParserBase8::Parse(aPath);
1.51 + }
1.52 +
1.53 +/**
1.54 + This parses the descriptor into path segments from right to left.
1.55 +
1.56 + @since 6.0
1.57 + @param aPath A descriptor containing the path.
1.58 + @pre The delimiter must have been set.
1.59 + @post The current segment is the leftmost segment and the direction of
1.60 + parsing is set from right to left (EDelimitedDataReverse).
1.61 + */
1.62 +EXPORT_C void TDelimitedPathParser8::ParseReverse(const TDesC8& aPath)
1.63 + {
1.64 + // Call base class functions
1.65 + TDelimitedParserBase8::ParseReverse(aPath);
1.66 + }
1.67 +
1.68 +//
1.69 +//
1.70 +// Implementation of TDelimitedPathParser16
1.71 +//
1.72 +//
1.73 +
1.74 +/**
1.75 + Constructor.
1.76 +
1.77 + @since 6.0
1.78 +*/
1.79 +EXPORT_C TDelimitedPathParser16::TDelimitedPathParser16()
1.80 +: TDelimitedParserBase16()
1.81 + {
1.82 + SetDelimiter(TChar('/'));
1.83 + }
1.84 +
1.85 +/**
1.86 + This parses the descriptor into path segments from left to right.
1.87 +
1.88 + @since 6.0
1.89 + @param aPath A descriptor containing the path.
1.90 + @pre The delimiter must have been set.
1.91 + @post The current segment is the leftmost segment and the direction of
1.92 + parsing is set from left to right (EDelimitedDataFroward).
1.93 +*/
1.94 +EXPORT_C void TDelimitedPathParser16::Parse(const TDesC16& aPath)
1.95 + {
1.96 + // Call base class functions
1.97 + TDelimitedParserBase16::Parse(aPath);
1.98 + }
1.99 +
1.100 +/**
1.101 + This parses the descriptor into path segments from right to left.
1.102 +
1.103 + @since 6.0
1.104 + @param aPath A descriptor containing the path.
1.105 + @pre The delimiter must have been set.
1.106 + @post The current segment is the leftmost segment and the direction of
1.107 + parsing is set from right to left (EDelimitedDataReverse).
1.108 +*/
1.109 +EXPORT_C void TDelimitedPathParser16::ParseReverse(const TDesC16& aPath)
1.110 + {
1.111 + // Call base class functions
1.112 + TDelimitedParserBase16::ParseReverse(aPath);
1.113 + }