Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

EggFile Class Reference

#include <eggFile.h>

Inheritance diagram for EggFile:

TypedWritable Namable TypedObject List of all members.

Public Member Functions

 EggFile ()
void from_command_line (EggData *data, const Filename &source_filename, const Filename &dest_filename, const string &egg_comment)
void scan_textures ()
void get_textures (pset< TextureImage * > &result) const
void pre_txa_file ()
void match_txa_groups (const PaletteGroups &groups)
void post_txa_file ()
const PaletteGroupsget_explicit_groups () const
PaletteGroupget_default_group () const
const PaletteGroupsget_complete_groups () const
void clear_surprise ()
bool is_surprise () const
void mark_stale ()
bool is_stale () const
void build_cross_links ()
void apply_properties_to_source ()
void choose_placements ()
bool has_data () const
void update_egg ()
void remove_egg ()
bool read_egg ()
bool write_egg ()
void write_description (ostream &out, int indent_level=0) const
void write_texture_refs (ostream &out, int indent_level=0) const
virtual void write_datagram (BamWriter *writer, Datagram &datagram)
virtual int complete_pointers (TypedWritable **p_list, BamReader *manager)
virtual TypeHandle get_type () const

Static Public Member Functions

void register_with_read_factory ()
TypeHandle get_class_type ()
void init_type ()

Protected Member Functions

void fillin (DatagramIterator &scan, BamReader *manager)

Static Protected Member Functions

TypedWritablemake_EggFile (const FactoryParams &params)

Private Types

typedef pvector< TextureReference * > Textures

Private Member Functions

void remove_backstage (EggGroupNode *node)

Private Attributes

EggData_data
Filename _current_directory
Filename _source_filename
Filename _dest_filename
string _egg_comment
Textures _textures
bool _first_txa_match
PaletteGroups _explicitly_assigned_groups
PaletteGroup_default_group
PaletteGroups _complete_groups
bool _is_surprise
bool _is_stale
int _num_textures

Static Private Attributes

TypeHandle _type_handle

Member Typedef Documentation

typedef pvector<TextureReference *> EggFile::Textures [private]
 

Definition at line 93 of file eggFile.h.


Constructor & Destructor Documentation

EggFile::EggFile  ) 
 

Definition at line 47 of file eggFile.cxx.

References _data, _default_group, _first_txa_match, _is_stale, _is_surprise, and NULL.


Member Function Documentation

void EggFile::apply_properties_to_source  ) 
 

Definition at line 331 of file eggFile.cxx.

References _textures, and TextureReference::apply_properties_to_source().

void EggFile::build_cross_links  ) 
 

Definition at line 288 of file eggFile.cxx.

References _complete_groups, _default_group, _explicitly_assigned_groups, _textures, PaletteGroups::begin(), PaletteGroups::clear(), PaletteGroups::const_iterator, PaletteGroups::empty(), PaletteGroups::end(), TextureReference::get_source(), TextureReference::get_texture(), SourceTextureImage::increment_egg_count(), PaletteGroups::insert(), PaletteGroups::make_complete(), nassertv, NULL, and texture.

void EggFile::choose_placements  ) 
 

Definition at line 352 of file eggFile.cxx.

References _textures, PaletteGroups::begin(), PaletteGroups::empty(), get_complete_groups(), TexturePlacement::get_group(), Namable::get_name(), TextureReference::get_placement(), TextureReference::get_texture(), PaletteGroups::make_intersection(), nassertv, nout, NULL, TextureReference::set_placement(), texture, and PaletteGroups::write().

Referenced by Palettizer::read_stale_eggs().

void EggFile::clear_surprise  ) 
 

Definition at line 235 of file eggFile.cxx.

References _is_surprise.

Referenced by TxaLine::match_egg().

int EggFile::complete_pointers TypedWritable **  p_list,
BamReader manager
[virtual]
 

Reimplemented from TypedWritable.

Definition at line 642 of file eggFile.cxx.

References _default_group, _explicitly_assigned_groups, _num_textures, _textures, PaletteGroups::complete_pointers(), TypedWritable::complete_pointers(), DCAST_INTO_R, NULL, and texture.

void EggFile::fillin DatagramIterator scan,
BamReader manager
[protected]
 

Reimplemented from TypedWritable.

Definition at line 691 of file eggFile.cxx.

References _current_directory, _dest_filename, _egg_comment, _explicitly_assigned_groups, _is_stale, _is_surprise, _num_textures, Palettizer::_read_pi_version, _source_filename, PaletteGroups::fillin(), TypedWritable::fillin(), FilenameUnifier::get_bam_filename(), DatagramIterator::get_bool(), DatagramIterator::get_string(), DatagramIterator::get_uint32(), BamReader::read_pointer(), BamReader::read_pointers(), and Namable::set_name().

Referenced by make_EggFile().

