109 lines
3.8 KiB
Plaintext
109 lines
3.8 KiB
Plaintext
// Filename: dcClass.I
|
|
// Created by: drose (15Sep04)
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
//
|
|
// PANDA 3D SOFTWARE
|
|
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
|
|
//
|
|
// All use of this software is subject to the terms of the Panda 3d
|
|
// Software license. You should have received a copy of this license
|
|
// along with this source code; you will also find a current copy of
|
|
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
|
|
//
|
|
// To contact the maintainers of this program write to
|
|
// panda3d-general@lists.sourceforge.net .
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: DCClass::get_dc_file
|
|
// Access: Published
|
|
// Description: Returns the DCFile object that contains the class.
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE DCFile *DCClass::
|
|
get_dc_file() const {
|
|
return _dc_file;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: DCClass::get_name
|
|
// Access: Published
|
|
// Description: Returns the name of this class.
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE const string &DCClass::
|
|
get_name() const {
|
|
return _name;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: DCClass::get_number
|
|
// Access: Published
|
|
// Description: Returns a unique index number associated with this
|
|
// class. This is defined implicitly when the .dc
|
|
// file(s) are read.
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE int DCClass::
|
|
get_number() const {
|
|
return _number;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: DCClass::is_struct
|
|
// Access: Published
|
|
// Description: Returns true if the class has been identified with
|
|
// the "struct" keyword in the dc file, false if it was
|
|
// declared with "dclass".
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE bool DCClass::
|
|
is_struct() const {
|
|
return _is_struct;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: DCClass::is_bogus_class
|
|
// Access: Published
|
|
// Description: Returns true if the class has been flagged as a bogus
|
|
// class. This is set for classes that are generated by
|
|
// the parser as placeholder for missing classes, as
|
|
// when reading a partial file; it should not occur in a
|
|
// normal valid dc file.
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE bool DCClass::
|
|
is_bogus_class() const {
|
|
return _bogus_class;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: DCClass::start_generate
|
|
// Access: Published
|
|
// Description: Starts the PStats timer going on the "generate" task,
|
|
// that is, marks the beginning of the process of
|
|
// generating a new object, for the purposes of timing
|
|
// this process.
|
|
//
|
|
// This should balance with a corresponding call to
|
|
// stop_generate().
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE void DCClass::
|
|
start_generate() {
|
|
#ifdef WITHIN_PANDA
|
|
_class_generate_pcollector.start();
|
|
#endif
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: DCClass::stop_generate
|
|
// Access: Published
|
|
// Description: Stops the PStats timer on the "generate" task.
|
|
// This should balance with a preceding call to
|
|
// start_generate().
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE void DCClass::
|
|
stop_generate() {
|
|
#ifdef WITHIN_PANDA
|
|
_class_generate_pcollector.stop();
|
|
#endif
|
|
}
|