Study Dungeon  1.0.0
A group project for COSC345
Public Member Functions
ConsoleUI::AsciiArt Class Reference

An object that stores ascii art in the form of a string. More...

#include <menu.h>

Public Member Functions

 AsciiArt (const std::string &name, const std::vector< std::string > &artLines, int x=0, int y=0)
 Construct a new Ascii Art object. More...
 
const std::string & getName () const
 Get the Name of the art. More...
 
const std::vector< std::string > & getArt () const
 Get the lines comprising the art. More...
 
int getX () const
 Get the left most position. More...
 
int getY () const
 Get the top most position. More...
 
size_t getWidth () const
 Get the Width of the art. More...
 
size_t getHeight () const
 Get the Height of the art. More...
 
void setPosition (int x, int y)
 Set the position of the top left corner. More...
 

Detailed Description

An object that stores ascii art in the form of a string.

Constructor & Destructor Documentation

◆ AsciiArt()

ConsoleUI::AsciiArt::AsciiArt ( const std::string &  name,
const std::vector< std::string > &  artLines,
int  x = 0,
int  y = 0 
)

Construct a new Ascii Art object.

Parameters
namename of the art
artLinesvector of strings/lines that make up the art
xleft most position to place the art
ytop most position to place the art

Member Function Documentation

◆ getArt()

const std::vector< std::string > & ConsoleUI::AsciiArt::getArt ( ) const

Get the lines comprising the art.

Returns
const std::vector<std::string>&

◆ getHeight()

size_t ConsoleUI::AsciiArt::getHeight ( ) const

Get the Height of the art.

Returns
size_t

◆ getName()

const std::string & ConsoleUI::AsciiArt::getName ( ) const

Get the Name of the art.

Returns
const std::string&

◆ getWidth()

size_t ConsoleUI::AsciiArt::getWidth ( ) const

Get the Width of the art.

Returns
size_t

◆ getX()

int ConsoleUI::AsciiArt::getX ( ) const

Get the left most position.

Returns
int

◆ getY()

int ConsoleUI::AsciiArt::getY ( ) const

Get the top most position.

Returns
int

◆ setPosition()

void ConsoleUI::AsciiArt::setPosition ( int  x,
int  y 
)

Set the position of the top left corner.

Parameters
xleft most position
ytop most position

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