void EggFile::from_command_line EggData data,
const Filename source_filename,
const Filename dest_filename,
const string &  egg_comment
 

Definition at line 62 of file eggFile.cxx.

References _current_directory, _data, _default_group, _dest_filename, _egg_comment, _source_filename, data, ExecutionEnvironment::get_cwd(), Palettizer::get_default_group(), Filename::make_absolute(), pal, and remove_backstage().

Referenced by EggPalettize::run().

TypeHandle EggFile::get_class_type void   )  [inline, static]
 

Reimplemented from Namable.

Definition at line 121 of file eggFile.h.

References _type_handle.

Referenced by get_type(), and register_with_read_factory().

const PaletteGroups & EggFile::get_complete_groups  )  const
 

Definition at line 224 of file eggFile.cxx.

References _complete_groups.

Referenced by choose_placements(), and TextureImage::note_egg_file().

PaletteGroup * EggFile::get_default_group  )  const
 

Definition at line 211 of file eggFile.cxx.

References _default_group.

Referenced by TextureImage::write_source_pathnames().

const PaletteGroups & EggFile::get_explicit_groups  )  const
 

Definition at line 199 of file eggFile.cxx.

References _explicitly_assigned_groups.

Referenced by TextureImage::write_source_pathnames().

void EggFile::get_textures pset< TextureImage * > &  result  )  const
 

Definition at line 141 of file eggFile.cxx.

References _textures.

Referenced by Palettizer::process_all(), and Palettizer::process_command_line_eggs().

virtual TypeHandle EggFile::get_type void   )  const [inline, virtual]
 

Reimplemented from TypedWritable.

Definition at line 131 of file eggFile.h.

References get_class_type().

bool EggFile::has_data  )  const
 

Definition at line 402 of file eggFile.cxx.

References _data, and NULL.

Referenced by Palettizer::read_stale_eggs(), and Palettizer::write_eggs().

void EggFile::init_type void   )  [inline, static]
 

Reimplemented from Namable.

Definition at line 124 of file eggFile.h.

References _type_handle, Namable::get_class_type(), TypedObject::get_class_type(), Namable::init_type(), TypedWritable::init_type(), and register_type().

Referenced by ConfigureFn().

bool EggFile::is_stale  )  const
 

Definition at line 272 of file eggFile.cxx.

References _is_stale.

Referenced by Palettizer::read_stale_eggs(), and write_description().

bool EggFile::is_surprise  )  const
 

Definition at line 247 of file eggFile.cxx.

References _is_surprise.

Referenced by Palettizer::report_pi().

TypedWritable * EggFile::make_EggFile const FactoryParams params  )  [static, protected]
 

Definition at line 673 of file eggFile.cxx.

References fillin(), params, and parse_params().

Referenced by register_with_read_factory().

void EggFile::mark_stale  ) 
 

Definition at line 260 of file eggFile.cxx.

References _is_stale.

Referenced by TextureReference::mark_egg_stale().

void EggFile::match_txa_groups const PaletteGroups groups  ) 
 

Definition at line 167 of file eggFile.cxx.

References _explicitly_assigned_groups, _first_txa_match, PaletteGroups::clear(), and PaletteGroups::make_union().

Referenced by TxaLine::match_egg().

void EggFile::post_txa_file  ) 
 

Definition at line 189 of file eggFile.cxx.

Referenced by Palettizer::process_all(), and Palettizer::process_command_line_eggs().

void EggFile::pre_txa_file  ) 
 

Definition at line 154 of file eggFile.cxx.

References _first_txa_match, and _is_surprise.

Referenced by Palettizer::process_all(), and Palettizer::process_command_line_eggs().

bool EggFile::read_egg  ) 
 

Definition at line 447 of file eggFile.cxx.

References _current_directory, _data, _egg_comment, _source_filename, DSearchPath::append_directory(), EggGroupNode::begin(), data, Filename::empty(), Filename::exists(), EggGroupNode::insert(), nassertr, nout, NULL, and remove_backstage().

Referenced by Palettizer::read_stale_eggs().

void EggFile::register_with_read_factory  )  [static]
 

Definition at line 592 of file eggFile.cxx.

References get_class_type(), BamReader::get_factory(), and make_EggFile().

Referenced by ConfigureFn().

void EggFile::remove_backstage EggGroupNode node  )  [private]
 

Definition at line 560 of file eggFile.cxx.

References EggGroupNode::begin(), DCAST, DCAST_INTO_V, EggGroupNode::end(), EggGroupNode::erase(), EggGroupNode::get_class_type(), EggGroup::get_class_type(), EggGroup::has_object_type(), TypedObject::is_of_type(), and EggGroupNode::iterator.

Referenced by from_command_line(), and read_egg().

void EggFile::remove_egg  ) 
 

Definition at line 429 of file eggFile.cxx.

References _textures, TextureReference::get_placement(), and TexturePlacement::remove_egg().

