summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.h
diff options
context:
space:
mode:
authorChristian Goetze (CG) <cg@lindenlab.com>2010-08-02 22:05:56 -0700
committerChristian Goetze (CG) <cg@lindenlab.com>2010-08-02 22:05:56 -0700
commitd10b9a7f37bec670342136eeea2c8c2604fdfeef (patch)
treea6380a0442d103faed76f1a1c7e5eb03d0f3f6ae /indra/newview/llinventoryfunctions.h
parenta39b31abf87d93fb41212e952cc3ad1d8c91b5ef (diff)
parentb3b8ef25e192f5713c9d5ca47289499b17ff07d1 (diff)
Pulled from "dessie/viewer-release"
Diffstat (limited to 'indra/newview/llinventoryfunctions.h')
-rw-r--r--indra/newview/llinventoryfunctions.h36
1 files changed, 33 insertions, 3 deletions
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 1c3f82c531..4a7721098d 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -174,6 +174,25 @@ protected:
LLAssetType::EType mType;
};
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLIsOfAssetType
+//
+// Implementation of a LLInventoryCollectFunctor which returns TRUE if
+// the item or category is of asset type passed in during construction.
+// Link types are treated as links, not as the types they point to.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+class LLIsOfAssetType : public LLInventoryCollectFunctor
+{
+public:
+ LLIsOfAssetType(LLAssetType::EType type) : mType(type) {}
+ virtual ~LLIsOfAssetType() {}
+ virtual bool operator()(LLInventoryCategory* cat,
+ LLInventoryItem* item);
+protected:
+ LLAssetType::EType mType;
+};
+
class LLIsTypeWithPermissions : public LLInventoryCollectFunctor
{
public:
@@ -271,9 +290,7 @@ public:
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLFindNonLinksByMask
-//
-//
+// Class LLFindByMask
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLFindByMask : public LLInventoryCollectFunctor
{
@@ -382,6 +399,19 @@ public:
}
};
+/* Filters out items of a particular asset type */
+class LLIsTypeActual : public LLIsType
+{
+public:
+ LLIsTypeActual(LLAssetType::EType type) : LLIsType(type) {}
+ virtual ~LLIsTypeActual() {}
+ virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+ {
+ if (item && item->getIsLinkType()) return false;
+ return LLIsType::operator()(cat, item);
+ }
+};
+
// Collect non-removable folders and items.
class LLFindNonRemovableObjects : public LLInventoryCollectFunctor
{