| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * @file object.cpp
|
|---|
| 3 | * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
|
|---|
| 4 | * @date Mon Apr 18 12:21:55 2011
|
|---|
| 5 | *
|
|---|
| 6 | * @brief Source file for the class VMG::Object.
|
|---|
| 7 | *
|
|---|
| 8 | */
|
|---|
| 9 |
|
|---|
| 10 | #ifdef HAVE_CONFIG_H
|
|---|
| 11 | #include <config.h>
|
|---|
| 12 | #endif
|
|---|
| 13 |
|
|---|
| 14 | #include "base/object.hpp"
|
|---|
| 15 | #include "mg.hpp"
|
|---|
| 16 |
|
|---|
| 17 | using namespace VMG;
|
|---|
| 18 |
|
|---|
| 19 | void Object::Register(std::string name_)
|
|---|
| 20 | {
|
|---|
| 21 | if (!registered) {
|
|---|
| 22 | name = name_;
|
|---|
| 23 | MG::GetFactory().Register(this);
|
|---|
| 24 | registered = true;
|
|---|
| 25 | }else
|
|---|
| 26 | assert(0 == "This object has already been registered.");
|
|---|
| 27 | }
|
|---|
| 28 |
|
|---|
| 29 | void Object::ObjectInit()
|
|---|
| 30 | {
|
|---|
| 31 | MG::GetFactory().Register(this);
|
|---|
| 32 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.