open_toontown_panda3d/dtool/src/interrogate
Sam Edwards 818fdbd232 interrogate: Tidy up hash_string function
The main motivation behind this change is to get rid of a
signed integer overflow that sometimes happens in the prime
multiplication step, which is (per the C++ spec) undefined
behavior. However, it's probably for the best to use only
unsigned int when the function is clearly trying to avoid
negative values.

Not that I suspect it matters much, but I have also heavily
tested that the behavior of the function is unchanged (at
least on PC hardware - signed integer overflow doesn't
behave portably) although it may now be slightly faster due
to the fact that I have removed the floating-point math.
2018-12-30 04:21:34 -07:00
..
README.md Add README.md files for various directories 2017-10-31 19:20:24 +01:00
functionRemap.cxx Adopt new WindowProperties(size=(x, y), ...) short-hand 2018-11-12 17:53:53 +01:00
functionRemap.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
functionWriter.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
functionWriter.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
functionWriterPtrFromPython.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
functionWriterPtrFromPython.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
functionWriterPtrToPython.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
functionWriterPtrToPython.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
functionWriters.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
functionWriters.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
interfaceMaker.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
interfaceMaker.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
interfaceMakerC.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
interfaceMakerC.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
interfaceMakerPython.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
interfaceMakerPython.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
interfaceMakerPythonNative.cxx interrogate: refactor default argument handling 2018-12-26 22:47:14 +01:00
interfaceMakerPythonNative.h general: Distinguish local/system includes 2018-11-10 18:00:10 -07:00
interfaceMakerPythonObj.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
interfaceMakerPythonObj.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
interfaceMakerPythonSimple.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
interfaceMakerPythonSimple.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
interrogate.cxx interrogate: don't add space at end of command-line comment 2018-12-23 15:44:59 +01:00
interrogate.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
interrogateBuilder.cxx interrogate: Tidy up hash_string function 2018-12-30 04:21:34 -07:00
interrogateBuilder.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
interrogate_composite1.cxx *** empty log message *** 2005-05-23 21:04:31 +00:00
interrogate_composite2.cxx Wrap TypeHandle and ButtonHandle as ints in C wrappers 2015-09-10 15:29:31 +02:00
interrogate_module.cxx Remove pystub dependency from interrogate and friends 2018-11-06 21:49:17 +01:00
parameterRemap.I general: Replace NULL (and 0 as pointer) with C++11 nullptr 2018-06-03 16:35:13 -06:00
parameterRemap.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
parameterRemap.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
parameterRemapBasicStringPtrToString.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
parameterRemapBasicStringPtrToString.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
parameterRemapBasicStringRefToString.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
parameterRemapBasicStringRefToString.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
parameterRemapBasicStringToString.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
parameterRemapBasicStringToString.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
parameterRemapCharStarToString.cxx New file headers, new comment style 2016-02-17 17:47:48 +01:00
parameterRemapCharStarToString.h New file headers, new comment style 2016-02-17 17:47:48 +01:00
parameterRemapConcreteToPointer.cxx interrogate: do not use MOVE in generated code, but use std::move 2018-09-09 13:48:50 +02:00
parameterRemapConcreteToPointer.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
parameterRemapConstToNonConst.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
parameterRemapConstToNonConst.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
parameterRemapEnumToInt.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
parameterRemapEnumToInt.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
parameterRemapHandleToInt.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
parameterRemapHandleToInt.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
parameterRemapPTToPointer.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
parameterRemapPTToPointer.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
parameterRemapReferenceToConcrete.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
parameterRemapReferenceToConcrete.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
parameterRemapReferenceToPointer.cxx interrogate: do not use MOVE in generated code, but use std::move 2018-09-09 13:48:50 +02:00
parameterRemapReferenceToPointer.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
parameterRemapThis.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
parameterRemapThis.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
parameterRemapToString.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
parameterRemapToString.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
parameterRemapUnchanged.cxx New file headers, new comment style 2016-02-17 17:47:48 +01:00
parameterRemapUnchanged.h New file headers, new comment style 2016-02-17 17:47:48 +01:00
parse_file.cxx Remove pystub dependency from interrogate and friends 2018-11-06 21:49:17 +01:00
typeManager.cxx interrogate: do not wrap methods with rvalue arguments 2018-06-30 21:38:45 +02:00
typeManager.h interrogate: do not wrap methods with rvalue arguments 2018-06-30 21:38:45 +02:00

README.md

A key advantage of Panda3D is that it provides developers with the ability to use both C++ and Python simultaneously. Essentially, Panda3D gives programmers the best of both worlds, as they are able to take advantage of the high performance and low-level programming found in C++ in addition to the flexibility, interactive scripting, and rapid-prototyping capabilities of Python. This feature is made possible due to Pythons ability to call C libraries, and ultimately make use of Panda3Ds Interrogate System: an automated C++ Extension Module generation utility similar to SWIG. Although Python is the favored scripting language of Panda3D, the engine is highly extensible in this aspect, as any language that has a foreign function interface can make use of the Interrogate System.

The Interrogate System works like a compiler by scanning and parsing C++ code for the Panda3D-specific, “PUBLISHED” keyword. This keyword marks the particular methods of a class that are to be exposed within a C++ Extension Module for that class which is eventually generated. One benefit of using the “PUBLISHED” keyword is that it alleviates the need for an interface file that provides function prototypes for the class methods that will be exposed within the extension module, as is the case with SWIG. Interrogate turns a class into a loose collection of Python interface wrapper functions that make up the C++ Extension Module.

This package depends on the 'cppparser' package, which contains the code that parses the C++ headers, and the 'interrogatedb' package, which contains the intermediate representation of the interfaces that can be saved to a database file for FFI generation tools to consume.