SDL2lazy
Public Member Functions | Public Attributes | Protected Attributes | List of all members
SlManipulation Class Reference
Inheritance diagram for SlManipulation:
Inheritance graph
[legend]
Collaboration diagram for SlManipulation:
Collaboration graph
[legend]

Public Member Functions

 SlManipulation (SlSpriteManager *smngr, SlValueParser *valPars)
 
 SlManipulation (const SlManipulation &toCopy)
 
SlManipulation & operator= (const SlManipulation &rhs)
 
virtual void manipulate (const std::string &name, unsigned int destination, const std::vector< std::string > &parameters)
 
std::string name ()
 
std::shared_ptr< SlSprite > verifySprite (const std::string &name, unsigned int destination)
 

Public Attributes

SlValueParser * valParser = nullptr
 

Protected Attributes

std::string name_ = "manipulation"
 
SlSpriteManager * smngr_ = nullptr
 

Constructor & Destructor Documentation

SlManipulation::SlManipulation ( SlSpriteManager *  manager,
SlValueParser *  valPars 
)

SlManipulation base class.

SlManipulation::SlManipulation ( const SlManipulation &  toCopy)

Copy constructor. The smngr_ and valParser pointers of both objects will point to the same object;

Member Function Documentation

void SlManipulation::manipulate ( const std::string &  name,
unsigned int  destination,
const std::vector< std::string > &  parameters 
)
virtual
std::string SlManipulation::name ( )
inline

Name can be read but not set. It is defined by the function that the derived class implements so that the correct derived class can be called based on a keyword.

SlManipulation & SlManipulation::operator= ( const SlManipulation &  rhs)

Assignment. The smngr_ and valParser pointers of both objects will point to the same object;

std::shared_ptr< SlSprite > SlManipulation::verifySprite ( const std::string &  name,
unsigned int  destination 
)

Checks the existence of the named sprite and the validity of the destinations.

Return values
spriteof that name if name and destination valid.
Exceptions
std::invalid_argumentif invalid name or destination.

Member Data Documentation

std::string SlManipulation::name_ = "manipulation"
protected

Name of the object must be identical to the keyword used in the configuration file.

SlSpriteManager* SlManipulation::smngr_ = nullptr
protected

The SlSpriteManager that initialized this instance. Needed to find sprites.

SlValueParser* SlManipulation::valParser = nullptr

Helper class to translate strings read from file into integers


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