lab_inheritance
Insidious Inheritance
 All Classes Namespaces Files Functions Variables
Truck Class Reference

A subclass of Drawable that can draw a truck. More...

#include <truck.h>

Inheritance diagram for Truck:
[legend]
Collaboration diagram for Truck:
[legend]

Public Member Functions

 Truck (const Vector2 &center)
 
 Truck (const Truck &other)
 
 ~Truck ()
 
Truckoperator= (const Truck &rhs)
 
Vector2 center () const
 
void set_center (const Vector2 &center)
 
- Public Member Functions inherited from Drawable
 ~Drawable ()
 
virtual void draw (cs225::PNG *canvas) const =0
 This method will draw the object onto the canvas. More...
 

Private Member Functions

void copy (const Truck &other)
 
void clear ()
 

Private Attributes

Vector2 center_
 
Circle ** wheels
 
Rectangletrailer
 
Rectanglecabin
 
Rectanglewindow
 
Rectangleengine
 

Detailed Description

A subclass of Drawable that can draw a truck.

Constructor & Destructor Documentation

Truck::Truck ( const Vector2 center)
Truck::Truck ( const Truck other)
Truck::~Truck ( )

Member Function Documentation

Vector2 Truck::center ( ) const
void Truck::clear ( )
private
void Truck::copy ( const Truck other)
private
Truck & Truck::operator= ( const Truck rhs)
void Truck::set_center ( const Vector2 center)

Member Data Documentation

Rectangle* Truck::cabin
private
Vector2 Truck::center_
private
Rectangle* Truck::engine
private
Rectangle* Truck::trailer
private
Circle** Truck::wheels
private
Rectangle* Truck::window
private

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