Panda3D
Public Member Functions | List of all members
EggSingleBase Class Reference

This specialization of EggBase is intended for programs that read and/or write a single egg file. More...

#include "eggSingleBase.h"

Inheritance diagram for EggSingleBase:
EggBase ProgramBase EggReader EggWriter EggFilter EggListTextures EggFilter EggMakeFont EggMakeSomething EggTextureCards EggConverter EggCrop EggQtess EggTrans EggConverter EggCrop EggQtess EggTrans EggMakeTube

Public Member Functions

virtual EggReaderas_reader ()
 Returns this object as an EggReader pointer, if it is in fact an EggReader, or NULL if it is not. More...
 
virtual EggWriteras_writer ()
 Returns this object as an EggWriter pointer, if it is in fact an EggWriter, or NULL if it is not. More...
 
- Public Member Functions inherited from EggBase
void add_normals_options ()
 Adds -no, -np, etc. More...
 
void add_points_options ()
 Adds -points as a valid option for this program. More...
 
void add_transform_options ()
 Adds -TS, -TT, etc. More...
 
- Public Member Functions inherited from ProgramBase
 ProgramBase (const std::string &name=std::string())
 
std::string get_exec_command () const
 Returns the command that invoked this program, as a shell-friendly string, suitable for pasting into the comments of output files. More...
 
virtual void parse_command_line (int argc, char **argv)
 Dispatches on each of the options on the command line, and passes the remaining parameters to handle_args(). More...
 
void show_description ()
 Writes the program description to stderr. More...
 
void show_options ()
 Describes each of the available options to stderr. More...
 
void show_text (const std::string &text)
 Formats the indicated text to stderr with the known _terminal_width. More...
 
void show_text (const std::string &prefix, int indent_width, std::string text)
 Formats the indicated text and its prefix for output to stderr with the known _terminal_width. More...
 
void show_usage ()
 Writes the usage line(s) to stderr. More...
 
void write_man_page (std::ostream &out)
 Generates a man page in nroff syntax based on the description and options. More...
 

Additional Inherited Members

- Public Types inherited from ProgramBase
typedef pdeque< std::string > Args
 
- Static Public Member Functions inherited from EggBase
static void convert_paths (EggNode *node, PathReplace *path_replace, const DSearchPath &additional_path)
 Recursively walks the egg hierarchy. More...
 
- Public Attributes inherited from ProgramBase
Args _program_args
 
Filename _program_name
 

Detailed Description

This specialization of EggBase is intended for programs that read and/or write a single egg file.

(See EggMultiBase for programs that operate on multiple egg files at once.)

This is just a base class; see EggReader, EggWriter, or EggFilter according to your particular I/O needs.

Definition at line 37 of file eggSingleBase.h.

Member Function Documentation

◆ as_reader()

EggReader * EggSingleBase::as_reader ( )
virtual

Returns this object as an EggReader pointer, if it is in fact an EggReader, or NULL if it is not.

This is intended to work around the C++ limitation that prevents downcasts past virtual inheritance. Since both EggReader and EggWriter inherit virtually from EggSingleBase, we need functions like this to downcast to the appropriate pointer.

Reimplemented in EggReader.

Definition at line 42 of file eggSingleBase.cxx.

◆ as_writer()

EggWriter * EggSingleBase::as_writer ( )
virtual

Returns this object as an EggWriter pointer, if it is in fact an EggWriter, or NULL if it is not.

This is intended to work around the C++ limitation that prevents downcasts past virtual inheritance. Since both EggReader and EggWriter inherit virtually from EggSingleBase, we need functions like this to downcast to the appropriate pointer.

Reimplemented in EggWriter.

Definition at line 56 of file eggSingleBase.cxx.


The documentation for this class was generated from the following files: