osgEarth 2.1.1
Defines | Functions

/home/cube/sources/osgearth/src/osgEarth/Version File Reference

#include <osgEarth/Export>
Include dependency graph for Version:

Go to the source code of this file.

Defines

#define OSGEARTH_VERSION   1
#define OSGEARTH_MAJOR_VERSION   2
#define OSGEARTH_MINOR_VERSION   1
#define OSGEARTH_PATCH_VERSION   1
#define OSGEARTH_SOVERSION   0
#define OSGEARTH_MIN_VERSION_REQUIRED(MAJOR, MINOR, PATCH)   ((OSGEARTH_MAJOR_VERSION>MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION>MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION>=PATCH))))
#define OSGEARTH_VERSION_LESS_THAN(MAJOR, MINOR, PATCH)   ((OSGEARTH_MAJOR_VERSION<MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION<MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION<PATCH))))
#define OSGEARTH_VERSION_LESS_OR_EQUAL(MAJOR, MINOR, PATCH)   ((OSGEARTH_MAJOR_VERSION<MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION<MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION<=PATCH))))
#define OSGEARTH_VERSION_GREATER_THAN(MAJOR, MINOR, PATCH)   ((OSGEARTH_MAJOR_VERSION>MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION>MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION>PATCH))))
#define OSGEARTH_VERSION_GREATER_OR_EQUAL(MAJOR, MINOR, PATCH)   ((OSGEARTH_MAJOR_VERSION>MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION>MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION>=PATCH))))
#define OSGEARTH_VERSION_RELEASE   OSGEARTH_VERSION_PATCH
#define OSGEARTH_VERSION_REVISION   0

Functions

OSGEARTH_EXPORT const char * osgEarthGetVersion ()
OSGEARTH_EXPORT const char * osgEarthGetSOVersion ()
OSGEARTH_EXPORT const char * osgEarthGetLibraryName ()

Define Documentation

#define OSGEARTH_MAJOR_VERSION   2

Definition at line 27 of file Version.

#define OSGEARTH_MIN_VERSION_REQUIRED (   MAJOR,
  MINOR,
  PATCH 
)    ((OSGEARTH_MAJOR_VERSION>MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION>MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION>=PATCH))))

Definition at line 37 of file Version.

#define OSGEARTH_MINOR_VERSION   1

Definition at line 28 of file Version.

#define OSGEARTH_PATCH_VERSION   1

Definition at line 29 of file Version.

#define OSGEARTH_SOVERSION   0

Definition at line 30 of file Version.

#define OSGEARTH_VERSION   1

Definition at line 21 of file Version.

#define OSGEARTH_VERSION_GREATER_OR_EQUAL (   MAJOR,
  MINOR,
  PATCH 
)    ((OSGEARTH_MAJOR_VERSION>MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION>MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION>=PATCH))))

Definition at line 41 of file Version.

#define OSGEARTH_VERSION_GREATER_THAN (   MAJOR,
  MINOR,
  PATCH 
)    ((OSGEARTH_MAJOR_VERSION>MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION>MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION>PATCH))))

Definition at line 40 of file Version.

#define OSGEARTH_VERSION_LESS_OR_EQUAL (   MAJOR,
  MINOR,
  PATCH 
)    ((OSGEARTH_MAJOR_VERSION<MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION<MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION<=PATCH))))

Definition at line 39 of file Version.

#define OSGEARTH_VERSION_LESS_THAN (   MAJOR,
  MINOR,
  PATCH 
)    ((OSGEARTH_MAJOR_VERSION<MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION<MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION<PATCH))))

Definition at line 38 of file Version.

#define OSGEARTH_VERSION_RELEASE   OSGEARTH_VERSION_PATCH

Definition at line 68 of file Version.

#define OSGEARTH_VERSION_REVISION   0

Definition at line 69 of file Version.


Function Documentation

OSGEARTH_EXPORT const char* osgEarthGetLibraryName ( )

The osgGetLibraryName() method returns the library name in human-friendly form.

Definition at line 61 of file Version.cpp.

{
    return "osgEarth Library";
}

Here is the caller graph for this function:

OSGEARTH_EXPORT const char* osgEarthGetSOVersion ( )

The osgGetSOVersion() method returns the OSGEARTH shared object version number.

Definition at line 48 of file Version.cpp.

{
    static char osgearth_soversion[32];
    static int osgearth_soversion_init = 1;
    if (osgearth_soversion_init)
    {
        sprintf(osgearth_soversion,"%d",OSGEARTH_SOVERSION);
        osgearth_soversion_init = 0;
    }
    
    return osgearth_soversion;
}

Here is the caller graph for this function:

OSGEARTH_EXPORT const char* osgEarthGetVersion ( )

osgEarthGetVersion() returns the library version number. Numbering convention : OSGEARTH-1.0 will return 1.0 from osgEarthGetVersion.

This C function can be also used to check for the existence of the OSGEARTH library using autoconf and its m4 macro AC_CHECK_LIB.

Here is the code to add to your configure.in:

 #
 # Check for the OSGEARTH (OSG) library
 #
 AC_CHECK_LIB(osg, osgEarthGetVersion, ,
    [AC_MSG_ERROR(OSGEARTH library not found. See http://www.osgearth.org)],)
 

Definition at line 27 of file Version.cpp.

{
    static char osgearth_version[256];
    static int osgearth_version_init = 1;
    if (osgearth_version_init)
    {
        if (OSGEARTH_VERSION_REVISION==0)
        {
            sprintf(osgearth_version,"%d.%d.%d",OSGEARTH_MAJOR_VERSION,OSGEARTH_MINOR_VERSION,OSGEARTH_PATCH_VERSION);
        }
        else
        {
            sprintf(osgearth_version,"%d.%d.%d-%d",OSGEARTH_MAJOR_VERSION,OSGEARTH_MINOR_VERSION,OSGEARTH_PATCH_VERSION,OSGEARTH_VERSION_REVISION);
        }

        osgearth_version_init = 0;
    }
    
    return osgearth_version;
}

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines