TrackGit
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Add Class Reference

Add command Class. More...

#include <Add.h>

Inheritance diagram for Add:
GitCommand

Public Member Functions

 Add (BString, vector< char *>)
 Add command constructor. More...
 
virtual void Execute ()
 Add command excution. More...
 
- Public Member Functions inherited from GitCommand
virtual TrackGitWindowGetWindow ()
 This is used to get pointer to the window (if any). More...
 

Static Public Member Functions

static int AddFiles (BString, vector< char *>)
 Adds given files into git repository. More...
 
static git_strarray InitArray (vector< char *> files)
 Initializes git_strarray. More...
 
static void FreeArray (git_strarray)
 Frees the allocated strings in git_strarray. More...
 

Private Attributes

BString fDirPath
 The current directory where Init option is selected. More...
 
vector< char * > fFiles
 The list of files to be added. More...
 

Detailed Description

Add command Class.

Definition at line 23 of file Add.h.

Constructor & Destructor Documentation

◆ Add()

Add::Add ( BString  dirPath,
vector< char *>  files 
)

Add command constructor.

Parameters
dirPathThe directory where Init is selected.
filesThe files to be added.

Definition at line 21 of file Add.cpp.

Member Function Documentation

◆ AddFiles()

int Add::AddFiles ( BString  dirPath,
vector< char *>  files 
)
static

Adds given files into git repository.

Parameters
dirPathThe given directory.
filesThe files to be added.
Returns
0 or error code.

Definition at line 67 of file Add.cpp.

◆ Execute()

void Add::Execute ( )
virtual

Add command excution.

Adds given files into git repository.

Implements GitCommand.

Definition at line 106 of file Add.cpp.

◆ FreeArray()

void Add::FreeArray ( git_strarray  array)
static

Frees the allocated strings in git_strarray.

Parameters
arrayThe git_strarray.

Definition at line 54 of file Add.cpp.

◆ InitArray()

git_strarray Add::InitArray ( vector< char *>  files)
static

Initializes git_strarray.

Parameters
filesThe files to be added to git_strarray.
Returns
The git_strarray.

Definition at line 36 of file Add.cpp.

Member Data Documentation

◆ fDirPath

BString Add::fDirPath
private

The current directory where Init option is selected.

Definition at line 28 of file Add.h.

◆ fFiles

vector<char*> Add::fFiles
private

The list of files to be added.

Definition at line 32 of file Add.h.


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