OpendTect-6_4  6.4
cvsaccess.h
Go to the documentation of this file.
1 #ifndef cvsaccess_h
2 #define cvsaccess_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Dec 2011
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 ;
15 
16 #include "networkmod.h"
17 #include "bufstring.h"
18 class BufferStringSet;
19 
20 
22 {
23 
24 public:
25 
26  CVSAccess(const char* dir);
27  virtual ~CVSAccess();
28  bool isOK() const { return *host(); }
29  const char* host() const { return host_; }
30  bool hostOK() const;
31 
32  // info
33  bool isInCVS(const char*) const;
34  void getEntries(const char* subdir,BufferStringSet&) const;
35  const char* reposDir() const { return reposdir_; }
36  void getEditTxts(const char* fnm,BufferStringSet&) const;
37  void diff(const char* fnm,BufferString&) const;
38 
39  // changes locally
40  bool update(const char* fnm=0);
41  bool edit(const char*);
42  bool edit(const BufferStringSet&);
43 
44  // sets up for repos change
45  bool add(const char*,bool binary=false);
46  bool add(const BufferStringSet&,bool binary=false);
47  // sets up for repos change and changes locally
48  bool remove(const char*);
49  bool remove(const BufferStringSet&);
50  bool rename(const char* subdir,const char* from,
51  const char* to);
52  bool changeFolder(const char* fnm,const char* fromsubdir,
53  const char* tosubdir);
54 
55  // changes repository
56  bool commit(const char* fnm,const char* msg=0);
57  bool commit(const BufferStringSet&,const char* msg=0);
58 
59 
60 protected:
61 
66 
67  bool doRename(const char*,const char*,
68  const char*, const char*);
69 
70 };
71 
72 #endif
bool rename(const char *oldname, const char *newname)
#define mExpClass(module)
Definition: commondefs.h:160
T to(const F &fr)
Definition: convert.h:33
Definition: jobcommunic.h:24
BufferString reposdir_
Definition: cvsaccess.h:65
const char * reposDir() const
Definition: cvsaccess.h:35
Set of BufferString objects.
Definition: bufstringset.h:28
Definition: cvsaccess.h:21
BufferStringSet & add(const char *)
const BufferString host_
Definition: cvsaccess.h:63
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
bool isOK() const
Definition: cvsaccess.h:28
const char * host() const
Definition: cvsaccess.h:29
const BufferString dir_
Definition: cvsaccess.h:62
BufferString serverdir_
Definition: cvsaccess.h:64

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019