VR-Forces Development_Version Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
gdb
simpleListItem.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1999 MaK Technologies, Inc.
3
** All rights reserved.
4
*********************************************************************/
5
/*********************************************************************
6
** $RCSfile: slLstItm.h,v $ $Revision: 1.5 $ $State: Exp $
7
*********************************************************************/
8
9
#ifndef simpleListItem_H_
10
#define simpleListItem_H_
11
12
#include "
gdb/gdbDefines.h
"
13
14
// class DtSimpleListItem:
15
//
16
// Instances of DtSimpleListItem are used by the DtSimpleList, a singly-linked
17
// list implementation, to store the items.
18
// @note The class has no virtual functions on purpose to reduce the size
19
// of the items as DtGroups use DtSimpleLists to hold their children, which
20
// means at least one DtSimpleListItem for every polygon and other node in the
21
// scene, which adds up for large scenes.
22
//
23
class
DT_DLL_gdb
DtSimpleListItem
24
{
25
friend
class
DtSimpleList
;
26
27
public
:
28
// destructor
29
~
DtSimpleListItem
();
30
31
// accessor
32
DtSimpleListItem
* next();
33
34
void
* data();
35
36
protected
:
37
// constructor
38
DtSimpleListItem
(
void
* d);
39
40
// If a copy constructor is implemented, the assignment operator should
41
// also be implemented. Should generally implement both of them anyway to
42
// avoid memory problems due to inappropriate compiler provided defaults.
43
// Access varies so need to put proper access keyword above these
44
// declarations.
45
// copy constructor
46
DtSimpleListItem
(
const
DtSimpleListItem
& orig);
47
48
// assignment operator
49
DtSimpleListItem
&
operator=
(
const
DtSimpleListItem
& orig);
50
51
52
protected
:
53
DtSimpleListItem
*
myNext
;
54
void
*
myData
;
55
};
56
57
inline
void
*
DtSimpleListItem::data
()
58
{
59
return
myData
;
60
}
61
62
inline
DtSimpleListItem::DtSimpleListItem
(
void
* d):
63
myNext(0),
64
myData(d)
65
{
66
}
67
68
// accessor
69
inline
DtSimpleListItem
*
DtSimpleListItem::next
()
70
{
71
return
myNext
;
72
}
73
74
#endif
Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)