Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Box Class Reference
Inheritance diagram for Box:
Collaboration diagram for Box:

Public Member Functions

 Box ()
 
 Box (double x, double y, double width, double height)
 
 ~Box ()
 
const char * GetType () const
 
void Print (std::ostream &os) const
 
- Public Member Functions inherited from Shape
virtual ~Shape ()
 

Friends

template<typename Archiver >
Archiveroperator& (Archiver &ar, Box &b)
 

Additional Inherited Members

- Protected Member Functions inherited from Shape
 Shape ()
 
 Shape (double x, double y)
 
- Protected Attributes inherited from Shape
double x_
 
double y_
 

Detailed Description

Definition at line 175 of file archivertest.cpp.

Constructor & Destructor Documentation

◆ Box() [1/2]

Box::Box ( )
inline

Definition at line 177 of file archivertest.cpp.

177: width_(), height_() {}

◆ Box() [2/2]

Box::Box ( double x,
double y,
double width,
double height )
inline

Definition at line 178 of file archivertest.cpp.

178: Shape(x, y), width_(width), height_(height) {}

◆ ~Box()

Box::~Box ( )
inline

Definition at line 179 of file archivertest.cpp.

179{}

Member Function Documentation

◆ GetType()

const char * Box::GetType ( ) const
inlinevirtual

Implements Shape.

Definition at line 181 of file archivertest.cpp.

181{ return "Box"; }

◆ Print()

void Box::Print ( std::ostream & os) const
inlinevirtual

Implements Shape.

Definition at line 183 of file archivertest.cpp.

183 {
184 os << "Box (" << x_ << ", " << y_ << ")" << " width = " << width_ << " height = " << height_;
185 }
double x_
double y_
os_t os

Friends And Related Symbol Documentation

◆ operator&

template<typename Archiver >
Archiver & operator& ( Archiver & ar,
Box & b )
friend

Definition at line 195 of file archivertest.cpp.

195 {
196 ar & static_cast<Shape&>(b);
197 ar.Member("width") & b.width_;
198 ar.Member("height") & b.height_;
199 return ar;
200}

The documentation for this class was generated from the following file: