From 213ae6b0290f3bfe56a1006c51e5d205d5f9801e Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 1 Jun 2018 20:44:30 +0200 Subject: [PATCH] Change some .T files to new docstring style that were missed --- panda/src/express/dcast.T | 79 +++++++-------- panda/src/express/ordered_vector.T | 151 ++++++++++++----------------- pandatool/src/maya/maya_funcs.T | 46 ++++----- 3 files changed, 115 insertions(+), 161 deletions(-) diff --git a/panda/src/express/dcast.T b/panda/src/express/dcast.T index 251f278dce..b457984ec4 100644 --- a/panda/src/express/dcast.T +++ b/panda/src/express/dcast.T @@ -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 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 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 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 INLINE WantType * _dcast_ref(WantType *&, TypedObject *ptr) { diff --git a/panda/src/express/ordered_vector.T b/panda/src/express/ordered_vector.T index 7ea866e52f..e43226a9ee 100644 --- a/panda/src/express/ordered_vector.T +++ b/panda/src/express/ordered_vector.T @@ -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 TYPENAME ordered_vector::ITERATOR ordered_vector:: insert_unique(TYPENAME ordered_vector::ITERATOR position, @@ -62,18 +56,16 @@ insert_unique(TYPENAME ordered_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 TYPENAME ordered_vector::ITERATOR ordered_vector:: insert_nonunique(TYPENAME ordered_vector::ITERATOR position, @@ -100,13 +92,10 @@ insert_nonunique(TYPENAME ordered_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 bool ordered_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 bool ordered_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 TYPENAME ordered_vector::ITERATOR ordered_vector:: r_find_insert_position(TYPENAME ordered_vector::ITERATOR first, @@ -184,11 +167,9 @@ r_find_insert_position(TYPENAME ordered_vector::ITERATOR f } } -//////////////////////////////////////////////////////////////////// -// Function: ordered_vector::r_find -// Access: Private -// Description: The recursive implementation of find(). -//////////////////////////////////////////////////////////////////// +/** + * The recursive implementation of find(). + */ template TYPENAME ordered_vector::CONST_ITERATOR ordered_vector:: r_find(TYPENAME ordered_vector::CONST_ITERATOR first, @@ -217,11 +198,9 @@ r_find(TYPENAME ordered_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 TYPENAME ordered_vector::CONST_ITERATOR ordered_vector:: r_find_particular(TYPENAME ordered_vector::CONST_ITERATOR first, @@ -270,11 +249,9 @@ r_find_particular(TYPENAME ordered_vector::CONST_ITERATOR } } -//////////////////////////////////////////////////////////////////// -// Function: ordered_vector::r_count -// Access: Private -// Description: The recursive implementation of count(). -//////////////////////////////////////////////////////////////////// +/** + * The recursive implementation of count(). + */ template TYPENAME ordered_vector::SIZE_TYPE ordered_vector:: r_count(TYPENAME ordered_vector::CONST_ITERATOR first, @@ -305,11 +282,9 @@ r_count(TYPENAME ordered_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 TYPENAME ordered_vector::CONST_ITERATOR ordered_vector:: r_lower_bound(TYPENAME ordered_vector::CONST_ITERATOR first, @@ -338,11 +313,9 @@ r_lower_bound(TYPENAME ordered_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 TYPENAME ordered_vector::CONST_ITERATOR ordered_vector:: r_upper_bound(TYPENAME ordered_vector::CONST_ITERATOR first, @@ -371,11 +344,9 @@ r_upper_bound(TYPENAME ordered_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 pair::CONST_ITERATOR, TYPENAME ordered_vector::CONST_ITERATOR> ordered_vector:: r_equal_range(TYPENAME ordered_vector::CONST_ITERATOR first, diff --git a/pandatool/src/maya/maya_funcs.T b/pandatool/src/maya/maya_funcs.T index 04ecfab83f..80d8803d3f 100644 --- a/pandatool/src/maya/maya_funcs.T +++ b/pandatool/src/maya/maya_funcs.T @@ -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 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 bool set_maya_attribute(MObject &node, const string &attribute_name,