From d881aa56e70c2fc26ee1a60f7cb15353fae9d7ac Mon Sep 17 00:00:00 2001
From: Amorilia <amorilia@users.sourceforge.net>
Date: Sun, 4 Jun 2006 16:00:44 +0000
Subject: [PATCH] Preparing GetRefs()...

---
 niflib.cpp       | 10 +++++-----
 obj/NiObject.cpp |  4 ++--
 obj/NiObject.h   |  6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/niflib.cpp b/niflib.cpp
index 94cfe653..d9c44721 100644
--- a/niflib.cpp
+++ b/niflib.cpp
@@ -490,7 +490,7 @@ void EnumerateObjects( NiObjectRef const & root, map<Type,uint> & type_map, map<
 	
 	//Call this function on all links of this object
 	
-	list<NiObjectRef> links = root->GetLinks();
+	list<NiObjectRef> links = root->GetRefs();
 	for ( list<NiObjectRef>::iterator it = links.begin(); it != links.end(); ++it ) {
 		EnumerateObjects( *it, type_map, link_map );
 	}
@@ -529,7 +529,7 @@ NiObjectRef GetObjectByType( const NiObjectRef & root, const Type & type ) {
 		return root;
 	}
 
-	list<NiObjectRef> links = root->GetLinks();
+	list<NiObjectRef> links = root->GetRefs();
 	for (list <NiObjectRef>::iterator it = links.begin(); it != links.end(); ++it) {
 		// Can no longer guarantee that some objects won't be visited twice.  Oh well.
 		NiObjectRef result = GetObjectByType( *it, type );
@@ -548,7 +548,7 @@ list<NiObjectRef> GetAllObjectsByType( NiObjectRef const & root, const Type & ty
 	if ( root->IsSameType(type) ) {
 		result.push_back( root );
 	}
-	list<NiObjectRef> links = root->GetLinks();
+	list<NiObjectRef> links = root->GetRefs();
 	for (list<NiObjectRef>::iterator it = links.begin(); it != links.end(); ++it ) {
 		// Can no longer guarantee that some objects won't be visited twice.  Oh well.
 		list<NiObjectRef> childresult = GetAllObjectsByType( *it, type );
@@ -561,7 +561,7 @@ list<NiObjectRef> GetAllObjectsByType( NiObjectRef const & root, const Type & ty
 //list<NiObjectRef> GetNifTree( NiObjectRef const & root_block ) {
 //	list<NiObjectRef> result;
 //	result.push_back( root_block );
-//	list<NiObjectRef> links = root_block->GetLinks();
+//	list<NiObjectRef> links = root_block->GetRefs();
 //	for (list<NiObjectRef>::iterator it = links.begin(); it != links.end(); ++it ) {
 //		if ( it->is_null() == false && (*it)->GetParent() == root_block ) {
 //			list<NiObjectRef> childresult = GetNifTree( *it );
@@ -738,7 +738,7 @@ void ReassignTreeCrossRefs( map<string,NiAVObjectRef> & name_map, NiAVObjectRef
 	////Reassign any cross references on this block
 	//((ABlock*)par.get_block())->ReassignCrossRefs( name_map );
 
-	//list<NiObjectRef> links = par->GetLinks();
+	//list<NiObjectRef> links = par->GetRefs();
 	//for (list <NiObjectRef>::iterator it = links.begin(); it != links.end(); ++it) {
 	//	// if the link is not null, and if the child's first parent is root_block
 	//	// (this makes sure we only check every child once, even if it is shared by multiple parents),
diff --git a/obj/NiObject.cpp b/obj/NiObject.cpp
index 781a52e5..f8a47f98 100644
--- a/obj/NiObject.cpp
+++ b/obj/NiObject.cpp
@@ -54,7 +54,7 @@ string NiObject::asString( bool verbose ) const {
 	return string();
 }
 
-list<NiObjectRef> NiObject::GetLinks() {
+list<NiObjectRef> NiObject::GetRefs() {
 	return list<NiObjectRef>();
 }
 
@@ -63,4 +63,4 @@ string NiObject::GetIDString() {
 	stringstream out;
 	out << this << "(" << this->GetType().GetTypeName() << ")";
 	return out.str();
-}
\ No newline at end of file
+}
diff --git a/obj/NiObject.h b/obj/NiObject.h
index 68219daf..03e5b11d 100644
--- a/obj/NiObject.h
+++ b/obj/NiObject.h
@@ -113,16 +113,16 @@ public:
 	 * <b>Example:</b> 
 	 * \code
 	 * blk_ref my_block = ReadNifTree("test_in.nif");
-	 * list<blk_ref> attr_list = my_block->GetLinks();
+	 * list<blk_ref> attr_list = my_block->GetRefs();
 	 * \endcode
 	 * 
 	 * <b>In Python:</b>
 	 * \code
 	 * my_block = ReadNifTree("test_in.nif")
-	 * attr_list = my_block.GetLinks()
+	 * attr_list = my_block.GetRefs()
 	 * \endcode
 	 */
-	virtual list<NiObjectRef> GetLinks();
+	virtual list<NiObjectRef> GetRefs();
 	
 	// Python Operator Overloads
 	string __str__() const {
-- 
GitLab