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