mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
move TypedObject etc. stuff to dtool
This commit is contained in:
parent
eb8f9aef49
commit
be6d48df86
@ -138,7 +138,7 @@
|
|||||||
|
|
||||||
// What is the syntax of the STL allocator declaration? See
|
// What is the syntax of the STL allocator declaration? See
|
||||||
// LocalSetup.pp for allowable values.
|
// LocalSetup.pp for allowable values.
|
||||||
#define STL_ALLOCATOR GNU
|
#define STL_ALLOCATOR MODERN
|
||||||
|
|
||||||
// The dynamic library file extension (usually .so .dll or .dylib):
|
// The dynamic library file extension (usually .so .dll or .dylib):
|
||||||
#define DYNAMIC_LIB_EXT .so
|
#define DYNAMIC_LIB_EXT .so
|
||||||
|
@ -21,8 +21,7 @@
|
|||||||
cppSimpleType.h cppStructType.h cppTBDType.h \
|
cppSimpleType.h cppStructType.h cppTBDType.h \
|
||||||
cppTemplateParameterList.h cppTemplateScope.h cppToken.h \
|
cppTemplateParameterList.h cppTemplateScope.h cppToken.h \
|
||||||
cppType.h cppTypeDeclaration.h cppTypeParser.h \
|
cppType.h cppTypeDeclaration.h cppTypeParser.h \
|
||||||
cppTypeProxy.h cppTypedef.h cppUsing.h cppVisibility.h \
|
cppTypeProxy.h cppTypedef.h cppUsing.h cppVisibility.h
|
||||||
indent.h
|
|
||||||
|
|
||||||
#define INCLUDED_SOURCES \
|
#define INCLUDED_SOURCES \
|
||||||
cppArrayType.cxx cppClassTemplateParameter.cxx \
|
cppArrayType.cxx cppClassTemplateParameter.cxx \
|
||||||
@ -38,6 +37,6 @@
|
|||||||
cppTemplateParameterList.cxx cppTemplateScope.cxx \
|
cppTemplateParameterList.cxx cppTemplateScope.cxx \
|
||||||
cppToken.cxx cppType.cxx cppTypeDeclaration.cxx \
|
cppToken.cxx cppType.cxx cppTypeDeclaration.cxx \
|
||||||
cppTypeParser.cxx cppTypeProxy.cxx cppTypedef.cxx \
|
cppTypeParser.cxx cppTypeProxy.cxx cppTypedef.cxx \
|
||||||
cppUsing.cxx cppVisibility.cxx indent.cxx
|
cppUsing.cxx cppVisibility.cxx
|
||||||
|
|
||||||
#end static_lib_target
|
#end static_lib_target
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
// Filename: indent.cxx
|
|
||||||
// Created by: drose (16Jan99)
|
|
||||||
//
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// 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 .
|
|
||||||
//
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
#include "indent.h"
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
// Function: indent
|
|
||||||
// Description: A handy function for doing text formatting. This
|
|
||||||
// function simply outputs the indicated number of
|
|
||||||
// spaces to the given output stream, returning the
|
|
||||||
// stream itself. Useful for indenting a series of
|
|
||||||
// lines of text by a given amount.
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
ostream &
|
|
||||||
indent(ostream &out, int indent_level) {
|
|
||||||
for (int i = 0; i < indent_level; ++i) {
|
|
||||||
out << ' ';
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
// Filename: indent.h
|
|
||||||
// Created by: drose (16Jan99)
|
|
||||||
//
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// 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 .
|
|
||||||
//
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef INDENT_H
|
|
||||||
#define INDENT_H
|
|
||||||
|
|
||||||
#include "dtoolbase.h"
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
// Function: indent
|
|
||||||
// Description: A handy function for doing text formatting. This
|
|
||||||
// function simply outputs the indicated number of
|
|
||||||
// spaces to the given output stream, returning the
|
|
||||||
// stream itself. Useful for indenting a series of
|
|
||||||
// lines of text by a given amount.
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
ostream &
|
|
||||||
indent(ostream &out, int indent_level);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
|||||||
dallocator.T dallocator.h \
|
dallocator.T dallocator.h \
|
||||||
dtoolbase.cxx dtoolbase.h dtoolbase_cc.h dtoolsymbols.h \
|
dtoolbase.cxx dtoolbase.h dtoolbase_cc.h dtoolsymbols.h \
|
||||||
fakestringstream.h \
|
fakestringstream.h \
|
||||||
|
indent.I indent.h indent.cxx \
|
||||||
nearly_zero.h \
|
nearly_zero.h \
|
||||||
stl_compares.I stl_compares.h \
|
stl_compares.I stl_compares.h \
|
||||||
pallocator.T pallocator.h \
|
pallocator.T pallocator.h \
|
||||||
@ -15,6 +16,7 @@
|
|||||||
cmath.I cmath.h \
|
cmath.I cmath.h \
|
||||||
dallocator.T dallocator.h \
|
dallocator.T dallocator.h \
|
||||||
dtoolbase.h dtoolbase_cc.h dtoolsymbols.h fakestringstream.h \
|
dtoolbase.h dtoolbase_cc.h dtoolsymbols.h fakestringstream.h \
|
||||||
|
indent.I indent.h \
|
||||||
nearly_zero.h \
|
nearly_zero.h \
|
||||||
stl_compares.I stl_compares.h \
|
stl_compares.I stl_compares.h \
|
||||||
pallocator.T pallocator.h \
|
pallocator.T pallocator.h \
|
||||||
|
@ -95,6 +95,7 @@ public:
|
|||||||
INLINE pointer allocate(size_type n, allocator<void>::const_pointer hint = 0);
|
INLINE pointer allocate(size_type n, allocator<void>::const_pointer hint = 0);
|
||||||
INLINE void deallocate(pointer p, size_type n);
|
INLINE void deallocate(pointer p, size_type n);
|
||||||
|
|
||||||
|
/*
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
template<class Subtype>
|
template<class Subtype>
|
||||||
INLINE void destroy(Subtype *p) {
|
INLINE void destroy(Subtype *p) {
|
||||||
@ -105,6 +106,7 @@ public:
|
|||||||
::new(p) Subtype(value);
|
::new(p) Subtype(value);
|
||||||
}
|
}
|
||||||
#endif // __GNUC__
|
#endif // __GNUC__
|
||||||
|
*/
|
||||||
|
|
||||||
template<class U> struct rebind {
|
template<class U> struct rebind {
|
||||||
typedef dallocator<U> other;
|
typedef dallocator<U> other;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef INDENT_H
|
#ifndef INDENT_H
|
||||||
#define INDENT_H
|
#define INDENT_H
|
||||||
|
|
||||||
#include "pandabase.h"
|
#include "dtoolbase.h"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: indent
|
// Function: indent
|
||||||
@ -29,7 +29,7 @@
|
|||||||
// stream itself. Useful for indenting a series of
|
// stream itself. Useful for indenting a series of
|
||||||
// lines of text by a given amount.
|
// lines of text by a given amount.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
EXPCL_PANDAEXPRESS ostream &
|
EXPCL_DTOOL ostream &
|
||||||
indent(ostream &out, int indent_level);
|
indent(ostream &out, int indent_level);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
@ -104,6 +104,7 @@ public:
|
|||||||
INLINE pointer allocate(size_type n, allocator<void>::const_pointer hint = 0);
|
INLINE pointer allocate(size_type n, allocator<void>::const_pointer hint = 0);
|
||||||
INLINE void deallocate(pointer p, size_type n);
|
INLINE void deallocate(pointer p, size_type n);
|
||||||
|
|
||||||
|
/*
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
// The gcc 4.0 version seems to pass any old type to construct() and
|
// The gcc 4.0 version seems to pass any old type to construct() and
|
||||||
// destroy(), so we need template methods.
|
// destroy(), so we need template methods.
|
||||||
@ -116,6 +117,7 @@ public:
|
|||||||
p->~Subtype();
|
p->~Subtype();
|
||||||
}
|
}
|
||||||
#endif // __GNUC__
|
#endif // __GNUC__
|
||||||
|
*/
|
||||||
|
|
||||||
template<class U> struct rebind {
|
template<class U> struct rebind {
|
||||||
typedef pallocator<U> other;
|
typedef pallocator<U> other;
|
||||||
|
@ -52,11 +52,11 @@
|
|||||||
// memory.
|
// memory.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
template<class Key, class Value, class Compare = less<Key> >
|
template<class Key, class Value, class Compare = less<Key> >
|
||||||
class pmap : public map<Key, Value, Compare, pallocator<Value> > {
|
class pmap : public map<Key, Value, Compare, pallocator<pair<const Key, Value> > > {
|
||||||
public:
|
public:
|
||||||
pmap() : map<Key, Value, Compare, pallocator<Value> >() { }
|
pmap() : map<Key, Value, Compare, pallocator<pair<const Key, Value> > >() { }
|
||||||
pmap(const pmap<Key, Value, Compare> ©) : map<Key, Value, Compare, pallocator<Value> >(copy) { }
|
pmap(const pmap<Key, Value, Compare> ©) : map<Key, Value, Compare, pallocator<pair<const Key, Value> > >(copy) { }
|
||||||
pmap(const Compare &comp) : map<Key, Value, Compare, pallocator<Value> >(comp) { }
|
pmap(const Compare &comp) : map<Key, Value, Compare, pallocator<pair<const Key, Value> > >(comp) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -67,11 +67,11 @@ public:
|
|||||||
// memory.
|
// memory.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
template<class Key, class Value, class Compare = less<Key> >
|
template<class Key, class Value, class Compare = less<Key> >
|
||||||
class pmultimap : public multimap<Key, Value, Compare, pallocator<Value> > {
|
class pmultimap : public multimap<Key, Value, Compare, pallocator<pair<const Key, Value> > > {
|
||||||
public:
|
public:
|
||||||
pmultimap() : multimap<Key, Value, Compare, pallocator<Value> >() { }
|
pmultimap() : multimap<Key, Value, Compare, pallocator<pair<const Key, Value> > >() { }
|
||||||
pmultimap(const pmultimap<Key, Value, Compare> ©) : multimap<Key, Value, Compare, pallocator<Value> >(copy) { }
|
pmultimap(const pmultimap<Key, Value, Compare> ©) : multimap<Key, Value, Compare, pallocator<pair<const Key, Value> > >(copy) { }
|
||||||
pmultimap(const Compare &comp) : multimap<Key, Value, Compare, pallocator<Value> >(comp) { }
|
pmultimap(const Compare &comp) : multimap<Key, Value, Compare, pallocator<pair<const Key, Value> > >(comp) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HAVE_STL_HASH
|
#ifdef HAVE_STL_HASH
|
||||||
@ -83,11 +83,11 @@ public:
|
|||||||
// memory.
|
// memory.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
template<class Key, class Value, class Compare = method_hash<Key, less<Key> > >
|
template<class Key, class Value, class Compare = method_hash<Key, less<Key> > >
|
||||||
class phash_map : public hash_map<Key, Value, Compare, pallocator<Value> > {
|
class phash_map : public hash_map<Key, Value, Compare, pallocator<pair<const Key, Value> > > {
|
||||||
public:
|
public:
|
||||||
phash_map() : hash_map<Key, Value, Compare, pallocator<Value> >() { }
|
phash_map() : hash_map<Key, Value, Compare, pallocator<pair<const Key, Value> > >() { }
|
||||||
phash_map(const phash_map<Key, Value, Compare> ©) : hash_map<Key, Value, Compare, pallocator<Value> >(copy) { }
|
phash_map(const phash_map<Key, Value, Compare> ©) : hash_map<Key, Value, Compare, pallocator<pair<const Key, Value> > >(copy) { }
|
||||||
phash_map(const Compare &comp) : hash_map<Key, Value, Compare, pallocator<Value> >(comp) { }
|
phash_map(const Compare &comp) : hash_map<Key, Value, Compare, pallocator<pair<const Key, Value> > >(comp) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -98,11 +98,11 @@ public:
|
|||||||
// memory.
|
// memory.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
template<class Key, class Value, class Compare = method_hash<Key, less<Key> > >
|
template<class Key, class Value, class Compare = method_hash<Key, less<Key> > >
|
||||||
class phash_multimap : public hash_multimap<Key, Value, Compare, pallocator<Value> > {
|
class phash_multimap : public hash_multimap<Key, Value, Compare, pallocator<pair<const Key, Value> > > {
|
||||||
public:
|
public:
|
||||||
phash_multimap() : hash_multimap<Key, Value, Compare, pallocator<Value> >() { }
|
phash_multimap() : hash_multimap<Key, Value, Compare, pallocator<pair<const Key, Value> > >() { }
|
||||||
phash_multimap(const phash_multimap<Key, Value, Compare> ©) : hash_multimap<Key, Value, Compare, pallocator<Value> >(copy) { }
|
phash_multimap(const phash_multimap<Key, Value, Compare> ©) : hash_multimap<Key, Value, Compare, pallocator<pair<const Key, Value> > >(copy) { }
|
||||||
phash_multimap(const Compare &comp) : hash_multimap<Key, Value, Compare, pallocator<Value> >(comp) { }
|
phash_multimap(const Compare &comp) : hash_multimap<Key, Value, Compare, pallocator<pair<const Key, Value> > >(comp) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
#else // HAVE_STL_HASH
|
#else // HAVE_STL_HASH
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "filename.h"
|
#include "filename.h"
|
||||||
#include "dSearchPath.h"
|
#include "dSearchPath.h"
|
||||||
#include "executionEnvironment.h"
|
#include "executionEnvironment.h"
|
||||||
|
#include "vector_string.h"
|
||||||
|
|
||||||
#include <stdio.h> // For rename() and tempnam()
|
#include <stdio.h> // For rename() and tempnam()
|
||||||
#include <time.h> // for clock() and time()
|
#include <time.h> // for clock() and time()
|
||||||
@ -644,7 +645,7 @@ standardize() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<string> components;
|
vector_string components;
|
||||||
|
|
||||||
// Pull off the components of the filename one at a time.
|
// Pull off the components of the filename one at a time.
|
||||||
bool global = (_filename[0] == '/');
|
bool global = (_filename[0] == '/');
|
||||||
@ -1091,12 +1092,12 @@ compare_timestamps(const Filename &other,
|
|||||||
// This file doesn't, the other one does.
|
// This file doesn't, the other one does.
|
||||||
return this_missing_is_old ? -1 : 1;
|
return this_missing_is_old ? -1 : 1;
|
||||||
|
|
||||||
} else { // !other_exists
|
|
||||||
assert(!other_exists);
|
|
||||||
|
|
||||||
// This file exists, the other one doesn't.
|
|
||||||
return other_missing_is_old ? 1 : -1;
|
|
||||||
}
|
}
|
||||||
|
// !other_exists
|
||||||
|
assert(!other_exists);
|
||||||
|
|
||||||
|
// This file exists, the other one doesn't.
|
||||||
|
return other_missing_is_old ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -14,19 +14,39 @@
|
|||||||
interrogateFunctionWrapper.h interrogateManifest.I \
|
interrogateFunctionWrapper.h interrogateManifest.I \
|
||||||
interrogateManifest.h interrogateType.I interrogateType.h \
|
interrogateManifest.h interrogateType.I interrogateType.h \
|
||||||
interrogate_datafile.I interrogate_datafile.h \
|
interrogate_datafile.I interrogate_datafile.h \
|
||||||
interrogate_interface.h interrogate_request.h vector_int.h
|
interrogate_interface.h interrogate_request.h \
|
||||||
|
py_panda.h \
|
||||||
|
register_type.I register_type.h \
|
||||||
|
typedObject.I typedObject.h \
|
||||||
|
typeHandle.I typeHandle.h \
|
||||||
|
typeRegistry.I typeRegistry.h \
|
||||||
|
typeRegistryNode.I typeRegistryNode.h \
|
||||||
|
vector_int.h
|
||||||
|
|
||||||
#define INCLUDED_SOURCES \
|
#define INCLUDED_SOURCES \
|
||||||
config_interrogatedb.cxx indexRemapper.cxx \
|
config_interrogatedb.cxx \
|
||||||
|
dtool_super_base.cxx \
|
||||||
|
indexRemapper.cxx \
|
||||||
interrogateComponent.cxx interrogateDatabase.cxx \
|
interrogateComponent.cxx interrogateDatabase.cxx \
|
||||||
interrogateElement.cxx interrogateFunction.cxx \
|
interrogateElement.cxx interrogateFunction.cxx \
|
||||||
interrogateFunctionWrapper.cxx interrogateManifest.cxx \
|
interrogateFunctionWrapper.cxx interrogateManifest.cxx \
|
||||||
interrogateType.cxx interrogate_datafile.cxx \
|
interrogateType.cxx interrogate_datafile.cxx \
|
||||||
interrogate_interface.cxx interrogate_request.cxx \
|
interrogate_interface.cxx interrogate_request.cxx \
|
||||||
|
py_panda.cxx \
|
||||||
|
register_type.cxx \
|
||||||
|
typedObject.cxx \
|
||||||
|
typeHandle.cxx \
|
||||||
|
typeRegistry.cxx typeRegistryNode.cxx \
|
||||||
vector_int.cxx
|
vector_int.cxx
|
||||||
|
|
||||||
#define INSTALL_HEADERS \
|
#define INSTALL_HEADERS \
|
||||||
interrogate_interface.h interrogate_request.h vector_int.h \
|
interrogate_interface.h interrogate_request.h vector_int.h \
|
||||||
config_interrogatedb.h py_panda.h
|
config_interrogatedb.h py_panda.h \
|
||||||
|
register_type.I register_type.h \
|
||||||
|
typedObject.I typedObject.h \
|
||||||
|
typeHandle.I typeHandle.h \
|
||||||
|
typeRegistry.I typeRegistry.h \
|
||||||
|
typeRegistryNode.I typeRegistryNode.h \
|
||||||
|
|
||||||
|
|
||||||
#end lib_target
|
#end lib_target
|
||||||
|
95
dtool/src/interrogatedb/dtool_super_base.cxx
Normal file
95
dtool/src/interrogatedb/dtool_super_base.cxx
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
// Filename: dtool_super_base.cxx
|
||||||
|
// Created by: drose (04Jul05)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// 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 .
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "py_panda.h"
|
||||||
|
|
||||||
|
class EmptyClass
|
||||||
|
{
|
||||||
|
};
|
||||||
|
Define_Module_Class_Private(dtoolconfig,DTOOL_SUPPER_BASE,EmptyClass,DTOOL_SUPPER_BASE111);
|
||||||
|
|
||||||
|
static PyObject * GetSupperBase(PyObject * self)
|
||||||
|
{
|
||||||
|
Py_INCREF(&(Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject())); // order is important .. this is used for static functions
|
||||||
|
return (PyObject *)&Dtool_DTOOL_SUPPER_BASE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
PyMethodDef Dtool_Methods_DTOOL_SUPPER_BASE[]= {
|
||||||
|
{ "DtoolGetSupperBase",(PyCFunction ) &GetSupperBase, METH_NOARGS,"Will Return SUPPERbase Class"},
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
static long DTool_HashKey_Methods_DTOOL_SUPPER_BASE(PyObject * self)
|
||||||
|
{
|
||||||
|
void * local_this =DTOOL_Call_GetPointerThis(self);
|
||||||
|
if(local_this == NULL)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
};
|
||||||
|
return (long)local_this;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
inline void Dtool_PyModuleClassInit_DTOOL_SUPPER_BASE(PyObject *module)
|
||||||
|
{
|
||||||
|
static bool initdone = false;
|
||||||
|
if(!initdone)
|
||||||
|
{
|
||||||
|
|
||||||
|
initdone = true;
|
||||||
|
Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject().tp_dict = PyDict_New();
|
||||||
|
PyDict_SetItemString(Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject().tp_dict,"DtoolClassDict",Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject().tp_dict);
|
||||||
|
|
||||||
|
// __hash__
|
||||||
|
Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject().tp_hash = &DTool_HashKey_Methods_DTOOL_SUPPER_BASE;
|
||||||
|
Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject().tp_compare = &DTOOL_PyObject_Compare;
|
||||||
|
|
||||||
|
if(PyType_Ready(&Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject()) < 0)
|
||||||
|
{
|
||||||
|
PyErr_SetString(PyExc_TypeError, "PyType_Ready(Dtool_DTOOL_SUPPER_BASE)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Py_INCREF(&Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject());
|
||||||
|
|
||||||
|
PyDict_SetItemString(Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject().tp_dict,"DtoolGetSupperBase",PyCFunction_New(&Dtool_Methods_DTOOL_SUPPER_BASE[0],&Dtool_DTOOL_SUPPER_BASE.As_PyObject()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(module != NULL)
|
||||||
|
{
|
||||||
|
Py_INCREF(&Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject());
|
||||||
|
PyModule_AddObject(module, "DTOOL_SUPPER_BASE",(PyObject *)&Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void * Dtool_DowncastInterface_DTOOL_SUPPER_BASE(void *from_this, Dtool_PyTypedObject *from_type)
|
||||||
|
{
|
||||||
|
return (void *) NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void * Dtool_UpcastInterface_DTOOL_SUPPER_BASE(PyObject *self, Dtool_PyTypedObject *requested_type)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Dtool_Init_DTOOL_SUPPER_BASE(PyObject *self, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyErr_SetString(PyExc_TypeError, "Error Can Not Init SUPPER BASE");
|
||||||
|
return -1;
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
#include "vector_int.cxx"
|
#include "vector_int.cxx"
|
||||||
|
#include "dtool_super_base.cxx"
|
||||||
#include "config_interrogatedb.cxx"
|
#include "config_interrogatedb.cxx"
|
||||||
#include "indexRemapper.cxx"
|
#include "indexRemapper.cxx"
|
||||||
#include "interrogateComponent.cxx"
|
#include "interrogateComponent.cxx"
|
||||||
|
@ -3,6 +3,12 @@
|
|||||||
#include "interrogateManifest.cxx"
|
#include "interrogateManifest.cxx"
|
||||||
#include "interrogateType.cxx"
|
#include "interrogateType.cxx"
|
||||||
#include "interrogate_request.cxx"
|
#include "interrogate_request.cxx"
|
||||||
|
#include "py_panda.cxx"
|
||||||
|
#include "register_type.cxx"
|
||||||
|
#include "typedObject.cxx"
|
||||||
|
#include "typeHandle.cxx"
|
||||||
|
#include "typeRegistry.cxx"
|
||||||
|
#include "typeRegistryNode.cxx"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
19
dtool/src/interrogatedb/py_panda.cxx
Normal file
19
dtool/src/interrogatedb/py_panda.cxx
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// Filename: py_panda.cxx
|
||||||
|
// Created by: drose (04Jul05)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// 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 .
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "py_panda.h"
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#ifndef NO_RUNTIME_TYPES
|
#ifndef NO_RUNTIME_TYPES
|
||||||
|
|
||||||
#include "pandabase.h"
|
#include "dtoolbase.h"
|
||||||
#include "typedObject.h"
|
#include "typedObject.h"
|
||||||
#include "typeRegistry.h"
|
#include "typeRegistry.h"
|
||||||
|
|
||||||
@ -43,6 +43,9 @@
|
|||||||
#ifdef HAVE_LONG_LONG
|
#ifdef HAVE_LONG_LONG
|
||||||
#undef HAVE_LONG_LONG
|
#undef HAVE_LONG_LONG
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef _POSIX_C_SOURCE
|
||||||
|
#undef _POSIX_C_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "structmember.h"
|
#include "structmember.h"
|
||||||
@ -783,94 +786,7 @@ inline int DTOOL_PyObject_Compare(PyObject *v1, PyObject *v2)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EXPCL_DTOOLCONFIG extern struct Dtool_PyTypedObject Dtool_DTOOL_SUPPER_BASE;
|
||||||
#ifdef PANDA_LIBRARY_NAME_libexpress
|
|
||||||
#define DTOOL_CREATE_SUPPER_BASE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DTOOL_CREATE_SUPPER_BASE
|
|
||||||
|
|
||||||
class EmptyClass
|
|
||||||
{
|
|
||||||
};
|
|
||||||
Define_Module_Class_Private(pandaexpress,DTOOL_SUPPER_BASE,EmptyClass,DTOOL_SUPPER_BASE111);
|
|
||||||
|
|
||||||
static PyObject * GetSupperBase(PyObject * self)
|
|
||||||
{
|
|
||||||
Py_INCREF(&(Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject())); // order is important .. this is used for static functions
|
|
||||||
return (PyObject *)&Dtool_DTOOL_SUPPER_BASE;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
PyMethodDef Dtool_Methods_DTOOL_SUPPER_BASE[]= {
|
|
||||||
{ "DtoolGetSupperBase",(PyCFunction ) &GetSupperBase, METH_NOARGS,"Will Return SUPPERbase Class"},
|
|
||||||
{ NULL, NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
static long DTool_HashKey_Methods_DTOOL_SUPPER_BASE(PyObject * self)
|
|
||||||
{
|
|
||||||
void * local_this =DTOOL_Call_GetPointerThis(self);
|
|
||||||
if(local_this == NULL)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
};
|
|
||||||
return (long)local_this;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
inline void Dtool_PyModuleClassInit_DTOOL_SUPPER_BASE(PyObject *module)
|
|
||||||
{
|
|
||||||
static bool initdone = false;
|
|
||||||
if(!initdone)
|
|
||||||
{
|
|
||||||
|
|
||||||
initdone = true;
|
|
||||||
Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject().tp_dict = PyDict_New();
|
|
||||||
PyDict_SetItemString(Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject().tp_dict,"DtoolClassDict",Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject().tp_dict);
|
|
||||||
|
|
||||||
// __hash__
|
|
||||||
Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject().tp_hash = &DTool_HashKey_Methods_DTOOL_SUPPER_BASE;
|
|
||||||
Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject().tp_compare = &DTOOL_PyObject_Compare;
|
|
||||||
|
|
||||||
if(PyType_Ready(&Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject()) < 0)
|
|
||||||
{
|
|
||||||
PyErr_SetString(PyExc_TypeError, "PyType_Ready(Dtool_DTOOL_SUPPER_BASE)");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Py_INCREF(&Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject());
|
|
||||||
|
|
||||||
PyDict_SetItemString(Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject().tp_dict,"DtoolGetSupperBase",PyCFunction_New(&Dtool_Methods_DTOOL_SUPPER_BASE[0],&Dtool_DTOOL_SUPPER_BASE.As_PyObject()));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(module != NULL)
|
|
||||||
{
|
|
||||||
Py_INCREF(&Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject());
|
|
||||||
PyModule_AddObject(module, "DTOOL_SUPPER_BASE",(PyObject *)&Dtool_DTOOL_SUPPER_BASE.As_PyTypeObject());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void * Dtool_DowncastInterface_DTOOL_SUPPER_BASE(void *from_this, Dtool_PyTypedObject *from_type)
|
|
||||||
{
|
|
||||||
return (void *) NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void * Dtool_UpcastInterface_DTOOL_SUPPER_BASE(PyObject *self, Dtool_PyTypedObject *requested_type)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Dtool_Init_DTOOL_SUPPER_BASE(PyObject *self, PyObject *args, PyObject *kwds)
|
|
||||||
{
|
|
||||||
PyErr_SetString(PyExc_TypeError, "Error Can Not Init SUPPER BASE");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#else
|
|
||||||
IMPORT_THIS struct Dtool_PyTypedObject Dtool_DTOOL_SUPPER_BASE;
|
|
||||||
#endif // DTOOL_CREATE_SUPPER_BASE
|
|
||||||
|
|
||||||
|
|
||||||
#endif // PY_PANDA_H_
|
#endif // PY_PANDA_H_
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef REGISTER_TYPE_H
|
#ifndef REGISTER_TYPE_H
|
||||||
#define REGISTER_TYPE_H
|
#define REGISTER_TYPE_H
|
||||||
|
|
||||||
#include "pandabase.h"
|
#include "dtoolbase.h"
|
||||||
|
|
||||||
#include "typeHandle.h"
|
#include "typeHandle.h"
|
||||||
#include "typeRegistry.h"
|
#include "typeRegistry.h"
|
||||||
@ -85,13 +85,13 @@ register_dynamic_type(const string &name,
|
|||||||
|
|
||||||
|
|
||||||
// A few system-wide TypeHandles are defined for some basic types.
|
// A few system-wide TypeHandles are defined for some basic types.
|
||||||
extern TypeHandle EXPCL_PANDAEXPRESS long_type_handle;
|
extern TypeHandle EXPCL_DTOOLCONFIG long_type_handle;
|
||||||
extern TypeHandle EXPCL_PANDAEXPRESS int_type_handle;
|
extern TypeHandle EXPCL_DTOOLCONFIG int_type_handle;
|
||||||
extern TypeHandle EXPCL_PANDAEXPRESS short_type_handle;
|
extern TypeHandle EXPCL_DTOOLCONFIG short_type_handle;
|
||||||
extern TypeHandle EXPCL_PANDAEXPRESS char_type_handle;
|
extern TypeHandle EXPCL_DTOOLCONFIG char_type_handle;
|
||||||
extern TypeHandle EXPCL_PANDAEXPRESS bool_type_handle;
|
extern TypeHandle EXPCL_DTOOLCONFIG bool_type_handle;
|
||||||
extern TypeHandle EXPCL_PANDAEXPRESS double_type_handle;
|
extern TypeHandle EXPCL_DTOOLCONFIG double_type_handle;
|
||||||
extern TypeHandle EXPCL_PANDAEXPRESS float_type_handle;
|
extern TypeHandle EXPCL_DTOOLCONFIG float_type_handle;
|
||||||
|
|
||||||
extern TypeHandle long_p_type_handle;
|
extern TypeHandle long_p_type_handle;
|
||||||
extern TypeHandle int_p_type_handle;
|
extern TypeHandle int_p_type_handle;
|
||||||
@ -102,7 +102,7 @@ extern TypeHandle double_p_type_handle;
|
|||||||
extern TypeHandle float_p_type_handle;
|
extern TypeHandle float_p_type_handle;
|
||||||
extern TypeHandle void_p_type_handle;
|
extern TypeHandle void_p_type_handle;
|
||||||
|
|
||||||
void EXPCL_PANDAEXPRESS init_system_type_handles();
|
void EXPCL_DTOOLCONFIG init_system_type_handles();
|
||||||
|
|
||||||
// The following template function and its specializations will return
|
// The following template function and its specializations will return
|
||||||
// a TypeHandle for any type in the world, from a pointer to that
|
// a TypeHandle for any type in the world, from a pointer to that
|
@ -17,11 +17,6 @@
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
// In general, we use the express_cat->info() syntax in this file
|
|
||||||
// (instead of express_cat.info()), because much of this work is done at
|
|
||||||
// static init time, and we must use the arrow syntax to force
|
|
||||||
// initialization of the express_cat category.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: TypeHandle::Constructor
|
// Function: TypeHandle::Constructor
|
||||||
// Access: Published
|
// Access: Published
|
@ -19,13 +19,11 @@
|
|||||||
#ifndef TYPEHANDLE_H
|
#ifndef TYPEHANDLE_H
|
||||||
#define TYPEHANDLE_H
|
#define TYPEHANDLE_H
|
||||||
|
|
||||||
#include "pandabase.h"
|
#include "dtoolbase.h"
|
||||||
|
#include "typeRegistry.h"
|
||||||
#include "notify.h"
|
#include "notify.h"
|
||||||
|
|
||||||
#include "config_express.h"
|
#include <set>
|
||||||
|
|
||||||
#include "set"
|
|
||||||
|
|
||||||
// The following illustrates the convention for declaring a type that
|
// The following illustrates the convention for declaring a type that
|
||||||
// uses TypeHandle. In this example, ThisThingie inherits from
|
// uses TypeHandle. In this example, ThisThingie inherits from
|
||||||
@ -90,7 +88,7 @@ class TypedObject;
|
|||||||
// ancestry of a particular type may be queried, and the
|
// ancestry of a particular type may be queried, and the
|
||||||
// type name may be retrieved for run-time display.
|
// type name may be retrieved for run-time display.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
class EXPCL_PANDAEXPRESS TypeHandle {
|
class EXPCL_DTOOLCONFIG TypeHandle {
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
INLINE TypeHandle();
|
INLINE TypeHandle();
|
||||||
INLINE TypeHandle(const TypeHandle ©);
|
INLINE TypeHandle(const TypeHandle ©);
|
@ -48,32 +48,3 @@ freshen_derivations() {
|
|||||||
_derivations_fresh = true;
|
_derivations_fresh = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
// Function: TypeRegistry::is_derived_from
|
|
||||||
// Access: Public
|
|
||||||
// Description: Returns true if the first type is derived from the
|
|
||||||
// second type, false otherwise.
|
|
||||||
//
|
|
||||||
// The "child_object" pointer is an optional pointer to
|
|
||||||
// the TypedObject class that owns the child TypeHandle.
|
|
||||||
// It is only used in case the TypeHandle is
|
|
||||||
// inadvertently undefined.
|
|
||||||
//
|
|
||||||
// This function definition follows the definitions for
|
|
||||||
// look_up() and freshen_derivations() just to maximize
|
|
||||||
// the chance the the compiler will be able to inline
|
|
||||||
// the above functions. Yeah, a compiler shouldn't
|
|
||||||
// care, but there's a big different between "shouldn't"
|
|
||||||
// and "doesn't".
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
INLINE bool TypeRegistry::
|
|
||||||
is_derived_from(TypeHandle child, TypeHandle base,
|
|
||||||
TypedObject *child_object) {
|
|
||||||
const TypeRegistryNode *child_node = look_up(child, child_object);
|
|
||||||
const TypeRegistryNode *base_node = look_up(base, (TypedObject *)NULL);
|
|
||||||
nassertr(child_node != (TypeRegistryNode *)NULL &&
|
|
||||||
base_node != (TypeRegistryNode *)NULL, false);
|
|
||||||
freshen_derivations();
|
|
||||||
return TypeRegistryNode::is_derived_from(child_node, base_node);
|
|
||||||
}
|
|
@ -17,16 +17,19 @@
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "typeRegistry.h"
|
#include "typeRegistry.h"
|
||||||
|
#include "typeRegistryNode.h"
|
||||||
|
#include "typeHandle.h"
|
||||||
#include "typedObject.h"
|
#include "typedObject.h"
|
||||||
#include "indent.h"
|
#include "indent.h"
|
||||||
#include "config_express.h"
|
#include "config_interrogatedb.h"
|
||||||
|
#include "configVariableBool.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
// In general, we use the express_cat->info() syntax in this file
|
// In general, we use the interrogatedb_cat->info() syntax in this file
|
||||||
// (instead of express_cat.info()), because much of this work is done at
|
// (instead of interrogatedb_cat.info()), because much of this work is done at
|
||||||
// static init time, and we must use the arrow syntax to force
|
// static init time, and we must use the arrow syntax to force
|
||||||
// initialization of the express_cat category.
|
// initialization of the interrogatedb_cat category.
|
||||||
|
|
||||||
TypeRegistry *TypeRegistry::_global_pointer = NULL;
|
TypeRegistry *TypeRegistry::_global_pointer = NULL;
|
||||||
|
|
||||||
@ -64,9 +67,9 @@ register_type(TypeHandle &type_handle, const string &name) {
|
|||||||
|
|
||||||
#ifdef NOTIFY_DEBUG
|
#ifdef NOTIFY_DEBUG
|
||||||
// This code runs at static init time, so cannot use the
|
// This code runs at static init time, so cannot use the
|
||||||
// express_cat.is_spam() syntax.
|
// interrogatedb_cat.is_spam() syntax.
|
||||||
if (express_cat->is_spam()) {
|
if (interrogatedb_cat->is_spam()) {
|
||||||
express_cat->spam() << "Registering type " << name << "\n";
|
interrogatedb_cat->spam() << "Registering type " << name << "\n";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -101,7 +104,7 @@ register_type(TypeHandle &type_handle, const string &name) {
|
|||||||
// at the first call to register_type(), and we got the same
|
// at the first call to register_type(), and we got the same
|
||||||
// reference passed in this time, but now it's different! Bad
|
// reference passed in this time, but now it's different! Bad
|
||||||
// juju.
|
// juju.
|
||||||
express_cat->error()
|
interrogatedb_cat->error()
|
||||||
<< "Reregistering " << name << "\n";
|
<< "Reregistering " << name << "\n";
|
||||||
type_handle == rnode->_handle;
|
type_handle == rnode->_handle;
|
||||||
return false;
|
return false;
|
||||||
@ -109,7 +112,7 @@ register_type(TypeHandle &type_handle, const string &name) {
|
|||||||
|
|
||||||
if (type_handle != rnode->_handle) {
|
if (type_handle != rnode->_handle) {
|
||||||
// Hmm, we seem to have a contradictory type registration!
|
// Hmm, we seem to have a contradictory type registration!
|
||||||
express_cat->warning()
|
interrogatedb_cat->warning()
|
||||||
<< "Attempt to register type " << name << " more than once!\n";
|
<< "Attempt to register type " << name << " more than once!\n";
|
||||||
|
|
||||||
// This is invalid, but we'll allow it anyway. It seems to happen
|
// This is invalid, but we'll allow it anyway. It seems to happen
|
||||||
@ -142,9 +145,9 @@ register_dynamic_type(const string &name) {
|
|||||||
|
|
||||||
#ifdef NOTIFY_DEBUG
|
#ifdef NOTIFY_DEBUG
|
||||||
// This code runs at static init time, so cannot use the
|
// This code runs at static init time, so cannot use the
|
||||||
// express_cat.is_spam() syntax.
|
// interrogatedb_cat.is_spam() syntax.
|
||||||
if (express_cat->is_spam()) {
|
if (interrogatedb_cat->is_spam()) {
|
||||||
express_cat->spam() << "Registering type " << name << "\n";
|
interrogatedb_cat->spam() << "Registering type " << name << "\n";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -211,7 +214,7 @@ record_alternate_name(TypeHandle type, const string &name) {
|
|||||||
NameRegistry::iterator ri =
|
NameRegistry::iterator ri =
|
||||||
_name_registry.insert(NameRegistry::value_type(name, rnode)).first;
|
_name_registry.insert(NameRegistry::value_type(name, rnode)).first;
|
||||||
if ((*ri).second != rnode) {
|
if ((*ri).second != rnode) {
|
||||||
express_cat.warning()
|
interrogatedb_cat.warning()
|
||||||
<< "Name " << name << " already assigned to TypeHandle "
|
<< "Name " << name << " already assigned to TypeHandle "
|
||||||
<< rnode->_name << "; cannot reassign to " << type << "\n";
|
<< rnode->_name << "; cannot reassign to " << type << "\n";
|
||||||
}
|
}
|
||||||
@ -254,6 +257,35 @@ get_name(TypeHandle type, TypedObject *object) const {
|
|||||||
return rnode->_name;
|
return rnode->_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: TypeRegistry::is_derived_from
|
||||||
|
// Access: Public
|
||||||
|
// Description: Returns true if the first type is derived from the
|
||||||
|
// second type, false otherwise.
|
||||||
|
//
|
||||||
|
// The "child_object" pointer is an optional pointer to
|
||||||
|
// the TypedObject class that owns the child TypeHandle.
|
||||||
|
// It is only used in case the TypeHandle is
|
||||||
|
// inadvertently undefined.
|
||||||
|
//
|
||||||
|
// This function definition follows the definitions for
|
||||||
|
// look_up() and freshen_derivations() just to maximize
|
||||||
|
// the chance the the compiler will be able to inline
|
||||||
|
// the above functions. Yeah, a compiler shouldn't
|
||||||
|
// care, but there's a big different between "shouldn't"
|
||||||
|
// and "doesn't".
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
bool TypeRegistry::
|
||||||
|
is_derived_from(TypeHandle child, TypeHandle base,
|
||||||
|
TypedObject *child_object) {
|
||||||
|
const TypeRegistryNode *child_node = look_up(child, child_object);
|
||||||
|
const TypeRegistryNode *base_node = look_up(base, (TypedObject *)NULL);
|
||||||
|
nassertr(child_node != (TypeRegistryNode *)NULL &&
|
||||||
|
base_node != (TypeRegistryNode *)NULL, false);
|
||||||
|
freshen_derivations();
|
||||||
|
return TypeRegistryNode::is_derived_from(child_node, base_node);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: TypeRegistry::get_num_root_classes
|
// Function: TypeRegistry::get_num_root_classes
|
||||||
// Access: Public
|
// Access: Public
|
||||||
@ -400,7 +432,7 @@ reregister_types() {
|
|||||||
++ri) {
|
++ri) {
|
||||||
TypeRegistryNode *rnode = (*ri);
|
TypeRegistryNode *rnode = (*ri);
|
||||||
if (rnode != NULL && rnode->_handle != rnode->_ref) {
|
if (rnode != NULL && rnode->_handle != rnode->_ref) {
|
||||||
express_cat->warning()
|
interrogatedb_cat->warning()
|
||||||
<< "Reregistering " << rnode->_name << "\n";
|
<< "Reregistering " << rnode->_name << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -439,8 +471,8 @@ TypeRegistry *TypeRegistry::
|
|||||||
ptr() {
|
ptr() {
|
||||||
if (_global_pointer == NULL) {
|
if (_global_pointer == NULL) {
|
||||||
#ifdef NOTIFY_DEBUG
|
#ifdef NOTIFY_DEBUG
|
||||||
if (express_cat->is_spam()) {
|
if (interrogatedb_cat->is_spam()) {
|
||||||
express_cat->spam()
|
interrogatedb_cat->spam()
|
||||||
<< "Creating global TypeRegistry\n";
|
<< "Creating global TypeRegistry\n";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -478,7 +510,13 @@ init_global_pointer() {
|
|||||||
|
|
||||||
// Now that we've created the TypeRegistry, we can assign this
|
// Now that we've created the TypeRegistry, we can assign this
|
||||||
// Config variable.
|
// Config variable.
|
||||||
TypeRegistryNode::_paranoid_inheritance = get_paranoid_inheritance();
|
|
||||||
|
ConfigVariableBool paranoid_inheritance
|
||||||
|
("paranoid-inheritance", true,
|
||||||
|
PRC_DESC("Set this to true to double-check the test for inheritance of "
|
||||||
|
"TypeHandles, e.g. via is_of_type(). This has no effect if NDEBUG "
|
||||||
|
"is defined."));
|
||||||
|
TypeRegistryNode::_paranoid_inheritance = paranoid_inheritance;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -491,7 +529,7 @@ init_global_pointer() {
|
|||||||
void TypeRegistry::
|
void TypeRegistry::
|
||||||
rebuild_derivations() {
|
rebuild_derivations() {
|
||||||
#ifdef NOTIFY_DEBUG
|
#ifdef NOTIFY_DEBUG
|
||||||
express_cat->debug()
|
interrogatedb_cat->debug()
|
||||||
<< "Rebuilding derivation tree.\n";
|
<< "Rebuilding derivation tree.\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -575,19 +613,19 @@ look_up(TypeHandle handle, TypedObject *object) const {
|
|||||||
handle = object->force_init_type();
|
handle = object->force_init_type();
|
||||||
if (handle._index == 0) {
|
if (handle._index == 0) {
|
||||||
// Strange.
|
// Strange.
|
||||||
express_cat->error()
|
interrogatedb_cat->error()
|
||||||
<< "Unable to force_init_type() on unregistered TypeHandle.\n";
|
<< "Unable to force_init_type() on unregistered TypeHandle.\n";
|
||||||
nassertr(false, NULL);
|
nassertr(false, NULL);
|
||||||
}
|
}
|
||||||
if (handle == object->get_type()) {
|
if (handle == object->get_type()) {
|
||||||
// Problem solved!
|
// Problem solved!
|
||||||
express_cat->warning()
|
interrogatedb_cat->warning()
|
||||||
<< "Type " << handle << " was unregistered!\n";
|
<< "Type " << handle << " was unregistered!\n";
|
||||||
} else {
|
} else {
|
||||||
// No good; it looks like the TypeHandle belongs to a class
|
// No good; it looks like the TypeHandle belongs to a class
|
||||||
// that defined get_type(), but didn't define
|
// that defined get_type(), but didn't define
|
||||||
// force_init_type().
|
// force_init_type().
|
||||||
express_cat->error()
|
interrogatedb_cat->error()
|
||||||
<< "Attempt to reference unregistered TypeHandle. Type is of some\n"
|
<< "Attempt to reference unregistered TypeHandle. Type is of some\n"
|
||||||
<< "class derived from " << handle << " that doesn't define a good\n"
|
<< "class derived from " << handle << " that doesn't define a good\n"
|
||||||
<< "force_init_type() method.\n";
|
<< "force_init_type() method.\n";
|
||||||
@ -597,17 +635,17 @@ look_up(TypeHandle handle, TypedObject *object) const {
|
|||||||
} else {
|
} else {
|
||||||
// We don't have a TypedObject pointer, so there's nothing we
|
// We don't have a TypedObject pointer, so there's nothing we
|
||||||
// can do about it.
|
// can do about it.
|
||||||
express_cat->error()
|
interrogatedb_cat->error()
|
||||||
<< "Attempt to reference unregistered TypeHandle!\n"
|
<< "Attempt to reference unregistered TypeHandle!\n"
|
||||||
<< "Registered TypeHandles are:\n";
|
<< "Registered TypeHandles are:\n";
|
||||||
write(express_cat->error(false));
|
write(interrogatedb_cat->error(false));
|
||||||
nassertr(false, NULL);
|
nassertr(false, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handle._index < 0 ||
|
if (handle._index < 0 ||
|
||||||
handle._index >= (int)_handle_registry.size()) {
|
handle._index >= (int)_handle_registry.size()) {
|
||||||
express_cat->fatal()
|
interrogatedb_cat->fatal()
|
||||||
<< "Invalid TypeHandle index " << handle._index
|
<< "Invalid TypeHandle index " << handle._index
|
||||||
<< "! Is memory corrupt?\n";
|
<< "! Is memory corrupt?\n";
|
||||||
nassertr(false, NULL);
|
nassertr(false, NULL);
|
||||||
@ -624,7 +662,7 @@ TypeHandle TypeRegistry::find_type_by_id(int id) const
|
|||||||
{
|
{
|
||||||
if (id < 0 ||id >= (int)_handle_registry.size())
|
if (id < 0 ||id >= (int)_handle_registry.size())
|
||||||
{
|
{
|
||||||
express_cat->fatal()
|
interrogatedb_cat->fatal()
|
||||||
<< "Invalid TypeHandle index " << id
|
<< "Invalid TypeHandle index " << id
|
||||||
<< "! Is memory corrupt?\n";
|
<< "! Is memory corrupt?\n";
|
||||||
//nassertr(false, NULL);
|
//nassertr(false, NULL);
|
@ -19,15 +19,18 @@
|
|||||||
#ifndef TYPEREGISTRY_H
|
#ifndef TYPEREGISTRY_H
|
||||||
#define TYPEREGISTRY_H
|
#define TYPEREGISTRY_H
|
||||||
|
|
||||||
#include "pandabase.h"
|
#include "dtoolbase.h"
|
||||||
|
|
||||||
#include "typeHandle.h"
|
|
||||||
#include "typeRegistryNode.h"
|
|
||||||
|
|
||||||
#include "notify.h"
|
#include "notify.h"
|
||||||
#include "pvector.h"
|
#include "pvector.h"
|
||||||
#include "pmap.h"
|
#include "pmap.h"
|
||||||
|
|
||||||
|
#include <set>
|
||||||
|
|
||||||
|
class TypeHandle;
|
||||||
|
class TypeRegistryNode;
|
||||||
|
class TypedObject;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Class : TypeRegistry
|
// Class : TypeRegistry
|
||||||
// Description : The TypeRegistry class maintains all the assigned
|
// Description : The TypeRegistry class maintains all the assigned
|
||||||
@ -37,7 +40,7 @@
|
|||||||
// initially, and it should be migrated to shared memory
|
// initially, and it should be migrated to shared memory
|
||||||
// as soon as shared memory becomes available.
|
// as soon as shared memory becomes available.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
class EXPCL_PANDAEXPRESS TypeRegistry {
|
class EXPCL_DTOOLCONFIG TypeRegistry {
|
||||||
public:
|
public:
|
||||||
// User code shouldn't generally need to call
|
// User code shouldn't generally need to call
|
||||||
// TypeRegistry::register_type() or record_derivation() directly;
|
// TypeRegistry::register_type() or record_derivation() directly;
|
||||||
@ -55,8 +58,8 @@ PUBLISHED:
|
|||||||
|
|
||||||
|
|
||||||
string get_name(TypeHandle type, TypedObject *object) const;
|
string get_name(TypeHandle type, TypedObject *object) const;
|
||||||
INLINE bool is_derived_from(TypeHandle child, TypeHandle base,
|
bool is_derived_from(TypeHandle child, TypeHandle base,
|
||||||
TypedObject *child_object);
|
TypedObject *child_object);
|
||||||
|
|
||||||
int get_num_root_classes();
|
int get_num_root_classes();
|
||||||
TypeHandle get_root_class(int n);
|
TypeHandle get_root_class(int n);
|
||||||
@ -115,7 +118,7 @@ private:
|
|||||||
|
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// Helper function to allow for "C" interaction into the type system
|
// Helper function to allow for "C" interaction into the type system
|
||||||
extern "C" EXPCL_PANDAEXPRESS int get_best_parent_from_Set(int id, const std::set<int> &set);
|
extern "C" EXPCL_DTOOLCONFIG int get_best_parent_from_Set(int id, const std::set<int> &set);
|
||||||
|
|
||||||
#include "typeRegistry.I"
|
#include "typeRegistry.I"
|
||||||
|
|
@ -17,6 +17,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "typeRegistryNode.h"
|
#include "typeRegistryNode.h"
|
||||||
|
#include "config_interrogatedb.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@ -68,7 +69,7 @@ is_derived_from(const TypeRegistryNode *child, const TypeRegistryNode *base) {
|
|||||||
if (_paranoid_inheritance) {
|
if (_paranoid_inheritance) {
|
||||||
bool paranoid_derives = check_derived_from(child, base);
|
bool paranoid_derives = check_derived_from(child, base);
|
||||||
if (derives != paranoid_derives) {
|
if (derives != paranoid_derives) {
|
||||||
express_cat.error()
|
interrogatedb_cat.error()
|
||||||
<< "Inheritance test for " << child->_name
|
<< "Inheritance test for " << child->_name
|
||||||
<< " from " << base->_name << " failed!\n"
|
<< " from " << base->_name << " failed!\n"
|
||||||
<< "Result: " << derives << " should have been: "
|
<< "Result: " << derives << " should have been: "
|
||||||
@ -133,7 +134,7 @@ is_derived_from(const TypeRegistryNode *child, const TypeRegistryNode *base) {
|
|||||||
if (_paranoid_inheritance) {
|
if (_paranoid_inheritance) {
|
||||||
bool paranoid_derives = check_derived_from(child, base);
|
bool paranoid_derives = check_derived_from(child, base);
|
||||||
if (derives != paranoid_derives) {
|
if (derives != paranoid_derives) {
|
||||||
express_cat.error()
|
interrogatedb_cat.error()
|
||||||
<< "Inheritance test for " << child->_name
|
<< "Inheritance test for " << child->_name
|
||||||
<< " from " << base->_name << " failed!\n"
|
<< " from " << base->_name << " failed!\n"
|
||||||
<< "Result: " << derives << " should have been: "
|
<< "Result: " << derives << " should have been: "
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef TYPEREGISTRYNODE_H
|
#ifndef TYPEREGISTRYNODE_H
|
||||||
#define TYPEREGISTRYNODE_H
|
#define TYPEREGISTRYNODE_H
|
||||||
|
|
||||||
#include "pandabase.h"
|
#include "dtoolbase.h"
|
||||||
|
|
||||||
#include "typeHandle.h"
|
#include "typeHandle.h"
|
||||||
|
|
||||||
@ -32,7 +32,7 @@
|
|||||||
// class; this class is hidden within the TypeRegistry
|
// class; this class is hidden within the TypeRegistry
|
||||||
// accessors.
|
// accessors.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
class EXPCL_PANDAEXPRESS TypeRegistryNode {
|
class EXPCL_DTOOLCONFIG TypeRegistryNode {
|
||||||
public:
|
public:
|
||||||
TypeRegistryNode(TypeHandle handle, const string &name, TypeHandle &ref);
|
TypeRegistryNode(TypeHandle handle, const string &name, TypeHandle &ref);
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "typedObject.h"
|
#include "typedObject.h"
|
||||||
#include "config_express.h"
|
#include "config_interrogatedb.h"
|
||||||
|
|
||||||
|
|
||||||
TypeHandle TypedObject::_type_handle;
|
TypeHandle TypedObject::_type_handle;
|
||||||
@ -42,7 +42,7 @@ get_type() const {
|
|||||||
// Normally, this function should never be called, because it is a
|
// Normally, this function should never be called, because it is a
|
||||||
// pure virtual function. If it is called, you probably called
|
// pure virtual function. If it is called, you probably called
|
||||||
// get_type() on a recently-destructed object.
|
// get_type() on a recently-destructed object.
|
||||||
express_cat.warning()
|
interrogatedb_cat.warning()
|
||||||
<< "TypedObject::get_type() called!\n";
|
<< "TypedObject::get_type() called!\n";
|
||||||
return _type_handle;
|
return _type_handle;
|
||||||
}
|
}
|
@ -19,12 +19,12 @@
|
|||||||
#ifndef TYPEDOBJECT_H
|
#ifndef TYPEDOBJECT_H
|
||||||
#define TYPEDOBJECT_H
|
#define TYPEDOBJECT_H
|
||||||
|
|
||||||
#include "pandabase.h"
|
#include "dtoolbase.h"
|
||||||
|
|
||||||
#include "typeHandle.h"
|
#include "typeHandle.h"
|
||||||
#include "register_type.h"
|
#include "register_type.h"
|
||||||
|
|
||||||
#include "set"
|
#include <set>
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Class : TypedObject
|
// Class : TypedObject
|
||||||
@ -104,7 +104,7 @@
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
class EXPCL_PANDAEXPRESS TypedObject {
|
class EXPCL_DTOOLCONFIG TypedObject {
|
||||||
public:
|
public:
|
||||||
INLINE TypedObject();
|
INLINE TypedObject();
|
||||||
INLINE TypedObject(const TypedObject ©);
|
INLINE TypedObject(const TypedObject ©);
|
@ -22,10 +22,7 @@
|
|||||||
#include "dtoolbase.h"
|
#include "dtoolbase.h"
|
||||||
|
|
||||||
#include "notifySeverity.h"
|
#include "notifySeverity.h"
|
||||||
|
#include "pmap.h"
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include <map>
|
|
||||||
|
|
||||||
class NotifyCategory;
|
class NotifyCategory;
|
||||||
|
|
||||||
@ -96,7 +93,7 @@ private:
|
|||||||
bool _assert_failed;
|
bool _assert_failed;
|
||||||
string _assert_error_message;
|
string _assert_error_message;
|
||||||
|
|
||||||
typedef map<string, NotifyCategory *> Categories;
|
typedef pmap<string, NotifyCategory *> Categories;
|
||||||
Categories _categories;
|
Categories _categories;
|
||||||
|
|
||||||
static Notify *_global_ptr;
|
static Notify *_global_ptr;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define LOCAL_LIBS dtoolutil dtoolbase prc dconfig interrogatedb
|
#define LOCAL_LIBS pystub dtoolutil dtoolbase prc dconfig interrogatedb
|
||||||
|
|
||||||
#begin bin_target
|
#begin bin_target
|
||||||
#define BUILD_TARGET $[HAVE_SSL]
|
#define BUILD_TARGET $[HAVE_SSL]
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
encryptStreamBuf.h encryptStreamBuf.I encryptStream.h encryptStream.I \
|
encryptStreamBuf.h encryptStreamBuf.I encryptStream.h encryptStream.I \
|
||||||
error_utils.h \
|
error_utils.h \
|
||||||
hashGeneratorBase.I hashGeneratorBase.h \
|
hashGeneratorBase.I hashGeneratorBase.h \
|
||||||
hashVal.I hashVal.h indent.I indent.h \
|
hashVal.I hashVal.h \
|
||||||
indirectLess.I indirectLess.h \
|
indirectLess.I indirectLess.h \
|
||||||
littleEndian.h \
|
littleEndian.h \
|
||||||
memoryInfo.I memoryInfo.h \
|
memoryInfo.I memoryInfo.h \
|
||||||
@ -50,7 +50,6 @@
|
|||||||
pta_uchar.h \
|
pta_uchar.h \
|
||||||
ramfile.I ramfile.h \
|
ramfile.I ramfile.h \
|
||||||
referenceCount.I referenceCount.h \
|
referenceCount.I referenceCount.h \
|
||||||
register_type.I register_type.h \
|
|
||||||
reversedNumericData.I reversedNumericData.h \
|
reversedNumericData.I reversedNumericData.h \
|
||||||
selectThreadImpl.h \
|
selectThreadImpl.h \
|
||||||
streamReader.I streamReader.h streamWriter.I streamWriter.h \
|
streamReader.I streamReader.h streamWriter.I streamWriter.h \
|
||||||
@ -60,11 +59,8 @@
|
|||||||
threadDummyImpl.h threadDummyImpl.I thread.h thread.I threadImpl.h \
|
threadDummyImpl.h threadDummyImpl.I thread.h thread.I threadImpl.h \
|
||||||
threadNsprImpl.h threadNsprImpl.I threadPriority.h \
|
threadNsprImpl.h threadNsprImpl.I threadPriority.h \
|
||||||
tokenBoard.I \
|
tokenBoard.I \
|
||||||
tokenBoard.h trueClock.I trueClock.h typeHandle.I \
|
tokenBoard.h trueClock.I trueClock.h \
|
||||||
typeHandle.h typedObject.I typedObject.h \
|
|
||||||
typedReferenceCount.I typedReferenceCount.h typedef.h \
|
typedReferenceCount.I typedReferenceCount.h typedef.h \
|
||||||
typeRegistry.I typeRegistry.h \
|
|
||||||
typeRegistryNode.I typeRegistryNode.h \
|
|
||||||
unicodeLatinMap.h \
|
unicodeLatinMap.h \
|
||||||
vector_uchar.h \
|
vector_uchar.h \
|
||||||
virtualFileComposite.h virtualFileComposite.I virtualFile.h \
|
virtualFileComposite.h virtualFileComposite.I virtualFile.h \
|
||||||
@ -89,7 +85,7 @@
|
|||||||
datagramSink.cxx dcast.cxx \
|
datagramSink.cxx dcast.cxx \
|
||||||
encryptStreamBuf.cxx encryptStream.cxx \
|
encryptStreamBuf.cxx encryptStream.cxx \
|
||||||
error_utils.cxx \
|
error_utils.cxx \
|
||||||
hashGeneratorBase.cxx hashVal.cxx indent.cxx \
|
hashGeneratorBase.cxx hashVal.cxx \
|
||||||
memoryInfo.cxx memoryUsage.cxx memoryUsagePointerCounts.cxx \
|
memoryInfo.cxx memoryUsage.cxx memoryUsagePointerCounts.cxx \
|
||||||
memoryUsagePointers.cxx multifile.cxx \
|
memoryUsagePointers.cxx multifile.cxx \
|
||||||
pmutex.cxx mutexHolder.cxx mutexDummyImpl.cxx mutexNsprImpl.cxx \
|
pmutex.cxx mutexHolder.cxx mutexDummyImpl.cxx mutexNsprImpl.cxx \
|
||||||
@ -105,16 +101,15 @@
|
|||||||
profileTimer.cxx \
|
profileTimer.cxx \
|
||||||
pta_uchar.cxx \
|
pta_uchar.cxx \
|
||||||
ramfile.cxx \
|
ramfile.cxx \
|
||||||
referenceCount.cxx register_type.cxx \
|
referenceCount.cxx \
|
||||||
reversedNumericData.cxx \
|
reversedNumericData.cxx \
|
||||||
streamReader.cxx streamWriter.cxx \
|
streamReader.cxx streamWriter.cxx \
|
||||||
stringDecoder.cxx \
|
stringDecoder.cxx \
|
||||||
subStream.cxx subStreamBuf.cxx \
|
subStream.cxx subStreamBuf.cxx \
|
||||||
textEncoder.cxx \
|
textEncoder.cxx \
|
||||||
thread.cxx threadDummyImpl.cxx threadNsprImpl.cxx \
|
thread.cxx threadDummyImpl.cxx threadNsprImpl.cxx \
|
||||||
trueClock.cxx typeHandle.cxx \
|
trueClock.cxx \
|
||||||
typedObject.cxx typedReferenceCount.cxx \
|
typedReferenceCount.cxx \
|
||||||
typeRegistry.cxx typeRegistryNode.cxx \
|
|
||||||
unicodeLatinMap.cxx \
|
unicodeLatinMap.cxx \
|
||||||
vector_uchar.cxx \
|
vector_uchar.cxx \
|
||||||
virtualFileComposite.cxx virtualFile.cxx virtualFileList.cxx \
|
virtualFileComposite.cxx virtualFile.cxx virtualFileList.cxx \
|
||||||
@ -146,7 +141,6 @@
|
|||||||
error_utils.h \
|
error_utils.h \
|
||||||
hashGeneratorBase.I \
|
hashGeneratorBase.I \
|
||||||
hashGeneratorBase.h hashVal.I hashVal.h \
|
hashGeneratorBase.h hashVal.I hashVal.h \
|
||||||
indent.I indent.h \
|
|
||||||
indirectLess.I indirectLess.h \
|
indirectLess.I indirectLess.h \
|
||||||
littleEndian.h memoryInfo.I memoryInfo.h memoryUsage.I \
|
littleEndian.h memoryInfo.I memoryInfo.h memoryUsage.I \
|
||||||
memoryUsage.h memoryUsagePointerCounts.I \
|
memoryUsage.h memoryUsagePointerCounts.I \
|
||||||
@ -167,7 +161,6 @@
|
|||||||
profileTimer.h pta_uchar.h \
|
profileTimer.h pta_uchar.h \
|
||||||
ramfile.I ramfile.h \
|
ramfile.I ramfile.h \
|
||||||
referenceCount.I referenceCount.h \
|
referenceCount.I referenceCount.h \
|
||||||
register_type.I register_type.h \
|
|
||||||
reversedNumericData.I reversedNumericData.h \
|
reversedNumericData.I reversedNumericData.h \
|
||||||
selectThreadImpl.h \
|
selectThreadImpl.h \
|
||||||
streamReader.I streamReader.h streamWriter.I streamWriter.h \
|
streamReader.I streamReader.h streamWriter.I streamWriter.h \
|
||||||
@ -177,11 +170,9 @@
|
|||||||
threadDummyImpl.h threadDummyImpl.I thread.h thread.I threadImpl.h \
|
threadDummyImpl.h threadDummyImpl.I thread.h thread.I threadImpl.h \
|
||||||
threadNsprImpl.h threadNsprImpl.I threadPriority.h \
|
threadNsprImpl.h threadNsprImpl.I threadPriority.h \
|
||||||
tokenBoard.I \
|
tokenBoard.I \
|
||||||
tokenBoard.h trueClock.I trueClock.h typeHandle.I typeHandle.h \
|
tokenBoard.h trueClock.I trueClock.h \
|
||||||
typedObject.I typedObject.h typedReferenceCount.I \
|
typedReferenceCount.I \
|
||||||
typedReferenceCount.h typedef.h \
|
typedReferenceCount.h typedef.h \
|
||||||
typeRegistry.I typeRegistry.h \
|
|
||||||
typeRegistryNode.I typeRegistryNode.h \
|
|
||||||
unicodeLatinMap.h \
|
unicodeLatinMap.h \
|
||||||
vector_uchar.h \
|
vector_uchar.h \
|
||||||
virtualFileComposite.h virtualFileComposite.I virtualFile.h \
|
virtualFileComposite.h virtualFileComposite.I virtualFile.h \
|
||||||
|
@ -6,6 +6,9 @@ forcetype GlobPattern
|
|||||||
forcetype Notify
|
forcetype Notify
|
||||||
forcetype NotifyCategory
|
forcetype NotifyCategory
|
||||||
forcetype NotifySeverity
|
forcetype NotifySeverity
|
||||||
|
forcetype TypedObject
|
||||||
|
forcetype TypeHandle
|
||||||
|
forcetype TypeRegistry
|
||||||
|
|
||||||
forcetype ConfigExpress
|
forcetype ConfigExpress
|
||||||
renametype ConfigExpress ConfigExpress
|
renametype ConfigExpress ConfigExpress
|
||||||
|
@ -248,21 +248,6 @@ get_paranoid_clock() {
|
|||||||
return *paranoid_clock;
|
return *paranoid_clock;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
get_paranoid_inheritance() {
|
|
||||||
static ConfigVariableBool *paranoid_inheritance = NULL;
|
|
||||||
|
|
||||||
if (paranoid_inheritance == (ConfigVariableBool *)NULL) {
|
|
||||||
paranoid_inheritance = new ConfigVariableBool
|
|
||||||
("paranoid-inheritance", true,
|
|
||||||
PRC_DESC("Set this to true to double-check the test for inheritance of "
|
|
||||||
"TypeHandles, e.g. via is_of_type(). This has no effect if NDEBUG "
|
|
||||||
"is defined."));
|
|
||||||
}
|
|
||||||
|
|
||||||
return *paranoid_inheritance;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
get_verify_dcast() {
|
get_verify_dcast() {
|
||||||
static ConfigVariableBool *verify_dcast = NULL;
|
static ConfigVariableBool *verify_dcast = NULL;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "typeHandle.h"
|
#include "typeHandle.h"
|
||||||
#include "typedObject.h"
|
#include "typedObject.h"
|
||||||
|
#include "config_express.h"
|
||||||
|
|
||||||
// The DCAST (downcast) macro is defined as a convenience for
|
// The DCAST (downcast) macro is defined as a convenience for
|
||||||
// downcasting from some TypedObject pointer (or a PointerTo). It's
|
// downcasting from some TypedObject pointer (or a PointerTo). It's
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include "encryptStream.cxx"
|
#include "encryptStream.cxx"
|
||||||
#include "hashGeneratorBase.cxx"
|
#include "hashGeneratorBase.cxx"
|
||||||
#include "hashVal.cxx"
|
#include "hashVal.cxx"
|
||||||
#include "indent.cxx"
|
|
||||||
#include "memoryInfo.cxx"
|
#include "memoryInfo.cxx"
|
||||||
#include "memoryUsage.cxx"
|
#include "memoryUsage.cxx"
|
||||||
#include "memoryUsagePointerCounts.cxx"
|
#include "memoryUsagePointerCounts.cxx"
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
#include "pta_uchar.cxx"
|
#include "pta_uchar.cxx"
|
||||||
#include "ramfile.cxx"
|
#include "ramfile.cxx"
|
||||||
#include "referenceCount.cxx"
|
#include "referenceCount.cxx"
|
||||||
#include "register_type.cxx"
|
|
||||||
#include "reversedNumericData.cxx"
|
#include "reversedNumericData.cxx"
|
||||||
#include "streamReader.cxx"
|
#include "streamReader.cxx"
|
||||||
#include "streamWriter.cxx"
|
#include "streamWriter.cxx"
|
||||||
@ -21,11 +20,7 @@
|
|||||||
#include "threadDummyImpl.cxx"
|
#include "threadDummyImpl.cxx"
|
||||||
#include "threadNsprImpl.cxx"
|
#include "threadNsprImpl.cxx"
|
||||||
#include "trueClock.cxx"
|
#include "trueClock.cxx"
|
||||||
#include "typeHandle.cxx"
|
|
||||||
#include "typedObject.cxx"
|
|
||||||
#include "typedReferenceCount.cxx"
|
#include "typedReferenceCount.cxx"
|
||||||
#include "typeRegistry.cxx"
|
|
||||||
#include "typeRegistryNode.cxx"
|
|
||||||
#include "unicodeLatinMap.cxx"
|
#include "unicodeLatinMap.cxx"
|
||||||
#include "vector_uchar.cxx"
|
#include "vector_uchar.cxx"
|
||||||
#include "virtualFile.cxx"
|
#include "virtualFile.cxx"
|
||||||
|
@ -138,7 +138,7 @@ private:
|
|||||||
// Actually, it turns out that it doesn't matter, since somehow the
|
// Actually, it turns out that it doesn't matter, since somehow the
|
||||||
// pallocator gets used even though we specify dallocator here, so
|
// pallocator gets used even though we specify dallocator here, so
|
||||||
// we have to make special code that handles the recursion anyway.
|
// we have to make special code that handles the recursion anyway.
|
||||||
typedef map<void *, MemoryInfo, less<void *>, dallocator<MemoryInfo> > Table;
|
typedef map<void *, MemoryInfo, less<void *>, dallocator<pair<void * const, MemoryInfo> > > Table;
|
||||||
Table _table;
|
Table _table;
|
||||||
int _freeze_index;
|
int _freeze_index;
|
||||||
int _count;
|
int _count;
|
||||||
@ -156,7 +156,7 @@ private:
|
|||||||
private:
|
private:
|
||||||
// Cannot use a pmap, since that would be recursive!
|
// Cannot use a pmap, since that would be recursive!
|
||||||
typedef map<TypeHandle, MemoryUsagePointerCounts,
|
typedef map<TypeHandle, MemoryUsagePointerCounts,
|
||||||
less<TypeHandle>, dallocator<MemoryUsagePointerCounts> > Counts;
|
less<TypeHandle>, dallocator<pair<const TypeHandle, MemoryUsagePointerCounts> > > Counts;
|
||||||
Counts _counts;
|
Counts _counts;
|
||||||
};
|
};
|
||||||
TypeHistogram _trend_types;
|
TypeHistogram _trend_types;
|
||||||
|
@ -4200,6 +4200,7 @@ finish_modify_state() {
|
|||||||
TexGenAttrib::Mode mode = _current_tex_gen->get_mode(stage);
|
TexGenAttrib::Mode mode = _current_tex_gen->get_mode(stage);
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case TexGenAttrib::M_off:
|
case TexGenAttrib::M_off:
|
||||||
|
case TexGenAttrib::M_light_vector:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TexGenAttrib::M_eye_sphere_map:
|
case TexGenAttrib::M_eye_sphere_map:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user