~ubuntu-branches/debian/experimental/openscenegraph/experimental

« back to all changes in this revision

Viewing changes to OpenSceneGraph/src/osgDB/Options.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Luaces
  • Date: 2011-01-29 11:36:29 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20110129113629-qisrm2kdqlurc7t3
Tags: 2.9.11-1
* Removed bug-555869-ftbfs_with_binutils_gold.dpatch since upstream has
  already taken care of the issue.
* Removed bug-528229.dpatch since the pkgconfig files are now also split
  in upstream.
* Removed explicit dependency on GLU.
* Upstream no longer includes osgIntrospection (Closes: #592420).
* Disabled zip plugin as its implementation stores an embedded copy of
  zlib.
* Enabled Qt support. Thanks James Goppert.
* Enabled SVG and PDF plugins. Thanks James Goppert.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
 
2
 *
 
3
 * This library is open source and may be redistributed and/or modified under  
 
4
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
 
5
 * (at your option) any later version.  The full license is in LICENSE file
 
6
 * included with this distribution, and on the openscenegraph.org website.
 
7
 * 
 
8
 * This library is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 
11
 * OpenSceneGraph Public License for more details.
 
12
*/
 
13
 
 
14
#include <osgDB/Options>
 
15
#include <osgDB/Registry>
 
16
 
 
17
using namespace osgDB;
 
18
 
 
19
Options::Options(const Options& options,const osg::CopyOp& copyop):
 
20
    osg::Object(options,copyop),
 
21
    _str(options._str),
 
22
    _databasePaths(options._databasePaths),
 
23
    _objectCacheHint(options._objectCacheHint),
 
24
    _precisionHint(options._precisionHint),
 
25
    _buildKdTreesHint(options._buildKdTreesHint),
 
26
    _pluginData(options._pluginData),
 
27
    _pluginStringData(options._pluginStringData),
 
28
    _findFileCallback(options._findFileCallback),
 
29
    _readFileCallback(options._readFileCallback),
 
30
    _writeFileCallback(options._writeFileCallback),
 
31
    _fileLocationCallback(options._fileLocationCallback),
 
32
    _fileCache(options._fileCache),
 
33
    _terrain(options._terrain) {}
 
34
 
 
35
void Options::parsePluginStringData(const std::string& str, char separator1, char separator2)
 
36
{
 
37
    StringList valueList;
 
38
    split(str, valueList, separator1);
 
39
    if (valueList.size() > 0)
 
40
    {
 
41
        StringList keyAndValue;
 
42
        for (StringList::iterator itr=valueList.begin(); itr!=valueList.end(); ++itr)
 
43
        {
 
44
            split(*itr, keyAndValue, separator2);
 
45
            if (keyAndValue.size() > 1)
 
46
            {
 
47
                setPluginStringData(keyAndValue.front(), keyAndValue.back());
 
48
            }
 
49
            else if (keyAndValue.size() > 0)
 
50
            {
 
51
                setPluginStringData(keyAndValue.front(), "true");
 
52
            }
 
53
            keyAndValue.clear();
 
54
        }
 
55
    }
 
56
}