Jive reference manual
List of all members | Public Member Functions | Protected Member Functions
jive::util::ColoredItemGroup Class Reference

#include <jive/util/ColoredItemGroup.h>

Inheritance diagram for jive::util::ColoredItemGroup:
Inheritance graph

Public Member Functions

 ColoredItemGroup ()
 
 ColoredItemGroup (const IdxVector &colors, const Ref< ItemSet > &items)
 
 ColoredItemGroup (const IdxVector &colors, const IdxVector &iitems, const Ref< ItemSet > &items)
 
virtual void readFrom (ObjectInput &in)
 
virtual void writeTo (ObjectOutput &out) const
 
virtual Ref< Objectclone () const
 
virtual idx_t size () const
 Returns the size of this item group. More...
 
virtual IdxVector getIndices () const
 Returns the indices of the items in this group. More...
 
virtual idx_t getIndex (idx_t i) const
 
virtual ItemSetgetItems () const
 Returns the item set containing the items in this group. More...
 
virtual bool contains (idx_t iitem) const
 
virtual void filter (const IdxVector &iitems) const
 
idx_t listCount () const
 
IdxVector getList (idx_t ilist) const
 
idx_t getListOffset (idx_t ilist) const
 
idx_t getListColor (idx_t ilist) const
 
- Public Member Functions inherited from jive::util::ItemGroup
virtual IntVector getIDs () const
 Returns the IDs of the items in this group. More...
 
virtual bool contains (int iitem) const
 Tests whether this group contains a given item index. More...
 
virtual void filter (const IntVector &iitems) const
 Marks which item indices are not in this group. More...
 
int findMembers (const IntVector &jitems, const IntVector &iitems) const
 Finds all item indices that are members of this group. More...
 
int findNonMembers (const IntVector &jitems, const IntVector &iitems) const
 Finds all item indices that are not members of this group. More...
 
void printTo (Printer &out) const
 Prints the contents of this group. More...
 
String getTagName () const
 Returns an XML tag name for this group. More...
 
void store (const String &name, const Properties &globdat) const
 Stores this item group in a (global) data set. More...
 
- Public Member Functions inherited from jem::Object
virtual ClassgetClass () const
 Returns the Class instance representing the runtime class of this object. More...
 
virtual String toString () const
 Returns a short textual description of this object. More...
 
virtual long hashValue () const
 Returns a hash value for this object. More...
 
virtual bool equals (const Ref< Object > &obj) const
 Tests whether two objects are equal. More...
 
Ref< Objectclone () const
 Returns a copy of this object. More...
 

Protected Member Functions

virtual ~ColoredItemGroup ()
 
- Protected Member Functions inherited from jive::util::ItemGroup
virtual ~ItemGroup ()
 
- Protected Member Functions inherited from jem::Collectable
 Collectable ()
 Creates an empty Collectable. More...
 
 ~Collectable ()
 Frees resources. More...
 
- Protected Member Functions inherited from jem::Clonable
virtual ~Clonable ()
 
virtual void emitVTable_ ()
 
- Protected Member Functions inherited from jem::Interface
virtual ~Interface ()
 Empty destructor. More...
 
- Protected Member Functions inherited from jem::io::Serializable
virtual ~Serializable ()
 
virtual void emitVtableFunc_ ()
 

Additional Inherited Members

- Public Types inherited from jive::util::ItemGroup
typedef jem::String String
 Represents a string type. More...
 
typedef jem::io::PrintWriter Printer
 Represents a formatted output stream. More...
 
typedef jem::util::Dictionary Dict
 Represents a dictionary. More...
 
typedef jem::util::Properties Properties
 Represents a properties set. More...
 
- Static Public Member Functions inherited from jive::util::ItemGroup
static IntVector getUnion (const ItemGroup &first, const ItemGroup &second)
 Returns the union of two item groups. More...
 
static IntVector getIntersection (const ItemGroup &first, const ItemGroup &second)
 Returns the intersection of two item groups. More...
 
