Main Page
Namespaces
Classes
Files
File List
File Members
include
Applications
GteEnvironment.h
Go to the documentation of this file.
1
// David Eberly, Geometric Tools, Redmond WA 98052
2
// Copyright (c) 1998-2017
3
// Distributed under the Boost Software License, Version 1.0.
4
// http://www.boost.org/LICENSE_1_0.txt
5
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6
// File Version: 3.0.0 (2016/06/19)
7
8
#pragma once
9
10
#include <
GTEngineDEF.h
>
11
#include <cstdarg>
12
#include <string>
13
#include <vector>
14
15
namespace
gte
16
{
17
18
class
GTE_IMPEXP
Environment
19
{
20
public
:
21
// Construction and destruction.
22
~
Environment
();
23
Environment
();
24
25
// Get the string corresponding to an environment variable.
26
std::string
GetVariable(
std::string
const
&
name
);
27
28
// Support for paths to locate files. For platform independence, use
29
// "/" for the path separator. The input 'directory' will automatically
30
// be appended with a trailing "/" if it does not end in '/' or '\\'.
31
// The Insert*/Remove* functions return 'true' iff the operation was
32
// successful.
33
int
GetNumDirectories()
const
;
34
std::string
Get(
int
i)
const
;
35
bool
Insert(
std::string
const
& directory);
36
bool
Remove(
std::string
const
& directory);
37
void
RemoveAll();
38
39
// The GetPath function searches the list of directories and returns the
40
// fully decorated file name if the file exists and can be opened for
41
// reading.
42
std::string
GetPath(
std::string
const
& name)
const
;
43
44
private
:
45
// The list of directories for GetPath to search.
46
std::vector<std::string>
mDirectories
;
47
};
48
49
}
gte::Environment::mDirectories
std::vector< std::string > mDirectories
Definition:
GteEnvironment.h:46
GTEngineDEF.h
name
GLuint const GLchar * name
Definition:
glcorearb.h:781
string
GLsizei const GLchar *const * string
Definition:
glcorearb.h:809
gte
Definition:
GLX/GteWICFileIO.h:16
gte::Environment
Definition:
GteEnvironment.h:18
GTE_IMPEXP
#define GTE_IMPEXP
Definition:
GTEngineDEF.h:63
geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 03:59:59