libraries/iosrv/client/pod_formatter.h
changeset 0 7f656887cf89
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 // pod_formatter.h
       
     2 // 
       
     3 // Copyright (c) 2009 - 2010 Accenture. All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 // 
       
     9 // Initial Contributors:
       
    10 // Accenture - Initial contribution
       
    11 //
       
    12 
       
    13 #ifndef __POD_FORMATTER_H__
       
    14 #define __POD_FORMATTER_H__
       
    15 
       
    16 #include <e32std.h>
       
    17 #include "ioutils.h"
       
    18 
       
    19 namespace IoUtils
       
    20 	{
       
    21 
       
    22 /**
       
    23  * Responsible for handling POD commands ('=head1', '=over', etc).
       
    24  */
       
    25 class TPodFormatter
       
    26 	{
       
    27 public:
       
    28 	TPodFormatter(CTextFormatter& aFormatter);
       
    29 	void FormatL(const TDesC& aPod);
       
    30 private:
       
    31 	void OverL(TInt aIndent);
       
    32 	void FormatToNextCommandL(TInt aIndent = 0);
       
    33 	TPtrC NextCommand();
       
    34 	TPtrC NextParagraph();
       
    35 	TPtrC TextToNextCommand();
       
    36 	void SkipToLineEnd();
       
    37 	TInt SkipToNextLine();
       
    38 	TInt SkipToNextCommand();
       
    39 	TInt SkipToNextBlankLine();
       
    40 	TInt SkipTo(const TDesC& aDes);
       
    41 	TBool AtCommandStart();
       
    42 private:
       
    43 	CTextFormatter& iFormatter;
       
    44 	TLex iPodLex;
       
    45 	};
       
    46 
       
    47 	}
       
    48 
       
    49 #endif