typeinfo.h (233235) | typeinfo.h (245304) |
---|---|
1/* 2 * Copyright 2010-2011 PathScale, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are met: 6 * 7 * 1. Redistributions of source code must retain the above copyright notice, 8 * this list of conditions and the following disclaimer. --- 56 unchanged lines hidden (view full) --- 65 * These functions are in the public headers for libstdc++, so 66 * we have to assume that someone will probably call them and 67 * expect them to work. Their names must also match the names used in 68 * libsupc++, so that code linking against this library can subclass 69 * type_info and correctly fill in the values in the vtables. 70 */ 71 public: 72 /** | 1/* 2 * Copyright 2010-2011 PathScale, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are met: 6 * 7 * 1. Redistributions of source code must retain the above copyright notice, 8 * this list of conditions and the following disclaimer. --- 56 unchanged lines hidden (view full) --- 65 * These functions are in the public headers for libstdc++, so 66 * we have to assume that someone will probably call them and 67 * expect them to work. Their names must also match the names used in 68 * libsupc++, so that code linking against this library can subclass 69 * type_info and correctly fill in the values in the vtables. 70 */ 71 public: 72 /** |
73 * Returns true if this is some pointer type, false otherwise. 74 */ 75 virtual bool __is_pointer_p() const { return false; } 76 /** 77 * Returns true if this is some function type, false otherwise. 78 */ 79 virtual bool __is_function_p() const { return false; } 80 /** |
|
73 * Catch function. Allows external libraries to implement 74 * their own basic types. This is used, for example, in the 75 * GNUstep Objective-C runtime to allow Objective-C types to be 76 * caught in G++ catch blocks. 77 * 78 * The outer parameter indicates the number of outer pointers 79 * in the high bits. The low bit indicates whether the 80 * pointers are const qualified. --- 9 unchanged lines hidden (view full) --- 90 * the pointer. 91 */ 92 virtual bool __do_upcast( 93 const ABI_NAMESPACE::__class_type_info *target, 94 void **thrown_object) const 95 { 96 return false; 97 } | 81 * Catch function. Allows external libraries to implement 82 * their own basic types. This is used, for example, in the 83 * GNUstep Objective-C runtime to allow Objective-C types to be 84 * caught in G++ catch blocks. 85 * 86 * The outer parameter indicates the number of outer pointers 87 * in the high bits. The low bit indicates whether the 88 * pointers are const qualified. --- 9 unchanged lines hidden (view full) --- 98 * the pointer. 99 */ 100 virtual bool __do_upcast( 101 const ABI_NAMESPACE::__class_type_info *target, 102 void **thrown_object) const 103 { 104 return false; 105 } |
98 /** 99 * Returns true if this is some pointer type, false otherwise. 100 */ 101 virtual bool __is_pointer_p() const { return false; } 102 /** 103 * Returns true if this is some function type, false otherwise. 104 */ 105 virtual bool __is_function_p() const { return false; } | |
106 }; 107} 108 109 110namespace ABI_NAMESPACE 111{ 112 /** 113 * Primitive type info, for intrinsic types. --- 165 unchanged lines hidden (view full) --- 279 __volatile_mask = 0x2, 280 /** Pointer has restrict qualifier. */ 281 __restrict_mask = 0x4, 282 /** Pointer points to an incomplete type. */ 283 __incomplete_mask = 0x8, 284 /** Pointer is a pointer to a member of an incomplete class. */ 285 __incomplete_class_mask = 0x10 286 }; | 106 }; 107} 108 109 110namespace ABI_NAMESPACE 111{ 112 /** 113 * Primitive type info, for intrinsic types. --- 165 unchanged lines hidden (view full) --- 279 __volatile_mask = 0x2, 280 /** Pointer has restrict qualifier. */ 281 __restrict_mask = 0x4, 282 /** Pointer points to an incomplete type. */ 283 __incomplete_mask = 0x8, 284 /** Pointer is a pointer to a member of an incomplete class. */ 285 __incomplete_class_mask = 0x10 286 }; |
287 virtual bool __is_pointer_p() const { return true; } | |
288 virtual bool __do_catch(const type_info *thrown_type, 289 void **thrown_object, 290 unsigned outer) const; 291 }; 292 293 /** 294 * Pointer type info. 295 */ 296 struct __pointer_type_info : public __pbase_type_info 297 { 298 virtual ~__pointer_type_info(); | 287 virtual bool __do_catch(const type_info *thrown_type, 288 void **thrown_object, 289 unsigned outer) const; 290 }; 291 292 /** 293 * Pointer type info. 294 */ 295 struct __pointer_type_info : public __pbase_type_info 296 { 297 virtual ~__pointer_type_info(); |
298 virtual bool __is_pointer_p() const { return true; } |
|
299 }; 300 301 /** 302 * Pointer to member type info. 303 */ 304 struct __pointer_to_member_type_info : public __pbase_type_info 305 { 306 virtual ~__pointer_to_member_type_info(); 307 /** 308 * Pointer to the class containing this member. 309 */ 310 const __class_type_info *__context; 311 }; 312 313} | 299 }; 300 301 /** 302 * Pointer to member type info. 303 */ 304 struct __pointer_to_member_type_info : public __pbase_type_info 305 { 306 virtual ~__pointer_to_member_type_info(); 307 /** 308 * Pointer to the class containing this member. 309 */ 310 const __class_type_info *__context; 311 }; 312 313} |