WSF
SOSM_Utility.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI//REL TO USA ONLY
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef SOSM_UTILITY_HPP
13#define SOSM_UTILITY_HPP
14
15#include <iosfwd>
16#include <string>
17#include <vector>
18
19#include "UtLog.hpp"
20
21class SOSM_Selector;
22
24namespace SOSM_Utility
25{
31
32void SetSpectralPrintFormat(SpectralPrintFormat aSpectralPrintFormat);
33
34void PrintSpectralVector(ut::log::MessageStream& aStream,
35 const SOSM_Selector& aSelector,
36 const std::vector<float>& aVector,
37 const std::string& aHeader);
38
39std::string BaseName(const std::string& aPath);
40
41std::string DirName(const std::string& aPath);
42
43void StripPathPrefix(const std::string& aPrefixedPath, std::string& aPrefix, std::string& aPath);
44
45bool MakePath(const std::string& aPath);
46
47bool CreateDirectory(const std::string& aDirName);
48
49bool DirectoryExists(const std::string& aDirName);
50
51bool FileExists(const std::string& aFileName);
52
53bool FileIsCurrent(const std::string& aTargetFile, const std::string& aSourceFile);
54
55double FileModificationTime(const std::string& aFile);
56} // namespace SOSM_Utility
57
58#endif
Definition SOSM_Selector.hpp:24
A collection of utility functions.
Definition SOSM_Utility.hpp:25
SpectralPrintFormat
Definition SOSM_Utility.hpp:27
@ cSPF_WAVENUMBER
Definition SOSM_Utility.hpp:28
@ cSPF_WAVELENGTH
Definition SOSM_Utility.hpp:29
bool DirectoryExists(const std::string &aDirName)
Definition SOSM_Utility.cpp:288
double FileModificationTime(const std::string &aFile)
Definition SOSM_Utility.cpp:344
void SetSpectralPrintFormat(SpectralPrintFormat aSpectralPrintFormat)
Definition SOSM_Utility.cpp:33
bool CreateDirectory(const std::string &aDirName)
Definition SOSM_Utility.cpp:264
std::string BaseName(const std::string &aPath)
A C++ equivalent of the Unix 'basename' command, without the option to remove the suffix.
Definition SOSM_Utility.cpp:92
void PrintSpectralVector(ut::log::MessageStream &aStream, const SOSM_Selector &aSelector, const std::vector< float > &aVector, const std::string &aHeader)
Print a vector that represents the spectral product of something (target model, atmosphere,...
Definition SOSM_Utility.cpp:40
bool FileIsCurrent(const std::string &aTargetFile, const std::string &aSourceFile)
Definition SOSM_Utility.cpp:324
std::string DirName(const std::string &aPath)
Definition SOSM_Utility.cpp:130
bool MakePath(const std::string &aPath)
Like Unix 'mkdir -p'.
Definition SOSM_Utility.cpp:218
bool FileExists(const std::string &aFileName)
Definition SOSM_Utility.cpp:301
void StripPathPrefix(const std::string &aPrefixedPath, std::string &aPrefix, std::string &aPath)
Strip off Windows/DOS path prefix data.
Definition SOSM_Utility.cpp:172
Copyrights Multiple, All Rights Reserved