Panda3D
Loading...
Searching...
No Matches
dcClass.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 dcClass.I
10 * @author drose
11 * @date 2004-09-15
12 */
13
14/**
15 * Returns the DCFile object that contains the class.
16 */
18get_dc_file() const {
19 return _dc_file;
20}
21
22/**
23 * Returns the name of this class.
24 */
25INLINE const std::string &DCClass::
26get_name() const {
27 return _name;
28}
29
30/**
31 * Returns a unique index number associated with this class. This is defined
32 * implicitly when the .dc file(s) are read.
33 */
34INLINE int DCClass::
35get_number() const {
36 return _number;
37}
38
39/**
40 * Returns true if the class has been identified with the "struct" keyword in
41 * the dc file, false if it was declared with "dclass".
42 */
43INLINE bool DCClass::
44is_struct() const {
45 return _is_struct;
46}
47
48/**
49 * Returns true if the class has been flagged as a bogus class. This is set
50 * for classes that are generated by the parser as placeholder for missing
51 * classes, as when reading a partial file; it should not occur in a normal
52 * valid dc file.
53 */
54INLINE bool DCClass::
55is_bogus_class() const {
56 return _bogus_class;
57}
58
59/**
60 * Starts the PStats timer going on the "generate" task, that is, marks the
61 * beginning of the process of generating a new object, for the purposes of
62 * timing this process.
63 *
64 * This should balance with a corresponding call to stop_generate().
65 */
66INLINE void DCClass::
68#ifdef WITHIN_PANDA
69 _class_generate_pcollector.start();
70#endif
71}
72
73/**
74 * Stops the PStats timer on the "generate" task. This should balance with a
75 * preceding call to start_generate().
76 */
77INLINE void DCClass::
79#ifdef WITHIN_PANDA
80 _class_generate_pcollector.stop();
81#endif
82}
bool is_struct() const
Returns true if the class has been identified with the "struct" keyword in the dc file,...
Definition dcClass.I:44
void start_generate()
Starts the PStats timer going on the "generate" task, that is, marks the beginning of the process of ...
Definition dcClass.I:67
void stop_generate()
Stops the PStats timer on the "generate" task.
Definition dcClass.I:78
int get_number() const
Returns a unique index number associated with this class.
Definition dcClass.I:35
DCFile * get_dc_file() const
Returns the DCFile object that contains the class.
Definition dcClass.I:18
bool is_bogus_class() const
Returns true if the class has been flagged as a bogus class.
Definition dcClass.I:55
const std::string & get_name() const
Returns the name of this class.
Definition dcClass.I:26
Represents the complete list of Distributed Class descriptions as read from a .dc file.
Definition dcFile.h:32