OpenCOVER
OSGVruiUserDataCollection.h
Go to the documentation of this file.
1/* This file is part of COVISE.
2
3 You can use it under the terms of the GNU Lesser General Public License
4 version 2.1 or later, see lgpl-2.1.txt.
5
6 * License: LGPL 2+ */
7
8#ifndef OSG_VRUI_USER_DATA_COLLECTION_H
9#define OSG_VRUI_USER_DATA_COLLECTION_H
10
11#include <util/coTypes.h>
12
13#include <osg/Referenced>
14#include <osg/Node>
15
16#include <map>
17#include <string>
18
19namespace vrui
20{
21
22class vruiUserData;
23
24class OSGVRUIEXPORT OSGVruiUserDataCollection : public osg::Referenced
25{
26
27public:
29
30 void setUserData(const std::string &name, vruiUserData *data);
31 void removeUserData(const std::string &name);
32
33 vruiUserData *getUserData(const std::string &name);
34 static vruiUserData *getUserData(osg::Node *, const std::string &name);
35 static void setUserData(osg::Node *, const std::string &name, vruiUserData *data);
36
37protected:
39
40private:
41 std::map<std::string, vruiUserData *> data;
42};
43}
44#endif
collaborative interface manager
Definition: coVRCommunication.h:41
Userdata that can be attached to Nodes in the scenegraph.
Definition: vruiUserData.h:18
Definition: OSGVruiUserDataCollection.h:25
static vruiUserData * getUserData(osg::Node *, const std::string &name)
void removeUserData(const std::string &name)
void setUserData(const std::string &name, vruiUserData *data)
static void setUserData(osg::Node *, const std::string &name, vruiUserData *data)
vruiUserData * getUserData(const std::string &name)