Go to the documentation of this file.
14 #ifndef PALETTEGROUPS_H
15 #define PALETTEGROUPS_H
34 typedef Groups::const_pointer pointer;
35 typedef Groups::const_pointer const_pointer;
37 typedef Groups::const_reference reference;
38 typedef Groups::const_reference const_reference;
39 typedef Groups::const_iterator iterator;
40 typedef Groups::const_iterator const_iterator;
41 typedef Groups::const_reverse_iterator reverse_iterator;
42 typedef Groups::const_reverse_iterator const_reverse_iterator;
43 typedef Groups::size_type size_type;
44 typedef Groups::difference_type difference_type;
59 size_type
size()
const;
60 iterator
begin()
const;
63 void output(std::ostream &out)
const;
64 void write(std::ostream &out,
int indent_level = 0)
const;
93 static void init_type() {
94 TypedWritable::init_type();
96 TypedWritable::get_class_type());
99 return get_class_type();
106 INLINE std::ostream &operator << (std::ostream &out,
const PaletteGroups &groups) {
void make_union(const PaletteGroups &a, const PaletteGroups &b)
Computes the union of PaletteGroups a and b, and stores the result in this object.
This is the highest level of grouping for TextureImages.
virtual void write_datagram(BamWriter *writer, Datagram &datagram)
Fills the indicated datagram up with a binary representation of the current object,...
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...
A class to retrieve the individual data elements previously stored in a Datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
static void register_with_read_factory()
Registers the current object as something that can be read from a Bam file.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
bool empty() const
Returns true if the set is empty, false otherwise.
Base class for objects that can be written to and read from Bam files.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
TypeHandle is the identifier used to differentiate C++ class types.
void remove_null()
Removes the special "null" group from the set.
void insert(PaletteGroup *group)
Inserts a new group to the set, if it is not already there.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
iterator begin() const
Returns an iterator suitable for traversing the set.
size_type size() const
Returns the number of elements in the set.
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 make_complete(const PaletteGroups &a)
Completes the set with the transitive closure of all dependencies: for each PaletteGroup already in t...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void clear()
Empties the set.
size_type count(PaletteGroup *group) const
Returns the number of times the given group appears in the set.
iterator end() const
Returns an iterator suitable for traversing the set.
void fillin(DatagramIterator &scan, BamReader *manager)
Reads the binary data from the given datagram iterator, which was written by a previous call to write...