os/ossrv/genericservices/httputils/DelimitedParser/TDelimitedPathSegmentParser.cpp
First public contribution.
1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #include <delimitedpathsegment8.h>
17 #include <delimitedpathsegment16.h>
21 // Implementation of TDelimitedPathSegmentParser8
30 EXPORT_C TDelimitedPathSegmentParser8::TDelimitedPathSegmentParser8()
31 : TDelimitedParserBase8()
33 SetDelimiter(TChar(';'));
37 This parses the descriptor into path segment parameters from left to right.
40 @param aPathSegment A descriptor containing the path segment.
41 @pre The delimiter must have been set.
42 @post The current segment is the leftmost segment and the direction of
43 parsing is set from left to right (EDelimitedDataForward).
45 EXPORT_C void TDelimitedPathSegmentParser8::Parse(const TDesC8& aPathSegment)
47 // Call base class functions
48 TDelimitedParserBase8::Parse(aPathSegment);
52 This parses the descriptor into path segment parameters from right to left.
55 @param aPathSegment A descriptor containing the path segment.
56 @pre The delimiter must have been set.
57 @post The current segment is the leftmost segment and the direction of
58 parsing is set from right to left (EDelimitedDataReverse).
60 EXPORT_C void TDelimitedPathSegmentParser8::ParseReverse(const TDesC8& aPathSegment)
62 // Call base class functions
63 TDelimitedParserBase8::ParseReverse(aPathSegment);
68 // Implementation of TDelimitedPathSegmentParser16
76 EXPORT_C TDelimitedPathSegmentParser16::TDelimitedPathSegmentParser16()
77 : TDelimitedParserBase16()
79 SetDelimiter(TChar(';'));
83 This parses the descriptor into path segment segments from left to right.
86 @param aPathSegment A descriptor containing the path segment.
87 @pre The delimiter must have been set.
88 @post The current segment is the leftmost segment and the direction of
89 parsing is set from left to right (EDelimitedDataFroward).
91 EXPORT_C void TDelimitedPathSegmentParser16::Parse(const TDesC16& aPathSegment)
93 // Call base class functions
94 TDelimitedParserBase16::Parse(aPathSegment);
98 This parses the descriptor into path segment segments from right to left.
101 @param aPathSegment A descriptor containing the path segment.
102 @pre The delimiter must have been set.
103 @post The current segment is the leftmost segment and the direction of
104 parsing is set from right to left (EDelimitedDataReverse).
106 EXPORT_C void TDelimitedPathSegmentParser16::ParseReverse(const TDesC16& aPathSegment)
108 // Call base class functions
109 TDelimitedParserBase16::ParseReverse(aPathSegment);