Instrument Neutral Distributed Interface INDI
1.9.5
libs
indibase
indiutility.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2020 by Pawel Soja <kernel32.pl@gmail.com>
3
Copyright (C) 2015 by Jasem Mutlaq <mutlaqja@ikarustech.com>
4
Copyright (C) 2014 by geehalel <geehalel@gmail.com>
5
6
Stream Recorder
7
8
This library is free software; you can redistribute it and/or
9
modify it under the terms of the GNU Lesser General Public
10
License as published by the Free Software Foundation; either
11
version 2.1 of the License, or (at your option) any later version.
12
13
This library is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
Lesser General Public License for more details.
17
18
You should have received a copy of the GNU Lesser General Public
19
License along with this library; if not, write to the Free Software
20
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22
*/
23
#pragma once
24
25
#include <string>
26
#include <sys/stat.h>
27
#include <ctime>
28
29
#include "
indimacros.h
"
30
31
namespace
INDI
32
{
33
38
#ifndef _WINDOWS
39
int
mkpath
(std::string path, mode_t mode);
40
#endif
41
44
std::string
format_time
(
const
std::tm &tm,
const
char
*format);
45
49
void
replace_all
(std::string &subject,
const
std::string &search,
const
std::string &replace);
50
51
}
indimacros.h
INDI::format_time
std::string format_time(const std::tm &tm, const char *format)
Converts the date and time to string - this function uses 'strftime'.
Definition:
indiutility.cpp:64
INDI::mkpath
int mkpath(std::string s, mode_t mode)
Create a path directory - this function uses 'mkdir'.
Definition:
indiutility.cpp:29
INDI::replace_all
void replace_all(std::string &subject, const std::string &search, const std::string &replace)
Replaces every occurrence of the string 'search' with the string 'replace'.
Definition:
indiutility.cpp:73
INDI
Namespace to encapsulate INDI client, drivers, and mediator classes.
Definition:
AlignmentSubsystemForClients.cpp:11
Generated on Tue Jan 25 2022 14:40:57 for Instrument Neutral Distributed Interface INDI by
1.8.17