Panda3D
Public Member Functions | List of all members
CVSCopy Class Referenceabstract

This is the base class for a family of programs that copy files, typically model files like .flt files and their associated textures, into a CVS- controlled source tree. More...

#include "cvsCopy.h"

Inheritance diagram for CVSCopy:
ProgramBase FltCopy MayaCopy TestCopy

Public Member Functions

bool continue_after_error ()
 Prompts the user (unless -f was specified) if he wants to continue the copy operation after some error has occurred. More...
 
CVSSourceTree::FilePath import (const Filename &source, void *extra_data, CVSSourceDirectory *suggested_dir)
 Checks for the given filename somewhere in the directory hierarchy, and chooses a place to import it. 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
 
- Public Attributes inherited from ProgramBase
Args _program_args
 
Filename _program_name
 

Detailed Description

This is the base class for a family of programs that copy files, typically model files like .flt files and their associated textures, into a CVS- controlled source tree.

Definition at line 30 of file cvsCopy.h.

Member Function Documentation

◆ continue_after_error()

bool CVSCopy::continue_after_error ( )

Prompts the user (unless -f was specified) if he wants to continue the copy operation after some error has occurred.

Returns true to continue, false otherwise.

Definition at line 159 of file cvsCopy.cxx.

◆ import()

CVSSourceTree::FilePath CVSCopy::import ( const Filename source,
void *  extra_data,
CVSSourceDirectory suggested_dir 
)

Checks for the given filename somewhere in the directory hierarchy, and chooses a place to import it.

Copies the file by calling copy_file().

Extra_data may be NULL or a pointer to some user-defined structure; CVSCopy simply passes it unchanged to copy_file(). It presumably gives the class a hint as to how the file should be copied. Suggested_dir is the suggested directory in which to copy the file, if it does not already exist elsewhere.

On success, returns the FilePath it was actually copied to. On failure, returns an invalid FilePath.

Definition at line 107 of file cvsCopy.cxx.

References Filename::exists().


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