From 3c2be426e5e905076d00b9492c0e66c8b31caf19 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 30 May 2012 18:47:12 -0700 Subject: First pass at refactoring the pathfinding linksets and pathfinding characters classes to reduce code duplication, as both functionalities were heavily duplicated. --- indra/newview/llpathfindingobject.h | 73 +++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 indra/newview/llpathfindingobject.h (limited to 'indra/newview/llpathfindingobject.h') diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h new file mode 100644 index 0000000000..9dc114b40f --- /dev/null +++ b/indra/newview/llpathfindingobject.h @@ -0,0 +1,73 @@ +/** +* @file llpathfindingobject.h +* @brief Header file for llpathfindingobject +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ +#ifndef LL_LLPATHFINDINGOBJECT_H +#define LL_LLPATHFINDINGOBJECT_H + +#include "v3math.h" +#include "llavatarname.h" +#include "lluuid.h" + +#include + +#include + +class LLPathfindingObject; +class LLSD; + +typedef boost::shared_ptr LLPathfindingObjectPtr; + +class LLPathfindingObject +{ +public: + LLPathfindingObject(); + LLPathfindingObject(const std::string &pUUID, const LLSD &pObjectData); + LLPathfindingObject(const LLPathfindingObject& pOther); + virtual ~LLPathfindingObject(); + + LLPathfindingObject& operator =(const LLPathfindingObject& pOther); + + inline const LLUUID& getUUID() const {return mUUID;}; + inline const std::string& getName() const {return mName;}; + inline const std::string& getDescription() const {return mDescription;}; + inline BOOL hasOwnerName() const {return mOwnerUUID.notNull();}; + std::string getOwnerName() const; + inline const LLVector3& getLocation() const {return mLocation;}; + +protected: + +private: + void parseObjectData(const LLSD &pObjectData); + + LLUUID mUUID; + std::string mName; + std::string mDescription; + LLUUID mOwnerUUID; + LLAvatarName mOwnerName; + LLVector3 mLocation; +}; + +#endif // LL_LLPATHFINDINGOBJECT_H -- cgit v1.2.3 From 3352a1eac15f752535b636866eeb966ec3900c62 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 30 May 2012 19:39:08 -0700 Subject: Cleaning up some unreferenced headers and classes definitions from previous refactoring. --- indra/newview/llpathfindingobject.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpathfindingobject.h') diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h index 9dc114b40f..880a3a6864 100644 --- a/indra/newview/llpathfindingobject.h +++ b/indra/newview/llpathfindingobject.h @@ -27,9 +27,9 @@ #ifndef LL_LLPATHFINDINGOBJECT_H #define LL_LLPATHFINDINGOBJECT_H -#include "v3math.h" #include "llavatarname.h" #include "lluuid.h" +#include "v3math.h" #include @@ -60,7 +60,7 @@ public: protected: private: - void parseObjectData(const LLSD &pObjectData); + void parseObjectData(const LLSD &pObjectData); LLUUID mUUID; std::string mName; -- cgit v1.2.3 From ea23285f8b728bf52c8490610c610f4abd2d6957 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 4 Jun 2012 14:36:43 -0700 Subject: Ensuring that the scroll list is rebuilt after any missing avatar names are loaded into cache. --- indra/newview/llpathfindingobject.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpathfindingobject.h') diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h index 880a3a6864..924ea3f298 100644 --- a/indra/newview/llpathfindingobject.h +++ b/indra/newview/llpathfindingobject.h @@ -53,7 +53,8 @@ public: inline const LLUUID& getUUID() const {return mUUID;}; inline const std::string& getName() const {return mName;}; inline const std::string& getDescription() const {return mDescription;}; - inline BOOL hasOwnerName() const {return mOwnerUUID.notNull();}; + inline BOOL hasOwner() const {return mOwnerUUID.notNull();}; + inline bool hasOwnerName() const {return mHasOwnerName;}; std::string getOwnerName() const; inline const LLVector3& getLocation() const {return mLocation;}; @@ -62,10 +63,14 @@ protected: private: void parseObjectData(const LLSD &pObjectData); + void fetchOwnerName(); + void handleAvatarNameFetch(const LLUUID &pOwnerUUID, const LLAvatarName &pAvatarName); + LLUUID mUUID; std::string mName; std::string mDescription; LLUUID mOwnerUUID; + bool mHasOwnerName; LLAvatarName mOwnerName; LLVector3 mLocation; }; -- cgit v1.2.3 From 685a672b74550ca0dbf8a816257c84c9c44fd34d Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 28 Jun 2012 15:37:55 -0700 Subject: Cleaning up new files in preparation for merge into viewer-release. --- indra/newview/llpathfindingobject.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llpathfindingobject.h') diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h index 924ea3f298..4b2d546bb1 100644 --- a/indra/newview/llpathfindingobject.h +++ b/indra/newview/llpathfindingobject.h @@ -27,14 +27,14 @@ #ifndef LL_LLPATHFINDINGOBJECT_H #define LL_LLPATHFINDINGOBJECT_H -#include "llavatarname.h" -#include "lluuid.h" -#include "v3math.h" - #include #include +#include "llavatarname.h" +#include "lluuid.h" +#include "v3math.h" + class LLPathfindingObject; class LLSD; -- cgit v1.2.3 From e7e0e514fdc3b522787e18fddee89b9f9fbbe834 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 23 Jul 2012 17:12:45 -0700 Subject: PATH-781: Pulling in the new 'owner_is_group' field into the pathfinding object. --- indra/newview/llpathfindingobject.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llpathfindingobject.h') diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h index 4b2d546bb1..d45cc554fd 100644 --- a/indra/newview/llpathfindingobject.h +++ b/indra/newview/llpathfindingobject.h @@ -56,6 +56,7 @@ public: inline BOOL hasOwner() const {return mOwnerUUID.notNull();}; inline bool hasOwnerName() const {return mHasOwnerName;}; std::string getOwnerName() const; + inline BOOL isGroupOwned() const {return mIsGroupOwned;}; inline const LLVector3& getLocation() const {return mLocation;}; protected: @@ -72,6 +73,7 @@ private: LLUUID mOwnerUUID; bool mHasOwnerName; LLAvatarName mOwnerName; + BOOL mIsGroupOwned; LLVector3 mLocation; }; -- cgit v1.2.3