osgEarth 2.1.1
Classes | Defines | Functions

/home/cube/sources/osgearth/src/osgEarthDrivers/feature_wfs/FeatureSourceWFS.cpp File Reference

#include <osgEarth/Registry>
#include <osgEarth/FileUtils>
#include <osgEarthFeatures/FeatureSource>
#include <osgEarthFeatures/Filter>
#include <osgEarthFeatures/BufferFilter>
#include <osgEarthFeatures/ScaleFilter>
#include <osgEarthUtil/WFS>
#include "WFSFeatureOptions"
#include <osgEarthFeatures/OgrUtils>
#include <osg/Notify>
#include <osgDB/FileNameUtils>
#include <osgDB/FileUtils>
#include <list>
#include <stdio.h>
#include <stdlib.h>
#include <ogr_api.h>
Include dependency graph for FeatureSourceWFS.cpp:

Go to the source code of this file.

Classes

class  WFSFeatureSource
class  WFSFeatureSourceFactory

Defines

#define LC   "[WFS FeatureSource] "
#define OGR_SCOPED_LOCK   GDAL_SCOPED_LOCK

Functions

std::string getTempPath ()
std::string getTempName (const std::string &prefix="", const std::string &suffix="")

Define Documentation

#define LC   "[WFS FeatureSource] "

Definition at line 42 of file FeatureSourceWFS.cpp.

#define OGR_SCOPED_LOCK   GDAL_SCOPED_LOCK

Definition at line 49 of file FeatureSourceWFS.cpp.


Function Documentation

std::string getTempName ( const std::string &  prefix = "",
const std::string &  suffix = "" 
)

Definition at line 74 of file FeatureSourceWFS.cpp.

{
    //tmpname is kind of busted on Windows, it always returns a file of the form \blah which gets put in your root directory but
    //oftentimes can't get opened by some drivers b/c it doesn't have a drive letter in front of it.
    bool valid = false;
    while (!valid)
    {
        std::stringstream ss;
        ss << prefix << "~" << rand() << suffix;
        if (!osgDB::fileExists(ss.str())) return ss.str();
    }
    return "";
}

Here is the caller graph for this function:

std::string getTempPath ( )

Definition at line 51 of file FeatureSourceWFS.cpp.

{
#if defined(WIN32)  && !defined(__CYGWIN__)
    BOOL fSuccess  = FALSE;

    TCHAR lpTempPathBuffer[MAX_PATH];    

    //  Gets the temp path env string (no guarantee it's a valid path).
    DWORD dwRetVal = ::GetTempPath(MAX_PATH,          // length of the buffer
                                   lpTempPathBuffer); // buffer for path     

    if (dwRetVal > MAX_PATH || (dwRetVal == 0))
    {
        OE_NOTICE << "GetTempPath failed" << std::endl;
        return ".";
    }

    return std::string(lpTempPathBuffer);
#else
    return "/tmp/";
#endif
}

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines