snap_utils.hpp
Go to the documentation of this file.
1 /*
2  * snap_utils
3  * Copyright (c) 2019, Samsung Research America
4  *
5  * THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
6  * COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
7  * COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
8  * AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
9  *
10  * BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO
11  * BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS
12  * CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
13  * CONDITIONS.
14  *
15  */
16 
17 /* Author: Steven Macenski */
18 
19 #ifndef SLAM_TOOLBOX_SNAP_UTILS_H_
20 #define SLAM_TOOLBOX_SNAP_UTILS_H_
21 
22 namespace snap_utils
23 {
24 
25 // whether this is running in a snap container
26 inline bool isInSnap()
27 {
28  char* snap_common = getenv("SNAP_COMMON");
29  if (snap_common != NULL)
30  {
31  return true;
32  }
33  return false;
34 };
35 
36 // get path of shared space
37 inline std::string getSnapPath()
38 {
39  char* snap_common = getenv("SNAP_COMMON");
40  return std::string(snap_common);
41 }
42 
43 } // end namespace
44 
45 #endif //SLAM_TOOLBOX_SNAP_UTILS_H_
snap_utils::getSnapPath
std::string getSnapPath()
Definition: snap_utils.hpp:37
snap_utils
Definition: snap_utils.hpp:22
snap_utils::isInSnap
bool isInSnap()
Definition: snap_utils.hpp:26


slam_toolbox
Author(s): Steve Macenski
autogenerated on Thu Jan 11 2024 03:37:56