diff --git a/dtool/src/parser-inc/functional b/dtool/src/parser-inc/functional new file mode 100644 index 0000000000..4d09ed13bf --- /dev/null +++ b/dtool/src/parser-inc/functional @@ -0,0 +1,153 @@ +/** + * PANDA 3D SOFTWARE + * Copyright (c) Carnegie Mellon University. All rights reserved. + * + * All use of this software is subject to the terms of the revised BSD + * license. You should have received a copy of this license along + * with this source code in a file named "LICENSE." + * + * @file functional + * @author tobspr + * @date 2016-11-01 + */ + +// This file, and all the other files in this directory, aren't +// intended to be compiled--they're just parsed by CPPParser (and +// interrogate) in lieu of the actual system headers, to generate the +// interrogate database. + +#ifndef FUNCTIONAL_H +#define FUNCTIONAL_H + +#include + +namespace std { + + // base (deprecated): + template struct unary_function; + template struct binary_function; + + // reference_wrapper: + template class reference_wrapper; + + // arithmetic operations: + template struct plus; + template struct minus; + template struct multiplies; + template struct divides; + template struct modulus; + template struct negate; + + // comparisons: + template struct equal_to; + template struct not_equal_to; + template struct greater; + template struct less; + template struct greater_equal; + template struct less_equal; + + // logical operations: + template struct logical_and; + template struct logical_or; + template struct logical_not; + + // bitwise operations: + template struct bit_and; + template struct bit_or; + template struct bit_xor; + + // negators: + template class unary_negate; + template class binary_negate; + + // bind: + template struct is_bind_expression; + template struct is_placeholder; + + namespace placeholders { + // M is the implementation-defined number of placeholders + // (8 should be enough for interrogate) + extern char _1; + extern char _2; + extern char _3; + extern char _4; + extern char _5; + extern char _6; + extern char _7; + extern char _8; + } + + // binders (deprecated): + template class binder1st; + template class binder2nd; + + // adaptors (deprecated): + template class pointer_to_unary_function; + template + class pointer_to_binary_function; + + // adaptors (deprecated): + template class mem_fun_t; + template class mem_fun1_t; + template class mem_fun_ref_t; + template class mem_fun1_ref_t; + template class const_mem_fun_t; + template class const_mem_fun1_t; + template class const_mem_fun_ref_t; + template class const_mem_fun1_ref_t; + + + // polymorphic function wrappers: + class bad_function_call; + + // hash function base template: + template struct hash; + + // Hash function specializations + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template <> struct hash; + template struct hash; + + template class reference_wrapper { + public : + // types + typedef T type; + typedef void result_type; // not always defined + typedef void argument_type; // not always defined + typedef void first_argument_type; // not always defined + typedef void second_argument_type; // not always defined + }; + + template struct is_bind_expression {}; + // : integral_constant {}; + + class bad_function_call : public std::exception {}; + + // template class function; // undefined + + template< class R, class... ArgTypes > + class function { + public: + typedef R result_type; + }; + +} + + +#endif diff --git a/dtool/src/parser-inc/initializer_list b/dtool/src/parser-inc/initializer_list new file mode 100644 index 0000000000..57a3f7f6c1 --- /dev/null +++ b/dtool/src/parser-inc/initializer_list @@ -0,0 +1,34 @@ +/** + * PANDA 3D SOFTWARE + * Copyright (c) Carnegie Mellon University. All rights reserved. + * + * All use of this software is subject to the terms of the revised BSD + * license. You should have received a copy of this license along + * with this source code in a file named "LICENSE." + * + * @file initializer_list + * @author tobspr + * @date 2016-11-01 + */ + +// This file, and all the other files in this directory, aren't +// intended to be compiled--they're just parsed by CPPParser (and +// interrogate) in lieu of the actual system headers, to generate the +// interrogate database. + +#ifndef INITIALIZER_LIST_H +#define INITIALIZER_LIST_H + +#include + +namespace std { + template class initializer_list { + public: + typedef E value_type; + typedef const E& reference; + typedef const E& const_reference; + typedef size_t size_type; + typedef const E* iterator; + typedef const E* const_iterator; + }; +} diff --git a/dtool/src/parser-inc/memory b/dtool/src/parser-inc/memory index 1f76249963..30a54d006a 100644 --- a/dtool/src/parser-inc/memory +++ b/dtool/src/parser-inc/memory @@ -1,16 +1,15 @@ -// Filename: allocator -// Created by: drose (12May00) -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) Carnegie Mellon University. All rights reserved. -// -// All use of this software is subject to the terms of the revised BSD -// license. You should have received a copy of this license along -// with this source code in a file named "LICENSE." -// -//////////////////////////////////////////////////////////////////// +/** + * PANDA 3D SOFTWARE + * Copyright (c) Carnegie Mellon University. All rights reserved. + * + * All use of this software is subject to the terms of the revised BSD + * license. You should have received a copy of this license along + * with this source code in a file named "LICENSE." + * + * @file memory + * @author tobspr + * @date 2016-11-01 + */ // This file, and all the other files in this directory, aren't // intended to be compiled--they're just parsed by CPPParser (and @@ -21,6 +20,8 @@ #define ALLOCATOR_H #include +#include + #ifdef GCC_STYLE_ALLOCATOR @@ -33,16 +34,155 @@ public: #else // GCC_STYLE_ALLOCATOR namespace std { - template - class allocator { - public: - typedef Type *pointer; - typedef const Type *const_pointer; - typedef size_t size_type; - pointer allocate(size_type n, allocator::const_pointer hint = 0); - void deallocate(pointer p, size_type n); - }; + // pointer traits + template struct pointer_traits; + template struct pointer_traits; + + // pointer safety + enum class pointer_safety { relaxed, preferred, strict }; + + // allocator argument tag + struct allocator_arg_t { }; + constexpr allocator_arg_t allocator_arg = allocator_arg_t(); + + // uses_allocator + template struct uses_allocator; + + // allocator traits + template struct allocator_traits; + + // the default allocator: + template class allocator; + template <> class allocator; + + // raw storage iterator: + template class raw_storage_iterator; + + // class template unique_ptr: + template class default_delete; + template class default_delete; + template > class unique_ptr; + template class unique_ptr; + // class bad_weak_ptr: + class bad_weak_ptr; + + // class template shared_ptr: + template class shared_ptr; + // class template weak_ptr: + template class weak_ptr; + + // class template owner_less: + template class owner_less; + + // class template enable_shared_from_this: + template class enable_shared_from_this; + + // hash support + template struct hash; + template struct hash >; + template struct hash >; + + // auto_ptr (deprecated) + template class auto_ptr; + + template struct pointer_traits { + typedef Ptr pointer; + typedef Ptr element_type; + typedef ptrdiff_t difference_type; + + template using rebind = U; + }; + + template struct pointer_traits { + typedef T* pointer; + typedef T element_type; + typedef ptrdiff_t difference_type; + + template using rebind = U*; + }; + + + template struct allocator_traits { + typedef Alloc allocator_type; + + typedef typename Alloc::value_type value_type; + + typedef void* pointer; + typedef const void* const_pointer; + typedef void* void_pointer; + typedef const void* const_void_pointer; + + typedef std::ptrdiff_t difference_type; + typedef size_t size_type; + + struct propagate_on_container_copy_assignment; + struct propagate_on_container_move_assignment; + struct propagate_on_container_swap; + struct is_always_equal; + + template using rebind_alloc = size_t; + template using rebind_traits = allocator_traits >; + }; + + template class allocator; + // specialize for void: + template <> class allocator { + public: + typedef void* pointer; + typedef const void* const_pointer; + // reference-to-void members are impossible. + typedef void value_type; + template struct rebind { typedef allocator other; }; + }; + template class allocator { + public: + struct true_type_; // do not depend on type_traits header + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef T* pointer; + typedef const T* const_pointer; + typedef T& reference; + typedef const T& const_reference; + typedef T value_type; + template struct rebind { typedef allocator other; }; + typedef true_type_ propagate_on_container_move_assignment; + typedef true_type_ is_always_equal; + + }; + + template + class raw_storage_iterator + : public iterator { + public: + }; + + + template struct default_delete {}; + + template struct default_delete {}; + + // unique_ptr for single objects + template > class unique_ptr { + public: + typedef T* pointer; + typedef T element_type; + typedef D deleter_type; + }; + + class bad_weak_ptr: public std::exception {}; + + template class shared_ptr { + public: + typedef T element_type; + }; + + template class weak_ptr { + public: + typedef T element_type; + }; + + template class enable_shared_from_this {}; } #endif // GCC_STYLE_ALLOCATOR diff --git a/dtool/src/parser-inc/unordered_map b/dtool/src/parser-inc/unordered_map new file mode 100644 index 0000000000..e3c6220d35 --- /dev/null +++ b/dtool/src/parser-inc/unordered_map @@ -0,0 +1,84 @@ +/** + * PANDA 3D SOFTWARE + * Copyright (c) Carnegie Mellon University. All rights reserved. + * + * All use of this software is subject to the terms of the revised BSD + * license. You should have received a copy of this license along + * with this source code in a file named "LICENSE." + * + * @file unordered_map + * @author tobspr + * @date 2016-11-01 + */ + +// This file, and all the other files in this directory, aren't +// intended to be compiled--they're just parsed by CPPParser (and +// interrogate) in lieu of the actual system headers, to generate the +// interrogate database. + +#ifndef UNORDERED_MAP_H +#define UNORDERED_MAP_H + +#include +#include +#include +#include +#include + +namespace std { + + template , + class Pred = std::equal_to, + class Allocator = std::allocator > > + class unordered_map + { + public: + // types + typedef Key key_type; + typedef Key value_type; + typedef Hash hasher; + typedef Pred key_equal; + typedef Allocator allocator_type; + typedef typename allocator_type::pointer pointer; + typedef typename allocator_type::const_pointer const_pointer; + typedef typename allocator_type::reference reference; + typedef typename allocator_type::const_reference const_reference; + typedef size_t size_type; + typedef std::ptrdiff_t difference_type; + class iterator; + class const_iterator; + class local_iterator; + class const_local_iterator; + }; + + template , + class Pred = std::equal_to, + class Allocator = std::allocator > > + class unordered_multimap + { + public: + // types + typedef Key key_type; + typedef Key value_type; + typedef Hash hasher; + typedef Pred key_equal; + typedef Allocator allocator_type; + typedef typename allocator_type::pointer pointer; + typedef typename allocator_type::const_pointer const_pointer; + typedef typename allocator_type::reference reference; + typedef typename allocator_type::const_reference const_reference; + typedef size_t size_type; + typedef std::ptrdiff_t difference_type; + class iterator; + class const_iterator; + class local_iterator; + class const_local_iterator; + }; + +} // namespace std + +#endif diff --git a/dtool/src/parser-inc/unordered_set b/dtool/src/parser-inc/unordered_set new file mode 100644 index 0000000000..766161d12b --- /dev/null +++ b/dtool/src/parser-inc/unordered_set @@ -0,0 +1,83 @@ +/** + * PANDA 3D SOFTWARE + * Copyright (c) Carnegie Mellon University. All rights reserved. + * + * All use of this software is subject to the terms of the revised BSD + * license. You should have received a copy of this license along + * with this source code in a file named "LICENSE." + * + * @file unordered_set + * @author tobspr + * @date 2016-11-01 + */ + +// This file, and all the other files in this directory, aren't +// intended to be compiled--they're just parsed by CPPParser (and +// interrogate) in lieu of the actual system headers, to generate the +// interrogate database. + +#ifndef UNORDERED_SET_H +#define UNORDERED_SET_H + +#include +#include +#include +#include +#include + +namespace std { + + template , + class Pred = std::equal_to, + class Allocator = std::allocator > + class unordered_set + { + public: + // types + typedef Key key_type; + typedef Key value_type; + typedef Hash hasher; + typedef Pred key_equal; + typedef Allocator allocator_type; + typedef typename allocator_type::pointer pointer; + typedef typename allocator_type::const_pointer const_pointer; + typedef typename allocator_type::reference reference; + typedef typename allocator_type::const_reference const_reference; + typedef size_t size_type; + typedef std::ptrdiff_t difference_type; + + class iterator; + class const_iterator; + class local_iterator; + class const_local_iterator; + }; + + template , + class Pred = std::equal_to, + class Allocator = std::allocator > + class unordered_multiset + { + public: + // types + typedef Key key_type; + typedef Key value_type; + typedef Hash hasher; + typedef Pred key_equal; + typedef Allocator allocator_type; + typedef typename allocator_type::pointer pointer; + typedef typename allocator_type::const_pointer const_pointer; + typedef typename allocator_type::reference reference; + typedef typename allocator_type::const_reference const_reference; + typedef size_t size_type; + typedef std::ptrdiff_t difference_type; + class iterator; + class const_iterator; + class local_iterator; + class const_local_iterator; + }; + +} // namespace std + +#endif