OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
serialze.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Definition of TSerializer class
7//----------------------------------------------------------------------------
8
9#if !defined(OWL_SERIALZE_H)
10#define OWL_SERIALZE_H
11
12#include <owl/private/defs.h>
13#if defined(BI_HAS_PRAGMA_ONCE)
14# pragma once
15#endif
16
17#include <owl/defs.h>
18#include <owl/eventhan.h>
19
20
21namespace owl {
22
23#include <owl/preclass.h>
24
25//
26/// \class TSerializer
27// ~~~~~ ~~~~~~~~~~~
28/// This class sends a block of data to another window.
29//
31 public:
32 /// Enum for different types of blocks sent from a window to
33 /// another. This enum is sent as the wParam.
34 //
35 enum TBlock {
36 End = 0, ///< end of data, lParam == 0
37 Data1, ///< data is stored in bits 0x000000FF of lParam
38 Data2, ///< data is stored in bits 0x0000FFFF of lParam
39 Data3, ///< data is stored in bits 0x00FFFFFF of lParam
40 Data4, ///< data is stored in bits 0xFFFFFFFF of lParam
41 Begin, ///< beginning of data, lParam length of data
42 };
44};
45
46//
47/// Serializer window targets should catch the following registered message
48/// to receive the block of data.
49//
50#define SerializerMessage _T("SERIALIZERMESSAGE")
51
52/// \addtogroup mixin
53/// @{
54/// \class TSerializeReceiver
55// ~~~~~ ~~~~~~~~~~~~~~~~~~
56/// Mix-in class that automatically puts together the block of data sent by
57/// TSerializer.
58//
60 public:
62
63 // Derived classes should override this function to copy the received data.
64 // passed to it.
65 //
66 virtual void DataReceived(uint32 length, void * data);
67
68 protected:
69 TResult BlockReceived(TParam1, TParam2);
70
71 private:
72 char * Data;
73 char * CurPtr;
74 uint32 Length;
75
77};
78
79/// @}
80
81#include <owl/posclass.h>
82
83
84} // OWL namespace
85
86
87#endif // OWL_SERIALZE_H
TEventHandler is a base class from which you can derive classes that handle messages.
Definition eventhan.h:162
Mix-in class that automatically puts together the block of data sent by TSerializer.
Definition serialze.h:59
This class sends a block of data to another window.
Definition serialze.h:30
TBlock
Enum for different types of blocks sent from a window to another.
Definition serialze.h:35
@ Data3
data is stored in bits 0x00FFFFFF of lParam
Definition serialze.h:39
@ Data2
data is stored in bits 0x0000FFFF of lParam
Definition serialze.h:38
@ Data4
data is stored in bits 0xFFFFFFFF of lParam
Definition serialze.h:40
@ Data1
data is stored in bits 0x000000FF of lParam
Definition serialze.h:37
@ Begin
beginning of data, lParam length of data
Definition serialze.h:41
Definition of TEventHandler and related classes & macros.
#define DECLARE_RESPONSE_TABLE(cls)
Definition eventhan.h:436
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
unsigned long uint32
Definition number.h:34
LPARAM TParam2
Second parameter type.
Definition dispatch.h:55
WPARAM TParam1
First parameter type.
Definition dispatch.h:54
General definitions used by all ObjectWindows programs.
#define _OWLCLASS
Definition defs.h:338