webengine/osswebengine/WebCore/platform/symbian/StreamSymbian.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "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 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __STREAMSYMBIAN_H__
       
    20 #define __STREAMSYMBIAN_H__
       
    21 
       
    22 namespace WebCore {
       
    23 
       
    24 class Streamable;
       
    25 class StreamInput;
       
    26 class StreamOutput;
       
    27 class String;
       
    28 
       
    29 struct StreamEndOfLine {
       
    30 };
       
    31 
       
    32 class Streamable
       
    33 {
       
    34 public:
       
    35     virtual void write(StreamOutput& os) const = 0;
       
    36     virtual void read(StreamInput& is) = 0;
       
    37 };
       
    38 
       
    39 class StreamOutput
       
    40 {
       
    41 public:
       
    42     virtual ~StreamOutput() {}
       
    43 
       
    44     virtual StreamOutput& operator<<(char) = 0;
       
    45     virtual StreamOutput& operator<<(unsigned char) = 0;
       
    46     virtual StreamOutput& operator<<(short) = 0;
       
    47     virtual StreamOutput& operator<<(unsigned short) = 0;
       
    48     virtual StreamOutput& operator<<(int) = 0;
       
    49     virtual StreamOutput& operator<<(unsigned int) = 0;
       
    50     virtual StreamOutput& operator<<(const String&) = 0;
       
    51     virtual StreamOutput& operator<<(const Streamable&) = 0;
       
    52     virtual StreamOutput& operator<<(const StreamEndOfLine&) = 0;
       
    53 };
       
    54 
       
    55 class StreamInput
       
    56 {
       
    57 public:
       
    58     virtual ~StreamInput() {}
       
    59 
       
    60     virtual StreamInput& operator>>(char&) = 0;
       
    61     virtual StreamInput& operator>>(unsigned char&) = 0;
       
    62     virtual StreamInput& operator>>(short&) = 0;
       
    63     virtual StreamInput& operator>>(unsigned short&) = 0;
       
    64     virtual StreamInput& operator>>(int&) = 0;
       
    65     virtual StreamInput& operator>>(unsigned int&) = 0;
       
    66     virtual StreamInput& operator>>(String&) = 0;
       
    67     virtual StreamInput& operator>>(Streamable&) = 0;
       
    68 };
       
    69 
       
    70 }
       
    71 
       
    72 #endif // !__STREAMOUTPUT_H__
       
    73