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

Switch Branch command Class. More...

#include <SwitchBranch.h>

Inheritance diagram for SwitchBranch:
GitCommand

Public Member Functions

 SwitchBranch (BString)
 SwitchBranch class constructor. More...
 
virtual void Execute ()
 SwitchBranch command execution. More...
 
virtual TrackGitWindow * GetWindow ()
 This returns pointer to the Switch Branch window. More...
 

Static Public Member Functions

static int DoSwitchBranch (BString, BString)
 This function creates a new branch in repo with given name. More...
 
static int GetBranches (BString, vector< BString > &)
 This function gets all the branche names in given repository. More...
 

Private Attributes

BString fRepo
 The repo/directory where command is called. More...
 
TrackGitWindow * fSwitchBranchWindow
 The Switch Branch Window. More...
 

Detailed Description

Switch Branch command Class.

Definition at line 20 of file SwitchBranch.h.

Constructor & Destructor Documentation

◆ SwitchBranch()

SwitchBranch::SwitchBranch ( BString  repo)

SwitchBranch class constructor.

Parameters
repoThe repo path where Switch Branch option is selected.

Definition at line 19 of file SwitchBranch.cpp.

Member Function Documentation

◆ DoSwitchBranch()

int SwitchBranch::DoSwitchBranch ( BString  repoPath,
BString  branchName 
)
static

This function creates a new branch in repo with given name.

Parameters
repoPathThe repository path.
branchNameThe name of new branch.
Returns
0 or error code.

Definition at line 87 of file SwitchBranch.cpp.

◆ Execute()

void SwitchBranch::Execute ( )
virtual

SwitchBranch command execution.

Implements GitCommand.

Definition at line 30 of file SwitchBranch.cpp.

◆ GetBranches()

int SwitchBranch::GetBranches ( BString  repoPath,
vector< BString > &  branches 
)
static

This function gets all the branche names in given repository.

Parameters
repoPathThe repo path.
branchesThe list of branch names.
Returns
0 or error code

Definition at line 42 of file SwitchBranch.cpp.

◆ GetWindow()

TrackGitWindow * SwitchBranch::GetWindow ( )
virtual

This returns pointer to the Switch Branch window.

Returns
The Switch Branch Window;

Reimplemented from GitCommand.

Definition at line 72 of file SwitchBranch.cpp.

Member Data Documentation

◆ fRepo

BString SwitchBranch::fRepo
private

The repo/directory where command is called.

Definition at line 24 of file SwitchBranch.h.

◆ fSwitchBranchWindow

TrackGitWindow* SwitchBranch::fSwitchBranchWindow
private

The Switch Branch Window.

Definition at line 28 of file SwitchBranch.h.


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