Change some .T files to new docstring style that were missed

This commit is contained in:
rdb 2018-06-01 20:44:30 +02:00
parent 159b43e563
commit 213ae6b029
3 changed files with 115 additions and 161 deletions

View File

@ -1,24 +1,20 @@
// Filename: dcast.T
// Created by: drose (06Aug01)
//
////////////////////////////////////////////////////////////////////
//
// 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 dcast.T
* @author drose
* @date 2001-08-06
*/
////////////////////////////////////////////////////////////////////
// Function: _dcast_get_typehandle
// Description: Returns the TypeHandle associated with the type of
// the parameter, if it can be determined. This is a
// support function for _dcast, below.
////////////////////////////////////////////////////////////////////
/**
* Returns the TypeHandle associated with the type of the parameter, if it can
* be determined. This is a support function for _dcast, below.
*/
template<class WantType>
INLINE TypeHandle
_dcast_get_typehandle(WantType *) {
@ -38,16 +34,13 @@ _dcast_get_typehandle(WantType *) {
return handle;
}
////////////////////////////////////////////////////////////////////
// Function: _dcast
// Description: The implementation of the DCAST macro, this checks
// the actual type of the pointer before performing a
// downcast operation. In NDEBUG mode, it simply
// downcasts.
//
// This flavor of _dcast works on non-const pointers.
////////////////////////////////////////////////////////////////////
/**
* The implementation of the DCAST macro, this checks the actual type of the
* pointer before performing a downcast operation. In NDEBUG mode, it simply
* downcasts.
*
* This flavor of _dcast works on non-const pointers.
*/
template<class WantType>
INLINE WantType *
_dcast(WantType *, TypedObject *ptr) {
@ -61,15 +54,13 @@ _dcast(WantType *, TypedObject *ptr) {
return (WantType *)ptr;
}
////////////////////////////////////////////////////////////////////
// Function: _dcast
// Description: The implementation of the DCAST macro, this checks
// the actual type of the pointer before performing a
// downcast operation. In NDEBUG mode, it simply
// downcasts.
//
// This flavor of _dcast works on const pointers.
////////////////////////////////////////////////////////////////////
/**
* The implementation of the DCAST macro, this checks the actual type of the
* pointer before performing a downcast operation. In NDEBUG mode, it simply
* downcasts.
*
* This flavor of _dcast works on const pointers.
*/
template<class WantType>
INLINE const WantType *
_dcast(WantType *, const TypedObject *ptr) {
@ -83,12 +74,10 @@ _dcast(WantType *, const TypedObject *ptr) {
return (const WantType *)ptr;
}
////////////////////////////////////////////////////////////////////
// Function: _dcast_ref
// Description: Similar to the above, with a pointer reference as the
// first parameter. Just for fiddly compiler reasons;
// the reference isn't used.
////////////////////////////////////////////////////////////////////
/**
* Similar to the above, with a pointer reference as the first parameter.
* Just for fiddly compiler reasons; the reference isn't used.
*/
template<class WantType>
INLINE WantType *
_dcast_ref(WantType *&, TypedObject *ptr) {

View File

@ -1,32 +1,26 @@
// Filename: ordered_vector.T
// Created by: drose (20Feb02)
//
////////////////////////////////////////////////////////////////////
//
// 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 ordered_vector.T
* @author drose
* @date 2002-02-02
*/
////////////////////////////////////////////////////////////////////
// Function: ordered_vector::insert_unique
// Access: Public
// Description: Inserts the indicated key into the ordered vector.
// The iterator is a hint to the expected position; if
// this is correct, the insert operation is likely to be
// faster. The return value is the iterator referencing
// the new element.
//
// This flavor of insert does not allow multiple copies
// of the same key to be inserted. If the key is
// already present, it is not inserted, and the iterator
// referencing the original value is returned.
////////////////////////////////////////////////////////////////////
/**
* Inserts the indicated key into the ordered vector. The iterator is a hint
* to the expected position; if this is correct, the insert operation is
* likely to be faster. The return value is the iterator referencing the new
* element.
*
* This flavor of insert does not allow multiple copies of the same key to be
* inserted. If the key is already present, it is not inserted, and the
* iterator referencing the original value is returned.
*/
template<class Key, class Compare, class Vector>
TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
insert_unique(TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR position,
@ -62,18 +56,16 @@ insert_unique(TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR position,
return result;
}
////////////////////////////////////////////////////////////////////
// Function: ordered_vector::insert_nonunique
// Access: Public
// Description: Inserts the indicated key into the ordered vector.
// The iterator is a hint to the expected position; if
// this is correct, the insert operation is likely to be
// faster. The return value is the iterator referencing
// the new element.
//
// This flavor of insert allows multiple copies of the
// same key to be inserted.
////////////////////////////////////////////////////////////////////
/**
* Inserts the indicated key into the ordered vector. The iterator is a hint
* to the expected position; if this is correct, the insert operation is
* likely to be faster. The return value is the iterator referencing the new
* element.
*
* This flavor of insert allows multiple copies of the
* same key to be inserted.
*/
template<class Key, class Compare, class Vector>
TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
insert_nonunique(TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR position,
@ -100,13 +92,10 @@ insert_nonunique(TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR positio
return result;
}
////////////////////////////////////////////////////////////////////
// Function: ordered_vector::verify_list_unique
// Access: Public
// Description: Ensures that the indicated range of elements is
// sorted correctly. Returns true if this is the case;
// otherwise, returns false.
////////////////////////////////////////////////////////////////////
/**
* Ensures that the indicated range of elements is sorted correctly. Returns
* true if this is the case; otherwise, returns false.
*/
template<class Key, class Compare, class Vector>
bool ordered_vector<Key, Compare, Vector>::
verify_list_unique() const {
@ -127,13 +116,10 @@ verify_list_unique() const {
return true;
}
////////////////////////////////////////////////////////////////////
// Function: ordered_vector::verify_list_nonunique
// Access: Public
// Description: Ensures that the indicated range of elements is
// sorted correctly. Returns true if this is the case;
// otherwise, returns false.
////////////////////////////////////////////////////////////////////
/**
* Ensures that the indicated range of elements is sorted correctly. Returns
* true if this is the case; otherwise, returns false.
*/
template<class Key, class Compare, class Vector>
bool ordered_vector<Key, Compare, Vector>::
verify_list_nonunique() const {
@ -155,12 +141,9 @@ verify_list_nonunique() const {
}
////////////////////////////////////////////////////////////////////
// Function: ordered_vector::r_find_insert_position
// Access: Private
// Description: The recursive implementation of
// find_insert_position().
////////////////////////////////////////////////////////////////////
/**
* The recursive implementation of find_insert_position().
*/
template<class Key, class Compare, class Vector>
TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
r_find_insert_position(TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR first,
@ -184,11 +167,9 @@ r_find_insert_position(TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR f
}
}
////////////////////////////////////////////////////////////////////
// Function: ordered_vector::r_find
// Access: Private
// Description: The recursive implementation of find().
////////////////////////////////////////////////////////////////////
/**
* The recursive implementation of find().
*/
template<class Key, class Compare, class Vector>
TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
r_find(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,
@ -217,11 +198,9 @@ r_find(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,
}
}
////////////////////////////////////////////////////////////////////
// Function: ordered_vector::r_find_particular
// Access: Private
// Description: The recursive implementation of find_particular().
////////////////////////////////////////////////////////////////////
/**
* The recursive implementation of find_particular().
*/
template<class Key, class Compare, class Vector>
TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
r_find_particular(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,
@ -270,11 +249,9 @@ r_find_particular(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR
}
}
////////////////////////////////////////////////////////////////////
// Function: ordered_vector::r_count
// Access: Private
// Description: The recursive implementation of count().
////////////////////////////////////////////////////////////////////
/**
* The recursive implementation of count().
*/
template<class Key, class Compare, class Vector>
TYPENAME ordered_vector<Key, Compare, Vector>::SIZE_TYPE ordered_vector<Key, Compare, Vector>::
r_count(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,
@ -305,11 +282,9 @@ r_count(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,
}
}
////////////////////////////////////////////////////////////////////
// Function: ordered_vector::r_lower_bound
// Access: Private
// Description: The recursive implementation of lower_bound().
////////////////////////////////////////////////////////////////////
/**
* The recursive implementation of lower_bound().
*/
template<class Key, class Compare, class Vector>
TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
r_lower_bound(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,
@ -338,11 +313,9 @@ r_lower_bound(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR firs
}
}
////////////////////////////////////////////////////////////////////
// Function: ordered_vector::r_upper_bound
// Access: Private
// Description: The recursive implementation of upper_bound().
////////////////////////////////////////////////////////////////////
/**
* The recursive implementation of upper_bound().
*/
template<class Key, class Compare, class Vector>
TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
r_upper_bound(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,
@ -371,11 +344,9 @@ r_upper_bound(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR firs
}
}
////////////////////////////////////////////////////////////////////
// Function: ordered_vector::r_equal_range
// Access: Private
// Description: The recursive implementation of equal_range().
////////////////////////////////////////////////////////////////////
/**
* The recursive implementation of equal_range().
*/
template<class Key, class Compare, class Vector>
pair<TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR, TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR> ordered_vector<Key, Compare, Vector>::
r_equal_range(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,

View File

@ -1,24 +1,20 @@
// Filename: maya_funcs.I
// Created by: drose (16Feb00)
//
////////////////////////////////////////////////////////////////////
//
// 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 maya_funcs.T
* @author drose
* @date 2000-02-16
*/
////////////////////////////////////////////////////////////////////
// Function: get_maya_attribute
// Description: A generic function to extract an attribute of some
// type from an MObject. This is used to implement
// get_bool_attribute(), etc.
////////////////////////////////////////////////////////////////////
/**
* A generic function to extract an attribute of some type from an MObject.
* This is used to implement get_bool_attribute(), etc.
*/
template<class ValueType>
bool
get_maya_attribute(MObject &node, const string &attribute_name,
@ -33,12 +29,10 @@ get_maya_attribute(MObject &node, const string &attribute_name,
return status;
}
////////////////////////////////////////////////////////////////////
// Function: set_maya_attribute
// Description: A generic function to set an attribute of some
// type on an MObject. This is used to implement
// set_bool_attribute(), etc.
////////////////////////////////////////////////////////////////////
/**
* A generic function to set an attribute of some type on an MObject. This is
* used to implement set_bool_attribute(), etc.
*/
template<class ValueType>
bool
set_maya_attribute(MObject &node, const string &attribute_name,