Panda3D
Loading...
Searching...
No Matches
cvsCopy.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file cvsCopy.h
10 * @author drose
11 * @date 2000-10-31
12 */
13
14#ifndef CVSCOPY_H
15#define CVSCOPY_H
16
17#include "pandatoolbase.h"
18
19#include "cvsSourceTree.h"
20
21#include "programBase.h"
22#include "filename.h"
23#include "pvector.h"
24
25/**
26 * This is the base class for a family of programs that copy files, typically
27 * model files like .flt files and their associated textures, into a CVS-
28 * controlled source tree.
29 */
30class CVSCopy : public ProgramBase {
31public:
32 CVSCopy();
33
35 import(const Filename &source, void *extra_data,
36 CVSSourceDirectory *suggested_dir);
37
39
40protected:
41 virtual bool handle_args(Args &args);
42 virtual bool post_command_line();
43
44 virtual bool verify_file(const Filename &source, const Filename &dest,
45 CVSSourceDirectory *dest_dir,
46 void *extra_data);
47 virtual bool copy_file(const Filename &source, const Filename &dest,
48 CVSSourceDirectory *dest_dir,
49 void *extra_data, bool new_file)=0;
50
51 bool verify_binary_file(Filename source, Filename dest);
52 bool copy_binary_file(Filename source, Filename dest);
53
54 bool cvs_add(const Filename &filename);
55 static std::string protect_from_shell(const std::string &source);
56
57 virtual std::string filter_filename(const std::string &source);
58
59private:
60 bool scan_hierarchy();
61 bool scan_for_root(const std::string &dirname);
62 std::string prompt(const std::string &message);
63
64protected:
65 bool _force;
66 bool _interactive;
67 bool _got_model_dirname;
68 Filename _model_dirname;
69 bool _got_map_dirname;
70 Filename _map_dirname;
71 bool _got_root_dirname;
72 Filename _root_dirname;
73 Filename _key_filename;
74 bool _no_cvs;
75 std::string _cvs_binary;
76 bool _user_aborted;
77
79 SourceFiles _source_files;
80
81 CVSSourceTree _tree;
82 CVSSourceDirectory *_model_dir;
83 CVSSourceDirectory *_map_dir;
84
86 CopiedFiles _copied_files;
87};
88
89#endif
This is the base class for a family of programs that copy files, typically model files like ....
Definition cvsCopy.h:30
bool continue_after_error()
Prompts the user (unless -f was specified) if he wants to continue the copy operation after some erro...
Definition cvsCopy.cxx:159
This represents one particular directory in the hierarchy of source directory files.
This represents the root of the tree of source directory files.
The name of a file, such as a texture file or an Egg file.
Definition filename.h:44
This is intended to be the base class for most general-purpose utility programs in the PANDATOOL tree...
Definition programBase.h:34
This is our own Panda specialization on the default STL map.
Definition pmap.h:49
This is our own Panda specialization on the default STL vector.
Definition pvector.h:42
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.