23 #ifndef BAGEL_BOFLIB_SIZE_H 24 #define BAGEL_BOFLIB_SIZE_H 26 #include "bagel/boflib/stdinc.h" 27 #include "bagel/boflib/object.h" 41 void operator=(
const CBofSize &cSize);
42 bool operator==(
StSize size);
43 bool operator!=(
StSize size);
44 void operator+=(
StSize size);
45 void operator-=(
StSize size);
54 inline CBofSize::CBofSize() {
58 inline CBofSize::CBofSize(
int initCX,
int initCY) {
63 inline CBofSize::CBofSize(
const StSize &stSize) {
68 inline CBofSize::CBofSize(
const CBofSize &cSize) {
73 inline CBofSize::CBofSize(
StPoint stPoint) {
78 inline void CBofSize::operator=(
const CBofSize &cSize) {
83 inline bool CBofSize::operator==(
StSize size) {
85 assert(isValidObject(
this));
87 return (cx == size.cx && cy == size.cy);
90 inline bool CBofSize::operator!=(
StSize size) {
92 assert(isValidObject(
this));
94 return (cx != size.cx || cy != size.cy);
97 inline void CBofSize::operator+=(
StSize size) {
99 assert(isValidObject(
this));
105 inline void CBofSize::operator-=(
StSize size) {
107 assert(isValidObject(
this));
115 assert(isValidObject(
this));
117 return CBofSize(cx + size.cx, cy + size.cy);
122 assert(isValidObject(
this));
124 return CBofSize(cx - size.cx, cy - size.cy);
127 inline CBofSize CBofSize::operator-() {
129 assert(isValidObject(
this));
134 #define CSize CBofSize