[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Usata-commits] Changes to usata2/src/object.hpp
From: |
David Lau |
Subject: |
[Usata-commits] Changes to usata2/src/object.hpp |
Date: |
Mon, 03 Jan 2005 02:55:36 -0500 |
Index: usata2/src/object.hpp
diff -u usata2/src/object.hpp:1.6 usata2/src/object.hpp:1.7
--- usata2/src/object.hpp:1.6 Sun Jan 2 06:34:43 2005
+++ usata2/src/object.hpp Mon Jan 3 07:43:49 2005
@@ -10,7 +10,7 @@
// included in the software distribution, or visit
// http://www.fsf.org/licenses/gpl.html.
//
-// $Id: object.hpp,v 1.6 2005/01/02 06:34:43 skunix Exp $
+// $Id: object.hpp,v 1.7 2005/01/03 07:43:49 skunix Exp $
#ifndef USATA_GAME_OBJECT_HPP
@@ -47,18 +47,31 @@
public:
static std::string NodePathPop(std::string&);
virtual void add_child(const Object_sp&, std::string&
path){};
+ virtual void add_child(const Object_sp&){};
virtual Object_sp get_child(const std::string&)=0;
};
class Object
{
+ Object* Parent;
+ std::string Name;
public:
virtual void update(void) {};
virtual void draw (void) {} ;
virtual ~Object(){};
-
- virtual std::string name()=0;
+ Object():Parent(0){}
+ const std::string& name() const { return Name; }
+ void name(const std::string&nn) {Name=nn;}
+
+ virtual void parent(Object*o)
+ {
+ Parent = o;
+ }
+ virtual Object* parent() const
+ {
+ return Parent;
+ }
};
- [Usata-commits] Changes to usata2/src/object.hpp, David Lau, 2005/01/01
- [Usata-commits] Changes to usata2/src/object.hpp, David Lau, 2005/01/02
- [Usata-commits] Changes to usata2/src/object.hpp,
David Lau <=
- [Usata-commits] Changes to usata2/src/object.hpp, David Lau, 2005/01/07
- [Usata-commits] Changes to usata2/src/object.hpp, David Lau, 2005/01/09
- [Usata-commits] Changes to usata2/src/object.hpp, David Lau, 2005/01/10
- [Usata-commits] Changes to usata2/src/object.hpp, David Lau, 2005/01/10