levelz-cpp 0.2.0
Loading...
Searching...
No Matches
LevelZ::LevelObject Struct Reference

#include <block.hpp>

Public Member Functions

 LevelObject (Block block, Coordinate2D coordinate)
 
 LevelObject (Block block, Coordinate3D coordinate)
 
Block block ()
 
Coordinatecoordinate ()
 
bool operator== (const LevelObject &other) const
 
bool operator!= (const LevelObject &other) const
 
std::string to_string () const
 
std::ostream & operator<< (std::ostream &strm)
 

Detailed Description

Utility Object for representing a Level Block and its Coordinate.

Constructor & Destructor Documentation

◆ LevelObject() [1/2]

LevelZ::LevelObject::LevelObject ( Block block,
Coordinate2D coordinate )
inline

Constructs a new LevelObject with the specified block and coordinate.

Parameters
blockThe block of the object.
coordinateThe coordinate of the object.

◆ LevelObject() [2/2]

LevelZ::LevelObject::LevelObject ( Block block,
Coordinate3D coordinate )
inline

Constructs a new LevelObject with the specified block and coordinate.

Parameters
blockThe block of the object.
coordinateThe coordinate of the object.

Member Function Documentation

◆ block()

Block LevelZ::LevelObject::block ( )
inline

Gets the block of the object.

Returns
Block of the object.

◆ coordinate()

Coordinate * LevelZ::LevelObject::coordinate ( )
inline

Gets the coordinate of the object.

Returns
Coordinate of the object.

◆ operator!=()

bool LevelZ::LevelObject::operator!= ( const LevelObject & other) const
inline

Compares two LevelObjects for inequality.

Parameters
otherThe other LevelObject to compare to.
Returns
True if the LevelObjects are not equal, false otherwise.

◆ operator<<()

std::ostream & LevelZ::LevelObject::operator<< ( std::ostream & strm)
inline

Overloads the << operator to allow for easy printing of a LevelObject.

Parameters
strmThe output stream to write to.
Returns
The output stream.

◆ operator==()

bool LevelZ::LevelObject::operator== ( const LevelObject & other) const
inline

Compares two LevelObjects for equality.

Parameters
otherThe other LevelObject to compare to.
Returns
True if the LevelObjects are equal, false otherwise.

◆ to_string()

std::string LevelZ::LevelObject::to_string ( ) const
inline

Converts this LevelObject into a string.

Returns
The string representation of this LevelObject.

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