Changeset 10917 for OpenSceneGraph/trunk/include/osgIntrospection/Value
- Timestamp:
- 01/05/10 21:03:02 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgIntrospection/Value
r9630 r10917 225 225 virtual const Type* ptype() const { return 0; } 226 226 // returns whether the data is a null pointer 227 virtual bool nullptr() const = 0;227 virtual bool isNullPointer() const = 0; 228 228 229 229 Instance_base *inst_; … … 236 236 struct Instance_box: Instance_box_base 237 237 { 238 Instance_box(): Instance_box_base(), nullptr_(false) {}239 240 Instance_box(const T &d, bool nullptr = false)238 Instance_box(): Instance_box_base(), _isNullPointer(false) {} 239 240 Instance_box(const T &d, bool isNullPointer = false) 241 241 : Instance_box_base(), 242 nullptr_(nullptr)242 _isNullPointer(isNullPointer) 243 243 { 244 244 Instance<T> *vl = new Instance<T>(d); … … 259 259 new_inbox->_ref_inst = new Instance<T &>(vl->_data); 260 260 new_inbox->_const_ref_inst = new Instance<const T &>(vl->_data); 261 new_inbox-> nullptr_ = nullptr_;261 new_inbox->_isNullPointer = _isNullPointer; 262 262 return new_inbox; 263 263 } … … 268 268 } 269 269 270 virtual bool nullptr() const271 { 272 return nullptr_;270 virtual bool isNullPointer() const 271 { 272 return _isNullPointer; 273 273 } 274 274 275 275 private: 276 bool nullptr_;276 bool _isNullPointer; 277 277 278 278 Instance_box& operator = (const Instance_box&) { return *this; } … … 323 323 } 324 324 325 virtual bool nullptr() const325 virtual bool isNullPointer() const 326 326 { 327 327 return static_cast<Instance<T> *>(inst_)->_data == 0; … … 429 429 inline bool Value::isNullPointer() const 430 430 { 431 return _inbox-> nullptr();431 return _inbox->isNullPointer(); 432 432 } 433 433