static void printGroup (Printer &out, const ItemSet &items, const IntVector &iitems)
 Prints the contents of a given set of item indices. More...
 
static void printSome (Printer &out, const Dict &groups, const String &tag="")
 Prints all groups in a given dictionary. More...
 
static void printAll (Printer &out, const Properties &globdat)
 Prints all item groups in a global data set. More...
 
static String getTagName (const String &itemName)
 Returns an XML tag name for a group given an item type name. More...
 
static jem::Ref< ItemGroupfind (const String &name, const jem::Ref< ItemSet > &items, const Properties &globdat)
 Searches for a named item group in a (global) data set. More...
 
static jem::Ref< ItemGroupget (const String &name, const jem::Ref< ItemSet > &items, const Properties &globdat, const String &context)
 Returns a named item group stored in a (global) data set. More...
 
static jem::Ref< DictfindFor (const jem::Ref< ItemSet > &items, const Properties &globdat)
 Searches for all groups associated with a given item set. More...
 
static jem::Ref< DictgetFor (const jem::Ref< ItemSet > &items, const Properties &globdat)
 Returns all groups associated with a given item set. More...
 
- Static Public Member Functions inherited from jem::Object
static ClassgetType ()
 Returns the Class instance representing the Object class. More...
 
- Public Attributes inherited from jive::util::ItemGroup
jem::util::Event< int, Self & > newSizeEvent
 Signals that the size of this item group has changed. More...
 
jem::util::Event< const IntVector &, Self & > newOrderEvent
 Signals that the indices have been re-ordered. More...
 

Constructor & Destructor Documentation

jive::util::ColoredItemGroup::ColoredItemGroup ( )
jive::util::ColoredItemGroup::ColoredItemGroup ( const IdxVector &  colors,
const Ref< ItemSet > &  items 
)
explicit
jive::util::ColoredItemGroup::ColoredItemGroup ( const IdxVector &  colors,
const IdxVector &  iitems,
const Ref< ItemSet > &  items 
)
virtual jive::util::ColoredItemGroup::~ColoredItemGroup ( )
protectedvirtual

Member Function Documentation

virtual void jive::util::ColoredItemGroup::readFrom ( ObjectInput in)
virtual

Implements jem::io::Serializable.

virtual void jive::util::ColoredItemGroup::writeTo ( ObjectOutput out) const
virtual

Implements jem::io::Serializable.

virtual Ref<Object> jive::util::ColoredItemGroup::clone ( ) const
virtual

Implements jem::Clonable.

virtual idx_t jive::util::ColoredItemGroup::size ( ) const
virtual

Returns the number of item indices in this group.

Returns
The size of this group: this->getIndices().size()

Implements jive::util::ItemGroup.

virtual IdxVector jive::util::ColoredItemGroup::getIndices ( ) const
virtual

Returns an array containing the indices of the items in this group. The contents of the returned array should not be modified as the array may share its data with one of the private members of this ItemGroup object.

Returns
The indices of the items in this group.

Implements jive::util::ItemGroup.

virtual idx_t jive::util::ColoredItemGroup::getIndex ( idx_t  i) const
virtual
virtual ItemSet* jive::util::ColoredItemGroup::getItems ( ) const
virtual

Returns a pointer to the item set containing the items selected by this ItemGroup object. The pointer is guaranteed not to be NULL and to remain valid throughout the entire lifetime of this ItemGroup object.

Returns
A pointer to the item set referred to by this item group.

Implements jive::util::ItemGroup.

virtual bool jive::util::ColoredItemGroup::contains ( idx_t  iitem) const
virtual
virtual void jive::util::ColoredItemGroup::filter ( const IdxVector &  iitems) const
virtual
idx_t jive::util::ColoredItemGroup::listCount ( ) const
IdxVector jive::util::ColoredItemGroup::getList ( idx_t  ilist) const
idx_t jive::util::ColoredItemGroup::getListOffset ( idx_t  ilist) const
idx_t jive::util::ColoredItemGroup::getListColor ( idx_t  ilist) const