Referenced by Palettizer::read_stale_eggs(), and Palettizer::remove_egg_file().

void EggFile::scan_textures  ) 
 

Definition at line 99 of file eggFile.cxx.

References _data, _textures, EggTextureCollection::iterator, nassertv, NULL, ref, and tc.

Referenced by Palettizer::process_all(), Palettizer::process_command_line_eggs(), and Palettizer::read_stale_eggs().

void EggFile::update_egg  ) 
 

Definition at line 414 of file eggFile.cxx.

References _textures, and TextureReference::update_egg().

Referenced by Palettizer::write_eggs().

void EggFile::write_datagram BamWriter writer,
Datagram datagram
[virtual]
 

Reimplemented from TypedWritable.

Definition at line 605 of file eggFile.cxx.

References _current_directory, _default_group, _dest_filename, _egg_comment, _explicitly_assigned_groups, _is_stale, _is_surprise, _source_filename, _textures, Datagram::add_bool(), Datagram::add_string(), Datagram::add_uint32(), Namable::get_name(), FilenameUnifier::make_bam_filename(), PaletteGroups::write_datagram(), TypedWritable::write_datagram(), and writer().

void EggFile::write_description ostream &  out,
int  indent_level = 0
const
 

Definition at line 519 of file eggFile.cxx.

References _default_group, _explicitly_assigned_groups, PaletteGroups::empty(), Namable::get_name(), indent(), is_stale(), and NULL.

Referenced by Palettizer::report_pi().

bool EggFile::write_egg  ) 
 

Definition at line 495 of file eggFile.cxx.

References _data, _dest_filename, _is_stale, Filename::empty(), Filename::make_dir(), FilenameUnifier::make_user_filename(), nassertr, nout, NULL, and EggData::write_egg().

Referenced by Palettizer::write_eggs().

void EggFile::write_texture_refs ostream &  out,
int  indent_level = 0
const
 

Definition at line 542 of file eggFile.cxx.

References _textures, and TextureReference::write().

Referenced by Palettizer::report_pi().


Member Data Documentation

PaletteGroups EggFile::_complete_groups [private]
 

Definition at line 99 of file eggFile.h.

Referenced by build_cross_links(), and get_complete_groups().

Filename EggFile::_current_directory [private]
 

Definition at line 88 of file eggFile.h.

Referenced by fillin(), from_command_line(), read_egg(), and write_datagram().

EggData* EggFile::_data [private]
 

Definition at line 87 of file eggFile.h.

Referenced by EggFile(), from_command_line(), has_data(), read_egg(), scan_textures(), and write_egg().

PaletteGroup* EggFile::_default_group [private]
 

Definition at line 98 of file eggFile.h.

Referenced by build_cross_links(), complete_pointers(), EggFile(), from_command_line(), get_default_group(), write_datagram(), and write_description().

Filename EggFile::_dest_filename [private]
 

Definition at line 90 of file eggFile.h.

Referenced by fillin(), from_command_line(), write_datagram(), and write_egg().

string EggFile::_egg_comment [private]
 

Definition at line 91 of file eggFile.h.

Referenced by fillin(), from_command_line(), read_egg(), and write_datagram().

PaletteGroups EggFile::_explicitly_assigned_groups [private]
 

Definition at line 97 of file eggFile.h.

Referenced by build_cross_links(), complete_pointers(), fillin(), get_explicit_groups(), match_txa_groups(), write_datagram(), and write_description().

bool EggFile::_first_txa_match [private]
 

Definition at line 96 of file eggFile.h.

Referenced by EggFile(), match_txa_groups(), and pre_txa_file().

bool EggFile::_is_stale [private]
 

Definition at line 101 of file eggFile.h.

Referenced by EggFile(), fillin(), is_stale(), mark_stale(), write_datagram(), and write_egg().

bool EggFile::_is_surprise [private]
 

Definition at line 100 of file eggFile.h.

Referenced by clear_surprise(), EggFile(), fillin(), is_surprise(), pre_txa_file(), and write_datagram().

int EggFile::_num_textures [private]
 

Definition at line 118 of file eggFile.h.

Referenced by complete_pointers(), and fillin().

Filename EggFile::_source_filename [private]
 

Definition at line 89 of file eggFile.h.

Referenced by fillin(), from_command_line(), read_egg(), and write_datagram().

Textures EggFile::_textures [private]
 

Definition at line 94 of file eggFile.h.

Referenced by apply_properties_to_source(), build_cross_links(), choose_placements(), complete_pointers(), get_textures(), remove_egg(), scan_textures(), update_egg(), write_datagram(), and write_texture_refs().

TypeHandle EggFile::_type_handle [static, private]
 

Reimplemented from Namable.

Definition at line 39 of file eggFile.cxx.

Referenced by get_class_type(), and init_type().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 01:00:49 2003 for Panda-Tool by doxygen1.3