GteProgramDefines.cpp
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 #include <GTEnginePCH.h>
10 using namespace gte;
11 
12 
14 {
15 }
16 
18 {
19  // If an item already exists with the specified name, update it.
20  for (auto& definition : mDefinitions)
21  {
22  if (name == definition.first)
23  {
24  definition.second = value;
25  return;
26  }
27  }
28 
29  // The item is new, so append it.
30  mDefinitions.push_back(std::make_pair(name, value));
31 }
32 
34 {
35  for (auto iter = mDefinitions.begin(); iter != mDefinitions.end(); ++iter)
36  {
37  if (name == iter->first)
38  {
39  mDefinitions.erase(iter);
40  break;
41  }
42  }
43 }
44 
46 {
47  mDefinitions.clear();
48 }
49 
void Update(std::string const &name, std::string const &value)
std::vector< std::pair< std::string, std::string > > mDefinitions
GLsizei const GLfloat * value
Definition: glcorearb.h:819
GLuint const GLchar * name
Definition: glcorearb.h:781
GLsizei const GLchar *const * string
Definition: glcorearb.h:809
void Remove(std::string const &name)


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:01