OWLNext
7.0
Borland's Object Windows Library for the modern age
Toggle main menu visibility
Loading...
Searching...
No Matches
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
21
namespace
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
//
30
class
_OWLCLASS
TSerializer
{
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
};
43
TSerializer
(HWND hwndTarget,
uint32
length,
void
* data);
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
//
59
class
_OWLCLASS
TSerializeReceiver
:
virtual
public
TEventHandler
{
60
public
:
61
TSerializeReceiver
();
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
76
DECLARE_RESPONSE_TABLE(
TSerializeReceiver
);
77
};
78
79
/// @}
80
81
#include <
owl/posclass.h
>
82
83
84
}
// OWL namespace
85
86
87
#endif
// OWL_SERIALZE_H
owl::TEventHandler
TEventHandler is a base class from which you can derive classes that handle messages.
Definition
eventhan.h:162
owl::TSerializeReceiver::DataReceived
virtual void DataReceived(uint32 length, void *data)
This virtual function will be called whenever the data has been reconstructed.
Definition
serialze.cpp:139
owl::TSerializeReceiver::BlockReceived
TResult BlockReceived(TParam1, TParam2)
Automatically puts the data blocks back together.
Definition
serialze.cpp:85
owl::TSerializeReceiver::TSerializeReceiver
TSerializeReceiver()
Definition
serialze.cpp:75
owl::TSerializer
This class sends a block of data to another window.
Definition
serialze.h:30
owl::TSerializer::TBlock
TBlock
Enum for different types of blocks sent from a window to another.
Definition
serialze.h:35
owl::TSerializer::Data3
@ Data3
data is stored in bits 0x00FFFFFF of lParam
Definition
serialze.h:39
owl::TSerializer::Data2
@ Data2
data is stored in bits 0x0000FFFF of lParam
Definition
serialze.h:38
owl::TSerializer::Data4
@ Data4
data is stored in bits 0xFFFFFFFF of lParam
Definition
serialze.h:40
owl::TSerializer::End
@ End
end of data, lParam == 0
Definition
serialze.h:36
owl::TSerializer::Data1
@ Data1
data is stored in bits 0x000000FF of lParam
Definition
serialze.h:37
owl::TSerializer::Begin
@ Begin
beginning of data, lParam length of data
Definition
serialze.h:41
owl::TSerializer::TSerializer
TSerializer(HWND hwndTarget, uint32 length, void *data)
Breaks down the data into blocks and sends each block to the window via SendMessage.
Definition
serialze.cpp:24
eventhan.h
Definition of TEventHandler and related classes & macros.
owl
Object Windows Library (OWLNext Core).
Definition
animctrl.h:22
owl::uint32
unsigned long uint32
Definition
number.h:34
owl::TParam2
LPARAM TParam2
Second parameter type.
Definition
dispatch.h:55
owl::TParam1
WPARAM TParam1
First parameter type.
Definition
dispatch.h:54
owl::TResult
LRESULT TResult
Result type.
Definition
dispatch.h:52
defs.h
General definitions used by all ObjectWindows programs.
defs.h
_OWLCLASS
#define _OWLCLASS
Definition
defs.h:338
posclass.h
preclass.h
include
owl
serialze.h
Generated by
1.18.0