Aolis Engine  0.1.0_alpha1
Adventure Game Engine
 All Classes Files Functions Variables
Public Member Functions | Protected Attributes | List of all members
BaseObject Class Reference

#include <object_base.h>

Inheritance diagram for BaseObject:
SpritedObject Entity Item AnimatedEntity StaticEntity Armor BattleItem UseableItem Weapon ActiveEntity Character

Public Member Functions

 BaseObject ()
 
 BaseObject (char *name)
 
signed const int getId ()
 
const char * getName ()
 
void setName (char *name)
 
bool idEquals (signed int id)
 
bool nameEquals (char *name)
 

Protected Attributes

signed int id
 

Detailed Description

object_base.h

Created on: Nov 1, 2014 Author: Jordan Irwin Base of all object files

Constructor & Destructor Documentation

BaseObject::BaseObject ( )

Default constructor

3  {
4  //ID_COUNT += 1;
5  //this->id = ID_COUNT;
6  this->name = NULL;
7 }
BaseObject::BaseObject ( char *  name)

Alternate contructor

Parameters
nameIdentifying name of the object
9  {
10  //ID_COUNT += 1;
11  //this->id = ID_COUNT;
12  this->name = name;
13 }

Member Function Documentation

signed const int BaseObject::getId ( )
Returns
Object's id

References id.

15  {
16  return this->id;
17 }
const char * BaseObject::getName ( )
Returns
Object's name
19  {
20  return this->name;
21 }
bool BaseObject::idEquals ( signed int  id)

Tests object's id

Parameters
idId to test against
Returns
"id" is the same as object's id
27  {
28  return true;
29 }
bool BaseObject::nameEquals ( char *  name)

Tests object's name

Parameters
nameName to test against
Returns
"name" is the same as object's name
31  {
32  return true;
33 }
void BaseObject::setName ( char *  name)

Set the object's name

Parameters
nameString that will be object's name
23  {
24  this->name = name;
25 }

Member Data Documentation

signed int BaseObject::id
protected

The object's id

Referenced by getId().


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