#include <paletteGroups.h>
Inheritance diagram for PaletteGroups:
Public Types | |
typedef Groups::const_pointer | pointer |
typedef Groups::const_pointer | const_pointer |
typedef Groups::const_reference | reference |
typedef Groups::const_reference | const_reference |
typedef Groups::const_iterator | iterator |
typedef Groups::const_iterator | const_iterator |
typedef Groups::const_reverse_iterator | reverse_iterator |
typedef Groups::const_reverse_iterator | const_reverse_iterator |
typedef Groups::size_type | size_type |
typedef Groups::difference_type | difference_type |
Public Member Functions | |
PaletteGroups () | |
void | insert (PaletteGroup *group) |
Inserts a new group to the set, if it is not already there. | |
size_type | count (PaletteGroup *group) const |
Returns the number of times the given group appears in the set. | |
void | make_complete (const PaletteGroups &a) |
Completes the set with the transitive closure of all dependencies: for each PaletteGroup already in the set a, all of the groups that it depends on are added to the set, and so on. | |
void | make_union (const PaletteGroups &a, const PaletteGroups &b) |
Computes the union of PaletteGroups a and b, and stores the result in this object. | |
void | make_intersection (const PaletteGroups &a, const PaletteGroups &b) |
Computes the intersection of PaletteGroups a and b, and stores the result in this object. | |
void | clear () |
Empties the set. | |
bool | empty () const |
Returns true if the set is empty, false otherwise. | |
size_type | size () const |
Returns the number of elements in the set. | |
iterator | begin () const |
Returns an iterator suitable for traversing the set. | |
iterator | end () const |
Returns an iterator suitable for traversing the set. | |
void | output (ostream &out) const |
void | write (ostream &out, int indent_level=0) const |
virtual void | write_datagram (BamWriter *writer, Datagram &datagram) |
Fills the indicated datagram up with a binary representation of the current object, in preparation for writing to a Bam file. | |
virtual int | complete_pointers (TypedWritable **p_list, BamReader *manager) |
Called after the object is otherwise completely read from a Bam file, this function's job is to store the pointers that were retrieved from the Bam file for each pointer object written. | |
void | fillin (DatagramIterator &scan, BamReader *manager) |
Reads the binary data from the given datagram iterator, which was written by a previous call to write_datagram(). | |
virtual TypeHandle | get_type () const |
virtual void | finalize () |
virtual TypeHandle | force_init_type (void) |
int | get_type_index () const |
bool | is_of_type (TypeHandle handle) const |
bool | is_exact_type (TypeHandle handle) const |
Static Public Member Functions | |
void | register_with_read_factory () |
Registers the current object as something that can be read from a Bam file. | |
TypeHandle | get_class_type () |
void | init_type () |
Static Public Attributes | |
TypedWritable *const | Null |
Static Protected Member Functions | |
TypedWritable * | make_PaletteGroups (const FactoryParams ¶ms) |
This method is called by the BamReader when an object of this type is encountered in a Bam file; it should allocate and return a new object with all the data read. | |
Private Types | |
typedef pset< PaletteGroup * > | Groups |
Private Member Functions | |
void | r_make_complete (Groups &result, PaletteGroup *group) |
The recursive implementation of make_complete(), this adds the indicated group and all of its dependencies to the set. | |
Private Attributes | |
Groups | _groups |
int | _num_groups |
Static Private Attributes | |
TypeHandle | _type_handle |
This presents an interface very like an STL set, with a few additional functions.
Definition at line 43 of file paletteGroups.h.
|
Definition at line 55 of file paletteGroups.h. |
|
Definition at line 50 of file paletteGroups.h. |
|
Definition at line 53 of file paletteGroups.h. |
|
Definition at line 57 of file paletteGroups.h. |
|
Definition at line 59 of file paletteGroups.h. |
|
Definition at line 45 of file paletteGroups.h. |
|
Definition at line 54 of file paletteGroups.h. Referenced by clear(), PaletteGroup::get_placements(), and PaletteGroup::group_with(). |
|
Definition at line 49 of file paletteGroups.h. |
|
Definition at line 52 of file paletteGroups.h. |
|
Definition at line 56 of file paletteGroups.h. |
|
Definition at line 58 of file paletteGroups.h. Referenced by insert(). |
|
Definition at line 43 of file paletteGroups.cxx. References _groups. |
|
Returns an iterator suitable for traversing the set.
Definition at line 240 of file paletteGroups.cxx. References _groups. Referenced by PaletteGroup::get_placements(), and PaletteGroup::group_with(). |
|
Empties the set.
Definition at line 201 of file paletteGroups.cxx. References _groups, and iterator. Referenced by EggFile::clear_surprise(), EggFile::get_textures(), and PaletteGroup::has_dirname(). |
|
Called after the object is otherwise completely read from a Bam file, this function's job is to store the pointers that were retrieved from the Bam file for each pointer object written. The return value is the number of pointers processed from the list. Reimplemented from TypedWritable. Definition at line 394 of file paletteGroups.cxx. Referenced by EggFile::write_description(). |
|
Returns the number of times the given group appears in the set. This is either 1 if it appears at all, or 0 if it does not appear. Definition at line 74 of file paletteGroups.cxx. References _groups, and r_make_complete(). Referenced by EggFile::is_stale(). |
|
Returns true if the set is empty, false otherwise.
Definition at line 214 of file paletteGroups.cxx. References _groups. Referenced by TextureImage::note_egg_file(), and EggFile::update_egg(). |
|
Returns an iterator suitable for traversing the set.
Definition at line 253 of file paletteGroups.cxx. Referenced by PaletteGroup::get_placements(), and PaletteGroup::group_with(). |
|
Reads the binary data from the given datagram iterator, which was written by a previous call to write_datagram().
Reimplemented from TypedWritable. Definition at line 442 of file paletteGroups.cxx. |
|
Reimplemented from TypedWritable. Definition at line 102 of file paletteGroups.h. |
|
Reimplemented from TypedWritable. Definition at line 110 of file paletteGroups.h. |
|
Reimplemented from TypedWritable. Definition at line 105 of file paletteGroups.h. References _type_handle. |
|
Inserts a new group to the set, if it is not already there.
Definition at line 57 of file paletteGroups.cxx. References _groups, and size_type. Referenced by EggFile::clear_surprise(), and PaletteGroup::get_dirname(). |
|
Completes the set with the transitive closure of all dependencies: for each PaletteGroup already in the set a, all of the groups that it depends on are added to the set, and so on. The indicated set a may be the same as this set. Definition at line 95 of file paletteGroups.cxx. Referenced by EggFile::clear_surprise(), and PaletteGroup::group_with(). |
|
Computes the intersection of PaletteGroups a and b, and stores the result in this object. The result may be the same object as either a or b. Definition at line 168 of file paletteGroups.cxx. References _groups. Referenced by EggFile::is_stale(). |
|
This method is called by the BamReader when an object of this type is encountered in a Bam file; it should allocate and return a new object with all the data read.
Definition at line 419 of file paletteGroups.cxx. |
|
Computes the union of PaletteGroups a and b, and stores the result in this object. The result may be the same object as either a or b. Definition at line 119 of file paletteGroups.cxx. Referenced by EggFile::get_textures(). |
|
Definition at line 265 of file paletteGroups.cxx. References PaletteGroup::_dependent, _groups, and r_make_complete(). Referenced by get_type(). |
|
The recursive implementation of make_complete(), this adds the indicated group and all of its dependencies to the set.
Definition at line 325 of file paletteGroups.cxx. References _groups, _num_groups, and DCAST_INTO_R. |
|
Registers the current object as something that can be read from a Bam file.
Definition at line 349 of file paletteGroups.cxx. |
|
Returns the number of elements in the set.
Definition at line 227 of file paletteGroups.cxx. |
|
Definition at line 295 of file paletteGroups.cxx. References _groups, Datagram::add_uint32(), TypedWritable::write_datagram(), and writer(). Referenced by EggFile::build_cross_links(). |
|
Fills the indicated datagram up with a binary representation of the current object, in preparation for writing to a Bam file.
Reimplemented from TypedWritable. Definition at line 367 of file paletteGroups.cxx. |
|
Definition at line 81 of file paletteGroups.h. Referenced by begin(), clear(), count(), empty(), insert(), make_intersection(), output(), PaletteGroups(), r_make_complete(), and write(). |
|
Definition at line 99 of file paletteGroups.h. Referenced by r_make_complete(). |
|
Reimplemented from TypedWritable. Definition at line 33 of file paletteGroups.cxx. Referenced by init_type(). |