|
| Cat () |
| Default constructor for Cat. Calls the Animal base class constructor and sets the type to "Cat". Displays a specific construction message.
|
|
| Cat (const Cat &other) |
| Copy constructor for Cat. Calls the Animal base class copy constructor. Displays a specific copy construction message.
|
|
Cat & | operator= (const Cat &other) |
| Copy assignment operator for Cat. (Copy And Swap Idiom) Displays a specific copy assignment message.
|
|
virtual | ~Cat () |
| Destructor for Cat. Displays a specific destruction message.
|
|
virtual void | makeSound () const |
| Makes the characteristic sound of a cat ("Meow!"). This function overrides the virtual makeSound() from the Animal class.
|
|
| Cat () |
|
| Cat (const Cat &other) |
|
Cat & | operator= (const Cat &other) |
|
virtual | ~Cat () |
|
virtual void | makeSound () const |
| Makes a generic animal sound. This implementation is for the base Animal class. Derived classes are expected to override this function.
|
|
void | meow () const |
| Makes a specific purring and meowing sound for a Cat. This is a Cat-specific method.
|
|
Brain * | getBrain () const |
| Gets a pointer to the Cat's Brain object.
|
|
| Cat () |
|
| Cat (const Cat &other) |
|
Cat & | operator= (const Cat &other) |
|
virtual | ~Cat () |
|
virtual void | makeSound () const |
| Makes a generic animal sound. This implementation is for the base Animal class. Derived classes are expected to override this function.
|
|
void | meow () const |
|
Brain * | getBrain () const |
|
| Animal () |
| Default constructor for Animal. Initializes the type to "Generic Animal". Displays a construction message.
|
|
| Animal (const Animal &other) |
| Copy constructor for Animal. Copies the type from the other Animal object. Displays a copy construction message.
|
|
Animal & | operator= (const Animal &other) |
| Copy assignment operator for Animal. Assigns the type from the other Animal object. Handles self-assignment. Displays a copy assignment message.
|
|
virtual | ~Animal () |
| Destructor for Animal. Displays a destruction message.
|
|
const std::string & | getType () const |
| Gets the type of the animal.
|
|
| Animal () |
|
| Animal (const Animal &other) |
|
Animal & | operator= (const Animal &other) |
|
virtual | ~Animal () |
|
const std::string & | getType () const |
|
| Animal () |
|
| Animal (const Animal &other) |
|
Animal & | operator= (const Animal &other) |
|
virtual | ~Animal () |
|
const std::string & | getType () const |
|
The Cat class represents a feline animal.
This class inherits from the Animal base class and provides specific implementations for a cat's behavior, particularly its sound. It demonstrates polymorphism by overriding the virtual makeSound() function.
Cat.hpp の 33 行目に定義があります。