llparcelselection.h

Go to the documentation of this file.
00001 
00032 #ifndef LLPARCELSELECTION_H
00033 #define LLPARCELSELECTION_H
00034 
00035 #include "llmemory.h"
00036 
00037 class LLParcel;
00038 
00039 class LLParcelSelection : public LLRefCount
00040 {
00041         friend class LLViewerParcelMgr;
00042 
00043 protected:
00044         ~LLParcelSelection();
00045 
00046 public:
00047         LLParcelSelection(LLParcel* parcel);
00048         LLParcelSelection();
00049 
00050         // this can return NULL at any time, as parcel selection
00051         // might have been invalidated.
00052         LLParcel* getParcel() { return mParcel; }
00053 
00054         // Return the number of grid units that are owned by you within
00055         // the selection (computed by server).
00056         S32 getSelfCount() const { return mSelectedSelfCount; }
00057 
00058         // Returns area that will actually be claimed in meters squared.
00059         S32             getClaimableArea() const;
00060         bool    hasOthersSelected() const;
00061 
00062         // Does the selection have multiple land owners in it?
00063         BOOL    getMultipleOwners() const;
00064 
00065         // Is the entire parcel selected, or just a part?
00066         BOOL    getWholeParcelSelected() const;
00067 
00068         static LLParcelSelection* getNullParcelSelection();
00069 
00070 private:
00071         void setParcel(LLParcel* parcel) { mParcel = parcel; }
00072 
00073 private:
00074         LLParcel*       mParcel;
00075         BOOL            mSelectedMultipleOwners;
00076         BOOL            mWholeParcelSelected;
00077         S32                     mSelectedSelfCount;
00078         S32                     mSelectedOtherCount;
00079         S32                     mSelectedPublicCount;
00080 
00081         static LLPointer<LLParcelSelection> sNullSelection;
00082 };
00083 
00084 typedef LLSafeHandle<LLParcelSelection> LLParcelSelectionHandle;
00085 
00086 #endif

Generated on Fri May 16 08:33:55 2008 for SecondLife by  doxygen 1.5.5