FreeWRL / FreeX3D
4.3.0
SAIGlobals.h
1
/****************************************************************************
2
This file is part of the FreeWRL/FreeX3D Distribution.
3
4
Copyright 2009 CRC Canada. (http://www.crc.gc.ca)
5
6
FreeWRL/FreeX3D is free software: you can redistribute it and/or modify
7
it under the terms of the GNU Lesser Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
FreeWRL/FreeX3D is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with FreeWRL/FreeX3D. If not, see <http://www.gnu.org/licenses/>.
18
****************************************************************************/
19
20
#ifndef _SAIGLOBALS_H_
21
#define _SAIGLOBALS_H_
22
23
#include <map>
24
#include <vector>
25
#include <string>
26
#include "SAIexception.h"
27
28
namespace
freeWRLSAI_cpp
29
{
30
//Parameter container base struct. Implement the saiParameterList specification
31
typedef
class
_SAIParameter
32
{
33
public
:
34
_SAIParameter
()
35
{
36
interactor = NULL;
37
}
38
39
void
* interactor;
//void pointer to the class interacting with the browser useful for mapping who is interacting with who
40
} SAIParameter;
41
42
//saiProperty base pair
43
typedef
std::pair<std::string, std::string> saiProperty;
44
45
46
//what follows is actually a draft.
47
class
saiComponent
48
{
49
public
:
50
virtual
const
char
* getComponentName() = 0;
//should return the name of the compontent declaration
51
52
//add here other "get" methods common to all the components.
53
};
54
55
class
saiProfileDeclaration
56
{
57
public
:
58
virtual
const
char
* getProfileName() = 0;
//should return the name of the profile declaration
59
60
virtual
std::map<std::string, saiComponent*> getComponentDeclaration() = 0;
//should return the map of the components declared in this profile
61
};
62
63
64
//saiComponentDeclaration pair
65
typedef
std::pair<std::string, saiComponent*> saiComponentDeclaration;
66
67
typedef
enum
_SAIActions
68
{
69
//saiBrowser::updateControl
70
BeginUpdate,
71
EndUpdate,
72
//saiBrowser::registerBrowserInterest
73
AddBrowserInterest,
74
RemoveBrowserInterest,
75
//saiBrowser::changeViewPoint
76
Next,
77
Previous,
78
First,
79
Last,
80
//saiExecutionContext::getNode
81
DEFNode,
82
IMPORTNode,
83
EXPORTNode,
84
//saiExecutionContext::protoDeclarationHandling
85
AddProto,
86
UpdateProto,
87
RemoveProto,
88
//saiExecutionContext::externProtoDeclarationHandling
89
AddExternProto,
90
UpdateExternProto,
91
RemoveExternProto,
92
//saiScene::rootNodeHandling
93
AddRootNode,
94
RemoveRootNode
95
} SAIActions;
96
97
};
98
99
#endif
//_SAIGLOBALS_H_
freeWRLSAI_cpp::_SAIParameter
Definition
SAIGlobals.h:32
freeWRLSAI_cpp::saiComponent
Definition
SAIGlobals.h:48
freeWRLSAI_cpp::saiProfileDeclaration
Definition
SAIGlobals.h:56
src
SAI_Cpp
SAIGlobals.h
Generated by
1.11.0