Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

vos/corelibs/vos/metafactory.cc

Go to the documentation of this file.
00001 /*
00002     This file is part of the Virtual Object System of
00003     the Interreality project (http://interreality.org).
00004 
00005     Copyright (C) 2001, 2002 Peter Amstutz
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Lesser General Public
00009     License as published by the Free Software Foundation; either
00010     version 2 of the License, or (at your option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     Lesser General Public License for more details.
00016 
00017     You should have received a copy of the GNU Lesser General Public
00018     License along with this library; if not, write to the Free Software
00019     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00020 
00021     Peter Amstutz <tetron@interreality.org>
00022 */
00023 #include <stdarg.h>
00024 #include <stdio.h>
00025 
00026 #include "vos.hh"
00027 
00028 /** @file
00029     Implements MetaFactory.
00030 */
00031 
00032 #if 0
00033 
00034 DEPRECATED
00035 
00036 LocalMetaObject* MetaFactory::extendLocalObject(LocalMetaObject* root, ...)
00037 {
00038     va_list ap;
00039     va_start(ap, root);
00040     LocalSite::extendMetaObjectV(root, ap);
00041     va_end(ap);
00042     return root;
00043 }
00044 
00045 string MetaFactory::generateUniqueName(LocalSite& localsite)
00046 {
00047     return localsite.generateUniqueName();
00048 }
00049 
00050 LocalMetaObject* MetaFactory::createLocalObject(const string& name, LocalSite* localsite,
00051                                                 VobjectAccessControl* ac, deque<string>& typelist)
00052 {
00053     return MetaObject::meta_cast<LocalMetaObject*>(localsite->createMetaObject(name, ac, typelist));
00054 }
00055 
00056 LocalMetaObject* MetaFactory::createLocalObject(const string& name, LocalSite* localsite,
00057                                                 VobjectAccessControl* ac, ...)
00058 {
00059     va_list ap;
00060     va_start(ap, ac);
00061     MetaObject* mp = localsite->createMetaObjectV(name, ac, ap);
00062     va_end(ap);
00063     return MetaObject::meta_cast<LocalMetaObject*>(mp);
00064 }
00065 
00066 LocalMetaObject* MetaFactory::createLocalObject(LocalSite* localsite, VobjectAccessControl* ac, ...)
00067 {
00068     va_list ap;
00069     va_start(ap, ac);
00070     MetaObject* mp = localsite->createMetaObjectV(ac, ap);
00071     va_end(ap);
00072     return MetaObject::meta_cast<LocalMetaObject*>(mp);
00073 }
00074 
00075 LocalMetaObject* MetaFactory::createLocalObject(LocalSite* localsite, ...)
00076 {
00077     va_list ap;
00078     va_start(ap, localsite);
00079     MetaObject* mp = localsite->createMetaObjectV(ap);
00080     va_end(ap);
00081     return MetaObject::meta_cast<LocalMetaObject*>(mp);
00082 }
00083 
00084 LocalMetaObject* MetaFactory::createLocalObject(const string& name, LocalSite* localsite, ...)
00085 {
00086     va_list ap;
00087     va_start(ap, localsite);
00088     MetaObject* mp = localsite->createMetaObjectV(name, ap);
00089     va_end(ap);
00090     return MetaObject::meta_cast<LocalMetaObject*>(mp);
00091 }
00092 
00093 RemoteMetaObject* MetaFactory::extendRemoteObject(RemoteMetaObject* root, ...)
00094 {
00095     va_list ap;
00096     va_start(ap, root);
00097     RemoteSite::extendMetaObjectV(root, ap);
00098     va_end(ap);
00099     return root;
00100 }
00101 
00102 
00103 void MetaFactory::addLocalObjectExtension(const char* type, metaobject_extender_t newmethod)
00104 {
00105     LocalSite::addLocalObjectExtension(type, newmethod);
00106 }
00107 
00108 void MetaFactory::addRemoteObjectExtension(const char* type, metaobject_extender_t newmethod)
00109 {
00110     RemoteSite::addRemoteObjectExtension(type, newmethod);
00111 }
00112 
00113 void MetaFactory::removeLocalObjectExtension(const char* type, metaobject_extender_t oldmethod)
00114 {
00115     LocalSite::removeLocalObjectExtension(type, oldmethod);
00116 }
00117 
00118 void MetaFactory::removeRemoteObjectExtension(const char* type, metaobject_extender_t oldmethod)
00119 {
00120     RemoteSite::removeRemoteObjectExtension(type, oldmethod);
00121 }
00122 
00123 #endif

Generated on Tue Aug 12 03:55:40 2003 for Interreality Project - VOS by doxygen 1.3.2