MarkFormat Class Reference

#include <prnmks.h>

List of all members.

Public Member Functions

 MarkFormat ()
 Construct a Mark format object.
BOOL IsValid () const
void MakeValid ()
BYTE GetAsFlagByte (void)
 Fill in a mark format object from a "flags byte" Used for native file load/save.
void SetFromFlagByte (BYTE Flags)
 Fill in a mark format object from a "flags byte" Used for native file load/save.

Public Attributes

BYTE Left: 1
BYTE Centre: 1
BYTE Right: 1
BYTE Top: 1
BYTE Middle: 1
BYTE Bottom: 1
BYTE unused: 1
BYTE unused1: 1

Friends

INT32 operator== (const MarkFormat &x, const MarkFormat &y)


Detailed Description

Definition at line 197 of file prnmks.h.


Constructor & Destructor Documentation

MarkFormat::MarkFormat  ) 
 

Construct a Mark format object.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/07/96

Definition at line 164 of file prnmks.cpp.

00165 {
00166     Top = Middle = Bottom = FALSE;
00167     Left = Centre = Right = FALSE;
00168 }


Member Function Documentation

BYTE MarkFormat::GetAsFlagByte void   ) 
 

Fill in a mark format object from a "flags byte" Used for native file load/save.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/9/96
Returns:
A Byte with bits set for each of the mark formats available
See also:
MarkFormat::SetFromFlagByte

Definition at line 210 of file prnmks.cpp.

00211 {
00212     BYTE Flags = 0;
00213 
00214     if (Left)   Flags |= 0x01;
00215     if (Centre) Flags |= 0x02;
00216     if (Right)  Flags |= 0x04;
00217     if (Top)    Flags |= 0x08;
00218     if (Middle) Flags |= 0x10;
00219     if (Bottom) Flags |= 0x20;
00220 
00221     return(Flags);
00222 }

BOOL MarkFormat::IsValid  )  const
 

Definition at line 170 of file prnmks.cpp.

00171 {
00172     return (Top || Middle || Bottom || Left || Centre || Right);
00173 }

void MarkFormat::MakeValid  ) 
 

Definition at line 175 of file prnmks.cpp.

00176 {
00177     Centre = Middle = TRUE;
00178     Top = Bottom = Left = Right = FALSE;
00179 }

void MarkFormat::SetFromFlagByte BYTE  Flags  ) 
 

Fill in a mark format object from a "flags byte" Used for native file load/save.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/9/96
Parameters:
Flags - A Byte with bits set for each of the mark formats available [INPUTS]
See also:
MarkFormat::GetAsFlagByte

Definition at line 242 of file prnmks.cpp.

00243 {
00244     Left    = (Flags & 0x01) ? TRUE : FALSE;
00245     Centre  = (Flags & 0x02) ? TRUE : FALSE;
00246     Right   = (Flags & 0x04) ? TRUE : FALSE;
00247     Top     = (Flags & 0x08) ? TRUE : FALSE;
00248     Middle  = (Flags & 0x10) ? TRUE : FALSE;
00249     Bottom  = (Flags & 0x20) ? TRUE : FALSE;
00250 }


Friends And Related Function Documentation

INT32 operator== const MarkFormat x,
const MarkFormat y
[friend]
 

Definition at line 181 of file prnmks.cpp.

00182 {
00183     return ( (x.Centre == y.Centre) &&
00184              (x.Middle == y.Middle) &&
00185              (x.Left   == y.Left)   &&
00186              (x.Right  == y.Right)  &&
00187              (x.Top    == y.Top)    &&
00188              (x.Bottom == y.Bottom)
00189             );
00190 }


Member Data Documentation

BYTE MarkFormat::Bottom
 

Definition at line 217 of file prnmks.h.

BYTE MarkFormat::Centre
 

Definition at line 213 of file prnmks.h.

BYTE MarkFormat::Left
 

Definition at line 212 of file prnmks.h.

BYTE MarkFormat::Middle
 

Definition at line 216 of file prnmks.h.

BYTE MarkFormat::Right
 

Definition at line 214 of file prnmks.h.

BYTE MarkFormat::Top
 

Definition at line 215 of file prnmks.h.

BYTE MarkFormat::unused
 

Definition at line 218 of file prnmks.h.

BYTE MarkFormat::unused1
 

Definition at line 219 of file prnmks.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:56:06 2007 for Camelot by  doxygen 1.4.4