AI Watch A1
Multi-person 3D skeleton detection using Intel RealSense and OpenPose with Kafka support.
MoveCommand.cpp
Go to the documentation of this file.
1//
2// MoveCommand.cpp
3// AI Watch A1
4//
5// Created by Denny Caruso on 23/07/22.
6//
7
8// License: Apache 2.0. See LICENSE file in root directory.
9// Copyright(c) 2022. All Rights Reserved.
10
11#include "SystemCommand.hpp"
12
13
14
15void MoveCommand::setCommand (int * fileArgc, char *** argv) {
16 UsageManager * usageManagerInstance = UsageManager::getInstance();
17 if (usageManagerInstance == nullptr) CV_Error(USAGE_MANAGER_NULLPTR_ERROR, USAGE_MANAGER_NULLPTR_SCOPE);
18 char *** localArgv = usageManagerInstance->get_argv();
19 std::stringstream moveTerminalCommand;
20 const char * imagesFolder = (* localArgv)[imagesFolderOffset];
21 moveTerminalCommand << "mv -v " << imagesFolder << "rgb/ " << imagesFolder << "videoframe/ > /dev/null";
22 SystemCommand::setCommand(std::string(moveTerminalCommand.str()));
23}
void setCommand(int *argc, char ***argv) override
Set the string command to moving files through the directories command.
Definition: MoveCommand.cpp:15
virtual void setCommand(int *argc, char ***argv)=0
Set the string command. The method is inherited from the subclasses and overridden in order to expres...
UsageManager class is a utility class that helps with configuration parameters.
char *** get_argv(void)
Get the argv's pointer.
static UsageManager * getInstance(void)
Get the unique class instance. This methods should be called in the following scenario: when we just ...
static const short int imagesFolderOffset
Definition: constants.hpp:64
static const short int USAGE_MANAGER_NULLPTR_ERROR
Definition: constants.hpp:35
static const char * USAGE_MANAGER_NULLPTR_SCOPE
Definition: constants.hpp:36