Loading...
Searching...
No Matches
Platform.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
3
4 This file is part of the TerraLib - a Framework for building GIS enabled applications.
5
6 TerraLib is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation, either version 3 of the License,
9 or (at your option) any later version.
10
11 TerraLib is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with TerraLib. See COPYING. If not, write to
18 TerraLib Team at <terralib-team@terralib.org>.
19 */
20
21/*!
22 \file terralib/core/utils/Platform.h
23
24 \brief This file is a wrapper around platform specific include files.
25
26 \author Matheus Cavassan Zaglia
27 \author Gilberto Ribeiro de Queiroz
28*/
29
30#ifndef __TERRALIB_CORE_UTILS_PLATFORM_H__
31#define __TERRALIB_CORE_UTILS_PLATFORM_H__
32
33// TerraLib
34#include "../Config.h"
35
36// STL
37#include <string>
38
39namespace te
40{
41 namespace core
42 {
43
44 /*!
45 \brief Returns the path relative to a directory or file in the context of TerraLib.
46
47 \param path A path to be searched in the TerraLib context.
48
49 \return A complete path to the file or directory if it is found, otherwise returns an empty string.
50 */
51 TECOREEXPORT std::string FindInTerraLibPath(const std::string& path);
52
53 /*!
54 \brief Returns the system user home dir path.
55
56 \return Returns the system user home dir path.
57
58 \note An empty string will be returned on errors.
59 */
61
62 /*!
63 \brief It returns the writable folder location to store per user data.
64
65 \return The folder location to store per user data.
66 */
68
69 /*!
70 \brief It returns the writable folder location to store application data applied to all users.
71
72 \return The folder location to store application data applied to all users.
73 */
75
76 /*!
77 \brief Sets the given key/value to the session environment variables
78
79 \return The result of the set
80 */
81 TECOREEXPORT bool SetEnv(const std::string& key, const std::string& value);
82
83 /*!
84 \brief Gets the value of the given key in the session environment variables
85
86 \return The result of the set
87 */
88 TECOREEXPORT std::string GetEnv(const std::string& key);
89
90 } // end namespace core
91} // end namespace te
92
93#endif //__TERRALIB_CORE_UTILS_PLATFORM_H__
TECOREEXPORT std::string GetAppDataLocation()
It returns the writable folder location to store application data applied to all users.
TECOREEXPORT std::string GetAppLocalDataLocation()
It returns the writable folder location to store per user data.
TECOREEXPORT bool SetEnv(const std::string &key, const std::string &value)
Sets the given key/value to the session environment variables.
TECOREEXPORT std::string FindInTerraLibPath(const std::string &path)
Returns the path relative to a directory or file in the context of TerraLib.
TECOREEXPORT std::string GetEnv(const std::string &key)
Gets the value of the given key in the session environment variables.
TECOREEXPORT std::string GetUserDirectory()
Returns the system user home dir path.
TerraLib.
#define TECOREEXPORT
Definition: Config.h:52