Panda3D
panda
src
pipeline
genericThread.I
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file genericThread.I
10
* @author drose
11
* @date 2011-11-09
12
*/
13
14
/**
15
* Replaces the function that is called when the thread runs.
16
*/
17
INLINE
void
GenericThread::
18
set_function
(GenericThread::ThreadFunc *
function
) {
19
_function =
function
;
20
}
21
22
/**
23
* Returns the function that is called when the thread runs.
24
*/
25
INLINE GenericThread::ThreadFunc *
GenericThread::
26
get_function
()
const
{
27
return
_function;
28
}
29
30
/**
31
* Replaces the void pointer that is passed to the thread function. This is
32
* any arbitrary pointer; the thread object does no processing on it.
33
*/
34
INLINE
void
GenericThread::
35
set_user_data
(
void
*user_data) {
36
_user_data = user_data;
37
}
38
39
/**
40
* Returns the void pointer that is passed to the thread function.
41
*/
42
INLINE
void
*
GenericThread::
43
get_user_data
()
const
{
44
return
_user_data;
45
}
GenericThread::get_user_data
void * get_user_data() const
Returns the void pointer that is passed to the thread function.
Definition:
genericThread.I:43
GenericThread::set_user_data
void set_user_data(void *user_data)
Replaces the void pointer that is passed to the thread function.
Definition:
genericThread.I:35
GenericThread::set_function
void set_function(ThreadFunc *function)
Replaces the function that is called when the thread runs.
Definition:
genericThread.I:18
GenericThread::get_function
ThreadFunc * get_function() const
Returns the function that is called when the thread runs.
Definition:
genericThread.I:26
Generated on Sun Dec 27 2020 13:23:14 for Panda3D by
1.8.20