Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoCpuContext.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2017 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20
21#if !defined SOCPUCONTEXT_H
22#define SOCPUCONTEXT_H
23
24#include <Inventor/devices/SoDeviceContext.h>
25
26class SoCpuDevice;
27
39{
40
41public:
42
48 SoCpuContext( SoCpuDevice* device = NULL);
49
53 virtual void bind();
54
58 virtual void unbind();
59
68 virtual bool isCompatible( SoDeviceContext* ) const;
69
73 virtual bool isCurrent() const { return true; }
74
81
82private:
83
85 static void initClass();
86
88 static void exitClass();
89
90private:
94 virtual ~SoCpuContext();
95
96private:
97 // context singleton always available on Host CPU device
98 static SoRef<SoCpuContext> s_globalContext;
99
100private:
101
102 virtual SbString getInfos();
103
104};
105
106#endif //SoCpuContext_H
107
Class for smart character strings.
Definition SbString.h:202
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> CPU device conte...
SoCpuContext(SoCpuDevice *device=NULL)
Default constructor.
virtual bool isCompatible(SoDeviceContext *) const
Query if the specified context and this one are compatible.
static SoCpuContext * getCurrent()
Returns the currently bound context (if any) for the current thread.
virtual void unbind()
Unbind this context from the current thread.
virtual void bind()
Bind this context to the current thread.
virtual bool isCurrent() const
Query if the context is valid and currently active.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> CPU device manag...
Definition SoCpuDevice.h:51
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
Smart pointer for any class inheriting SoRefCounter.
Definition SoRef.h:90