[ossim-wms] 01/02: Imported Upstream version 1.8.20.3+ds
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Sat Jun 4 00:29:23 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository ossim-wms.
commit 6d36833317620e0813243164de1481081da9862b
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sat Jun 4 00:16:48 2016 +0200
Imported Upstream version 1.8.20.3+ds
---
libwms/AUTHORS.txt | 9 +
libwms/CMakeLists.txt | 39 +
libwms/Doxyfile | 1122 ++++++++++++++++++++
libwms/GNUmakefile.old | 12 +
libwms/LICENSE.txt | 76 ++
libwms/Make/cygwin_plugin_def | 15 +
libwms/Make/dependencies | 9 +
libwms/Make/distrules | 16 +
libwms/Make/dolink.sh | 66 ++
libwms/Make/help.sh | 155 +++
libwms/Make/helprules | 11 +
libwms/Make/instexamplesrc | 107 ++
libwms/Make/instrules | 149 +++
libwms/Make/makedefs | 474 +++++++++
libwms/Make/makedirdefs | 26 +
libwms/Make/makedirrules | 6 +
libwms/Make/makeinnosetup | 152 +++
libwms/Make/makeirixdist | 158 +++
libwms/Make/makepkg | 220 ++++
libwms/Make/makerpms | 200 ++++
libwms/Make/makerules | 197 ++++
libwms/Make/maketoprule | 20 +
libwms/Make/versionrules | 16 +
libwms/README.txt | 28 +
libwms/examples/GNUmakefile | 11 +
libwms/examples/wmscapabilities/GNUmakefile | 18 +
.../examples/wmscapabilities/wmscapabilities.cpp | 58 +
libwms/examples/wmsurl/GNUmakefile | 16 +
libwms/examples/wmsurl/wmsurl.cpp | 29 +
libwms/include/wms/iso8601.h | 65 ++
libwms/include/wms/wms.h | 31 +
libwms/include/wms/wmsCapabilitiesParser.h | 61 ++
libwms/include/wms/wmsCapabilitiesRoot.h | 48 +
libwms/include/wms/wmsCapabilitiesState.h | 488 +++++++++
libwms/include/wms/wmsClient.h | 93 ++
libwms/include/wms/wmsCurlMemoryStream.h | 59 +
libwms/include/wms/wmsExport.h | 57 +
libwms/include/wms/wmsMemoryStream.h | 104 ++
libwms/include/wms/wmsNotify.h | 86 ++
libwms/include/wms/wmsRefPtr.h | 95 ++
libwms/include/wms/wmsReferenced.h | 57 +
libwms/include/wms/wmsStyle.h | 86 ++
libwms/include/wms/wmsUrl.h | 91 ++
libwms/libwms.sln | 19 +
libwms/libwms.vcproj | 302 ++++++
libwms/src/GNUmakefile | 25 +
libwms/src/iso8601.cpp | 363 +++++++
libwms/src/wms.cpp | 45 +
libwms/src/wmsCapabilitiesParser.cpp | 648 +++++++++++
libwms/src/wmsCapabilitiesRoot.cpp | 149 +++
libwms/src/wmsCapabilitiesState.cpp | 297 ++++++
libwms/src/wmsClient.cpp | 244 +++++
libwms/src/wmsCurlMemoryStream.cpp | 215 ++++
libwms/src/wmsMemoryStream.cpp | 279 +++++
libwms/src/wmsNotify.cpp | 359 +++++++
libwms/src/wmsReferenced.cpp | 24 +
libwms/src/wmsStyle.cpp | 30 +
libwms/src/wmsUrl.cpp | 211 ++++
.../xcode/libwms/English.lproj/InfoPlist.strings | Bin 0 -> 204 bytes
libwms/xcode/libwms/Info.plist | 26 +
.../xcode/libwms/libwms.xcodeproj/project.pbxproj | 704 ++++++++++++
libwms/xcode/libwms/libwms_Prefix.pch | 0
62 files changed, 8776 insertions(+)
diff --git a/libwms/AUTHORS.txt b/libwms/AUTHORS.txt
new file mode 100644
index 0000000..752596d
--- /dev/null
+++ b/libwms/AUTHORS.txt
@@ -0,0 +1,9 @@
+// $Id: AUTHORS.txt 9129 2006-06-15 13:06:24Z gpotts $
+Eric Sokolowski
+ Wrote the original wms code that libws is based on.
+
+Garrett Potts
+ Added c++ support ad additional support classes
+
+Norman Vine
+
diff --git a/libwms/CMakeLists.txt b/libwms/CMakeLists.txt
new file mode 100644
index 0000000..b629e6b
--- /dev/null
+++ b/libwms/CMakeLists.txt
@@ -0,0 +1,39 @@
+PROJECT(wms)
+
+INCLUDE(OssimVersion)
+INCLUDE(OssimUtilities)
+INCLUDE(OssimCommonVariables)
+
+IF(NOT APPLE)
+ cmake_minimum_required(VERSION 2.6)
+ELSE(NOT APPLE)
+ cmake_minimum_required(VERSION 2.8)
+ENDIF(NOT APPLE)
+
+find_package(CURL)
+find_package(EXPAT)
+
+MESSAGE( STATUS "CURL_INCLUDE_DIR = ${CURL_INCLUDE_DIR}")
+MESSAGE( STATUS "CURL_LIBRARIES = ${CURL_LIBRARIES}")
+MESSAGE( STATUS "EXPAT_INCLUDE_DIR = ${EXPAT_INCLUDE_DIR}")
+MESSAGE( STATUS "EXPAT_LIBRARIES = ${EXPAT_LIBRARIES}")
+
+################################################## BUILD THE LIBRARY #######################################
+SET(LIB_NAME wms)
+
+INCLUDE_DIRECTORIES(${${PROJECT_NAME}_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(${EXPAT_INCLUDE_DIR})
+
+
+FILE(GLOB WMS_SRCS RELATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
+FILE(GLOB WMS_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/wms/*.h")
+
+SET(INSTALL_INCLUDE_DIR "include/wms")
+
+OSSIM_LINK_LIBRARY(${LIB_NAME} COMPONENT_NAME ossimPredator TYPE "${OSSIM_USER_DEFINED_DYNAMIC_OR_STATIC}" HEADERS ${WMS_HEADERS} SOURCE_FILES ${WMS_SRCS}
+ LIBRARIES ${CURL_LIBRARIES} ${EXPAT_LIBRARIES}
+ INSTALL_LIB INSTALL_HEADERS VERSION_SYMLINKS ADDITIONAL_COMPILE_FLAGS "-DWMS_LIBRARY")
+
+####################################### SETUP THE UNINSTALL #################################
+OSSIM_ADD_COMMON_MAKE_UNINSTALL()
\ No newline at end of file
diff --git a/libwms/Doxyfile b/libwms/Doxyfile
new file mode 100644
index 0000000..536ee48
--- /dev/null
+++ b/libwms/Doxyfile
@@ -0,0 +1,1122 @@
+# Doxyfile 1.3.6
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = "libwms"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER = v1_0_0
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = doc
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch,
+# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en
+# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese,
+# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# This tag can be used to specify the encoding used in the generated output.
+# The encoding is not always determined by the language that is chosen,
+# but also whether or not the output is meant for Windows or non-Windows users.
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
+# forces the Windows encoding (this is the default for the Windows binary),
+# whereas setting the tag to NO uses a Unix-style encoding (the default for
+# all platforms other than Windows).
+
+USE_WINDOWS_ENCODING = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is used
+# as the annotated text. Otherwise, the brief description is used as-is. If left
+# blank, the following values are used ("$name" is automatically replaced with the
+# name of the entity): "The $name class" "The $name widget" "The $name file"
+# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
+# members of a class in the documentation of that class as if those members were
+# ordinary class members. Constructors, destructors and assignment operators of
+# the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. It is allowed to use relative paths in the argument list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member
+# documentation.
+
+DETAILS_AT_TOP = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 4
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
+# only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = src
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
+# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc
+
+FILE_PATTERNS = *.cpp \
+ *.h \
+ *.cc \
+ *.dox
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE = CVS \
+ src/packages \
+ src/gui
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+
+EXCLUDE_PATTERNS = *CVS*
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+
+INPUT_FILTER =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = YES
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = YES
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 4
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX = wms
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = dox
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = YES
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse the
+# parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or
+# super classes. Setting the tag to NO turns the diagrams off. Note that this
+# option is superseded by the HAVE_DOT option below. This is only a fallback. It is
+# recommended to install and use dot, since it yields more powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
+# generate a call dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_WIDTH = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT = 1024
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes that
+# lay further from the root node will be omitted. Note that setting this option to
+# 1 or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that a graph may be further truncated if the graph's image dimensions are
+# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT).
+# If 0 is used for the depth value (the default), the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
diff --git a/libwms/GNUmakefile.old b/libwms/GNUmakefile.old
new file mode 100644
index 0000000..a55b01c
--- /dev/null
+++ b/libwms/GNUmakefile.old
@@ -0,0 +1,12 @@
+TOPDIR = .
+include $(TOPDIR)/Make/makedefs
+include $(TOPDIR)/Make/makedirdefs
+
+DIRS = $(TOP_LEVEL_DIRS)
+
+include $(TOPDIR)/Make/makedirrules
+include $(TOPDIR)/Make/versionrules
+include $(TOPDIR)/Make/instrules
+include $(TOPDIR)/Make/distrules
+include $(TOPDIR)/Make/helprules
+include $(TOPDIR)/Make/maketoprule
diff --git a/libwms/LICENSE.txt b/libwms/LICENSE.txt
new file mode 100644
index 0000000..c57eb30
--- /dev/null
+++ b/libwms/LICENSE.txt
@@ -0,0 +1,76 @@
+ libwms Public License, Version 0.0
+ ==========================================
+
+ Copyright (C) 2004 Garrett Potts.
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this licence document, but changing it is not allowed.
+
+ LIBWMS PUBLIC LICENCE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the libwms Public License (WMSGPL) version 0.0
+ or later.
+
+ Notes: the OSGPL is based on the LGPL, with the 4 exceptions laid in in
+ the wxWindows section below. The LGPL in the final section of this
+ license.
+
+
+-------------------------------------------------------------------------------
+
+ wxWindows Library Licence, Version 3
+ ====================================
+
+ Copyright (C) 1998 Julian Smart, Robert Roebling [, ...]
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this licence document, but changing it is not allowed.
+
+ WXWINDOWS LIBRARY LICENCE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public Licence as published by
+ the Free Software Foundation; either version 2 of the Licence, or (at
+ your option) any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
+ General Public Licence for more details.
+
+ You should have received a copy of the GNU Library General Public Licence
+ along with this software, usually in a file named COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ Boston, MA 02111-1307 USA.
+
+ EXCEPTION NOTICE
+
+ 1. As a special exception, the copyright holders of this library give
+ permission for additional uses of the text contained in this release of
+ the library as licenced under the wxWindows Library Licence, applying
+ either version 3 of the Licence, or (at your option) any later version of
+ the Licence as published by the copyright holders of version 3 of the
+ Licence document.
+
+ 2. The exception is that you may use, copy, link, modify and distribute
+ under the user's own terms, binary object code versions of works based
+ on the Library.
+
+ 3. If you copy code from files distributed under the terms of the GNU
+ General Public Licence or the GNU Library General Public Licence into a
+ copy of this library, as this licence permits, the exception does not
+ apply to the code that you add in this way. To avoid misleading anyone as
+ to the status of such modified files, you must delete this exception
+ notice from such code and/or adjust the licensing conditions notice
+ accordingly.
+
+ 4. If you write modifications of your own for this library, it is your
+ choice whether to permit this exception to apply to your modifications.
+ If you do not wish that, you must delete the exception notice from such
+ code and/or adjust the licensing conditions notice accordingly.
+
+
+------------------------------------------------------------------------------
diff --git a/libwms/Make/cygwin_plugin_def b/libwms/Make/cygwin_plugin_def
new file mode 100644
index 0000000..010d27c
--- /dev/null
+++ b/libwms/Make/cygwin_plugin_def
@@ -0,0 +1,15 @@
+
+#
+# blessed are those who try to make Windows behave like it should ...
+#
+
+ifeq ($(OS),CYGWIN)
+TARGET_BASENAME := $(PLUGIN_PREFIX)$(TARGET_BASENAME)
+PLUGIN_PREFIX := cyg
+endif
+
+ifeq ($(OS),MINGW)
+TARGET_BASENAME := $(PLUGIN_PREFIX)$(TARGET_BASENAME)
+PLUGIN_PREFIX := lib
+endif
+
diff --git a/libwms/Make/dependencies b/libwms/Make/dependencies
new file mode 100644
index 0000000..c9bb116
--- /dev/null
+++ b/libwms/Make/dependencies
@@ -0,0 +1,9 @@
+################################################################
+# Dependency library which have been installed on this system
+
+##########################################
+#
+# For any getCapabilities parsing expat must be installed
+# on your system.
+#
+EXPAT_INSTALLED = yes
diff --git a/libwms/Make/distrules b/libwms/Make/distrules
new file mode 100644
index 0000000..b47b959
--- /dev/null
+++ b/libwms/Make/distrules
@@ -0,0 +1,16 @@
+distribution :
+ @$(MAKEDIST) \
+ $(OS)\
+ $(TOPDIR)\
+ $(INST_LIBS)\
+ $(INST_INCLUDE)\
+ $(INST_EXAMPLES)\
+ $(INST_SRC)\
+ $(INST_EXAMPLE_SRC)\
+ "$(VERSION)-$(VERSION_REVISION)" \
+ $(INST_DOC)
+
+
+
+cleandist:
+ @$(MAKECLEANDIST)
diff --git a/libwms/Make/dolink.sh b/libwms/Make/dolink.sh
new file mode 100644
index 0000000..c071613
--- /dev/null
+++ b/libwms/Make/dolink.sh
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+bye()
+{
+ echo $1
+ exit 1
+}
+
+TOPDIR=$1
+LNSRC=$2
+LNDEST=$3
+LINKCMD=$4
+
+## Check command line
+
+
+[ $# -lt 4 ] && bye "Usage: $0 <Top Directory> <Link Source> <Link Destination> <Link command>"
+
+## Check for existence of link source file
+[ -n "$LNSRC" ] || bye "Internal error (LNSRC definition)"
+
+## Check for existence of link destination file
+[ -n "$LNDEST" ] || bye "Internal error (LNDEST definition)"
+
+if diff -s $TOPDIR/$LNDEST $LNSRC >/dev/null 2>&1
+then
+ echo " =====> $LNSRC and $TOPDIR/$LNDEST are in sync"
+else
+ echo " =====> resetting $TOPDIR/$LNDEST to point to $LNSRC"
+
+ ## At this point, we must create a link at the link destination
+ ## which points back to our link source. This requires us to
+ ## build a path FROM the destination back to the source
+
+ #1) Get the source directory as an absolute path
+ SRCDIR=`pwd`/`dirname $LNSRC`
+
+ #2) Get the destination directory as an absolute path (TOPDIR is
+ ## a relative path from the current directory).
+ cd $TOPDIR
+ ROOTDIR=`pwd`
+ DESTDIR=`dirname "$ROOTDIR"/"$LNDEST"`
+
+ #3) Build a ../../ chain from the destination directory to the
+ ## current directory (ROOTDIR), which will become the prefix to
+ ## the path
+ T=`dirname $LNDEST`
+ while [ "$T" != "." ]
+ do
+ T=`dirname $T`;PFX=../"$PFX"
+ done
+
+ #4) strip the absolute path prefix of SRCDIR leading to the current
+ ## directory, so we are left with the relative path from the current
+ ## directory to the link source directory. Prefix that with PFX.
+ LINK="$PFX"`echo $SRCDIR $ROOTDIR | awk '{ print substr($1,length($2)+2,512) }'`/`basename $LNDEST`
+
+ #5) Create the links by changing to the destination directory,
+ ## removing any old versions of the link and creating a new one
+ [ -d `dirname $LNDEST` ] || mkdir -p `dirname $LNDEST`
+ cd `dirname $LNDEST`
+ rm -f `basename $LNDEST`
+ $LINKCMD $LINK `basename $LNDEST`
+fi
+
+exit 0
diff --git a/libwms/Make/help.sh b/libwms/Make/help.sh
new file mode 100755
index 0000000..9a35cfa
--- /dev/null
+++ b/libwms/Make/help.sh
@@ -0,0 +1,155 @@
+#!/bin/sh
+
+OS=$1
+TOPDIR=$2
+INST_LIBS=$3
+INST_PLUGINS=$4
+INST_INCLUDE=$5
+INST_EXAMPLES=$6
+INST_EXAMPLE_SRC=$7
+INST_DOC=$8
+INST_DATA=$9
+
+
+cat <<- EOF
+
+The following targets can be used with any subsystem as well as the top
+level build (build in the libwms Root directory). Note that debug versions
+and optimized version of targets reside in parallel.
+
+ make - Same as 'make opt'
+ make opt - Makes optimized versions of all targets
+ make debug - Makes debug versions of all targets.
+ make clean - Removes all object files (both optimized and debug
+ versions) and Makedepend files.
+ make cleanopt - Removes optimized version of object files and
+ Makedepend files.
+ make cleandbg - Removes debug version of object files and Makedepend
+ files.
+ make cleandepend - Removes Makedepend file(s) (both optimized and debug
+ versions)
+ make cleandependopt - Removes optimized version Makedepend file(s)
+ make cleandependdbg - Removes debug version Makedepend file(s)
+ make cleantarget - Removes only targets but leaves object files (both
+ optimized and debug versions)
+ make cleantargetopt - Removes only optimized targets but leaves optimized
+ objects files.
+ make cleantargetdbg - Removes only debug targets but leaves debug object
+ files
+ make clobber - Removes object files and targets (both optimized and
+ debug versions)
+ make clobberopt - Removes optimized object files and targets
+ make clobberdbg - Removes debug object files and targets
+ make beautify - Pretty print C++ files
+ make docs - Builds documentation database for current target
+ make depend - Force a rebuild of the dependency file. Note that
+ dependency files are generated automatically during
+ builds.
+
+
+Solaris, IRIX and Linux (some compilers) can build 64 bit targets. These
+require the ARCH=64 argument. For example:
+
+ make ARCH=64 - Same as 'make ARCH=64 opt'
+ make ARCH=64 opt - Builds 64 bit optimized targets
+ make ARCH=64 debug - Builds 64 bit debug versions of targets
+ make ARCH=64 clean - Removes all 64 bit object files (both optimized and
+ debug versions).
+
+ etc.
+
+The following targets may only be issued from the top-level libwms build:
+
+ make install - Install both execution environment and development
+ targets
+ make instbin - Install execution environment targets only. These
+ consist of libraries, plugins and example programs.
+ Libraries are installed in
+ o $INST_LIBS,
+ plugins are installed in
+ o $INST_PLUGINS,
+ and examples are installed in
+ o $INST_EXAMPLES
+ on $OS
+
+ make instdev - Install development targets only. These consist of
+ header files, source code to the example programs, and
+ documentation.
+ Header files are install in
+ o $INST_INCLUDE,
+ example source code is installed in
+ o $INST_EXAMPLE_SRC,
+ and documentation is installed in
+ o $INST_DOC
+ on $OS
+
+ make instlinks - Installs symbolic links at install locations for both
+ execution environment and development targets rather
+ than copyied files. Installing links is ideal for a
+ development environment for avoiding confusion about
+ which binaries are being run or linked to.
+
+ make instlinksbin - Installs symbolic links at install locations for
+ execution environment targets only.
+ make instlinksdev - Installs symbolic links at install locations for
+ development targets only
+ make instclean - Removes installed targets (files or links) from
+ installation locations for both execution environment
+ and development targets
+ make instcleanbin - Removes installed targets from installation locations
+ for execution environment targets only
+ make instcleandev - Removes installed targets from installation locations
+ for defelopment targets only
+
+Note that the following variables can be used to directly override the default
+installation locations for $OS.
+
+ make INST_LIBS=<libs_location> \\
+ INST_PLUGINS=<plugins_location>\\
+ INST_INCLUDE=<header_file_location>\\
+ INST_EXAMPLES=<examples_location>\\
+ INST_EXAMPLE_SRC=<example_src_location>\\
+ INST_DOC=<doc_location>\\
+ install
+
+ - Installs libraries in <libs_location>, plugins in
+ <plugins_location>, header files in
+ <header_file_location>, examples in <examples_location>,
+ example source code in <example_src_location> and
+ documentation in <doc_location>
+
+Note also that INST_LIBS, INST_PLUGINS, INST_INCLUDE, and INST_SHARE share
+a common prefix by default: INST_LOCATION. Further INST_EXAMPLES, INST_EXAMPLE_SRC,
+INST_DOC, and INST_DATA share a common prefix by default : INST_SHARE, which
+is located under INST_LOCATION by default. This provides a short cut for the
+above 'make' usage. For example,
+
+ make INST_LOCATION=/usr/local/libwms \\
+ INST_SHARE=/usr/share/libwms \\
+ install
+
+
+These values can be tested by reissuing 'make help' with these arguments.
+
+After doing a 'make install' or 'make instlinks', and if not already added,
+add
+
+ $INST_EXAMPLES
+
+to your PATH environmental variable to run the examples. If it is not already
+present, add
+
+ $INST_LIBS
+
+and
+
+ $INST_PLUGINS
+
+to your LD_LIBRARY_PATH environmental variable. When compiling programs
+using libwms headers add to your -I compile flags:
+
+ $INST_INCLUDE
+
+EOF
+
+exit 0
diff --git a/libwms/Make/helprules b/libwms/Make/helprules
new file mode 100644
index 0000000..42b210c
--- /dev/null
+++ b/libwms/Make/helprules
@@ -0,0 +1,11 @@
+help:
+ @$(TOPDIR)/Make/help.sh\
+ $(OS)\
+ $(TOPDIR)\
+ $(INST_LIBS)\
+ $(INST_PLUGINS)\
+ $(INST_INCLUDE)\
+ $(INST_DEMOS)\
+ $(INST_DEMO_SRC)\
+ $(INST_DOC)\
+ $(INST_DATA) | more
diff --git a/libwms/Make/instexamplesrc b/libwms/Make/instexamplesrc
new file mode 100755
index 0000000..6c6ad05
--- /dev/null
+++ b/libwms/Make/instexamplesrc
@@ -0,0 +1,107 @@
+#!/bin/sh
+
+TOPDIR=$1
+INST_LIBS=$2
+INST_INCLUDE=$3
+INST_SRC=$4
+INST_EXAMPLE_SRC=$5
+INSTALLCMD=$6
+COMPILER=$7
+OPTF=$8
+shift; shift; shift; shift; shift; shift; shift; shift;
+DEPARG=$1
+LINKARGS=$2
+shift; shift;
+OTHER_LIBS=$1
+MAKE=$2
+
+copy_example_source()
+{
+ for d in `ls $TOPDIR/examples/ | grep -v CVS`
+ do
+ if [ -d $TOPDIR/examples/$d ]
+ then
+ THISDIR=`pwd`
+ cd $TOPDIR/examples/$d
+ [ -d "$INST_EXAMPLE_SRC/$d" ] || mkdir -m 0755 -p $INST_EXAMPLE_SRC/$d
+ echo " installing $d"
+ for f in `$MAKE __instfiles`
+ do
+ src=`echo $f | cut -f1 -d"="`
+ dst=`echo $f | cut -f2 -d"="`
+ if [ -z "$dst" ] ; then dst=$src; fi
+ if [ -f "$src" ] ; then
+ ###echo $INSTALLCMD `pwd`/$src $INST_EXAMPLE_SRC/$d/$dst
+ $INSTALLCMD `pwd`/$src $INST_EXAMPLE_SRC/$d/$dst ;
+ fi
+ done
+ cd $THISDIR
+ fi
+ done
+}
+
+generate_makedefs()
+{
+ cat <<-EOF
+
+TOPDIR ?= ../
+THISDIR = .
+INC = -I$INST_INCLUDE -I./
+DEF = $DEF
+CXXFLAGS = \$(ARCHARGS) $OPTF \$(DEF) \$(INC)
+LDFLAGS = \$(ARCHARGS) $OPTF -L$INST_LIBS $LINKARGS
+OBJS = \$(C++FILES:.cpp=.o) \$(CXXFILES:.cpp=.o) \$(CFILES:.c=.o)
+C++ = $COMPILER
+OTHER_LIBS = $OTHER_LIBS
+VPATH = ..
+
+EOF
+}
+
+
+
+generate_makerules()
+{
+ cat <<-EOF1 | sed 's/TAB/ /'
+
+all : \$(EXEC) \$(LIB) \$(PLUGIN)
+
+\$(EXEC) : Makedepend \$(OBJS)
+TAB\$(C++) \$(LDFLAGS) \$(OBJS) \$(LIBS) -o \$@
+
+\$(LIB) \$(PLUGIN) : \$(OBJS)
+TAB\$(C++) \$(LDFLAGS) \$(SHARED) \$(OBJS) \$(LIBS) -o \$@
+
+clean :
+TABrm -f \$(OBJS) \$(MAKEDEPEND)
+
+clobber : clean
+TABrm -f \$(EXEC) \$(LIB) \$(PLUGIN)
+
+
+Makedepend : \$(CXXFILES) \$(CFILES)
+TAB\$(C++) \$(INC) $DEPARG \$? > \$@
+
+
+.SUFFIXES: .cpp .o
+.cpp.o:
+TAB\$(C++) \$(CXXFLAGS) -c $<
+
+sinclude Makedepend
+
+EOF1
+}
+
+
+[ -d $INST_SRC/Make ] || mkdir -m 0755 -p $INST_SRC/Make
+
+echo =========== Installing Example Source Code =================
+
+echo " generating make files ..."
+generate_makedefs > $INST_SRC/Make/makedefs
+generate_makerules > $INST_SRC/Make/makerules
+
+echo " copying example files ..."
+copy_example_source
+
+exit 0
diff --git a/libwms/Make/instrules b/libwms/Make/instrules
new file mode 100644
index 0000000..6f243dd
--- /dev/null
+++ b/libwms/Make/instrules
@@ -0,0 +1,149 @@
+install :
+ @rm -f $(INSTLOGFILE)
+ @$(MAKE) __instbin __instdev
+ @cat $(INSTLOGFILE)
+
+instbin instdev :
+ @$(MAKE) __$@
+
+__instbin:
+ @$(MAKE) INSTSRC=$(TOPDIR)/bin/$(OS)$(ARCH) INSTDEST=$(INST_EXAMPLES) \
+ INSTALL?="$(INSTBINCMD)" __install
+ @$(MAKE) INSTSRC=$(TOPDIR)/lib/$(OS)$(ARCH) INSTDEST=$(INST_LIBS) \
+ INSTALL?="$(INSTBINCMD)" __install
+ @echo >> $(INSTLOGFILE)
+ @echo " Run-time environment installation successful. Add " \
+ >> $(INSTLOGFILE)
+ @echo " $(INST_EXAMPLES)" \
+ >> $(INSTLOGFILE)
+ @echo " to your PATH environmental variable, and" \
+ >> $(INSTLOGFILE)
+ @echo " $(INST_LIBS) and $(INST_PLUGINS)" \
+ >> $(INSTLOGFILE)
+ @echo " to your LD_LIBRARY_PATH if not already present." \
+ >> $(INSTLOGFILE)
+ @echo >> $(INSTLOGFILE)
+
+
+__instdev:
+ @for d in `ls -1 $(TOPDIR)/include/ | grep -v CVS`; \
+ do \
+ if [ -d $(TOPDIR)/include/$$d ]; \
+ then \
+ $(MAKE) INSTSRC=$(TOPDIR)/include/$$d INSTDEST=$(INST_INCLUDE)/$$d \
+ INSTALL?="$(INSTDEVCMD)" __install; \
+ fi \
+ done
+ @$(TOPDIR)/Make/instexamplesrc \
+ $(TOPDIR) \
+ $(INST_LIBS) \
+ $(INST_INCLUDE) \
+ $(INST_SRC) \
+ $(INST_EXAMPLE_SRC) \
+ "$(INSTDEVCMD)" \
+ "$(C++)" \
+ "$(OPTF)" \
+ "$(DEPARG)" \
+ "$(LINKARGS)" \
+ "$(OTHER_LIBS)" \
+ $(MAKE) \
+
+
+ @echo \
+ >> $(INSTLOGFILE)
+ @echo " Development environment installation successful. Add" \
+ >> $(INSTLOGFILE)
+ @echo " -I$(INST_INCLUDE)" \
+ >> $(INSTLOGFILE)
+ @echo " compile flag when compiling with libwms header files." \
+ >> $(INSTLOGFILE)
+ @echo " Example programs can be found at $(INST_EXAMPLE_SRC)." \
+ >> $(INSTLOGFILE)
+ @echo >> $(INSTLOGFILE)
+
+instlinks :
+ @rm -f $(INSTLOGFILE)
+ $(MAKE) INSTBINCMD="$(INSTLINKBINCMD)" __instbin
+ $(MAKE) INSTDEVCMD="$(INSTLINKDEVCMD)" __instdev
+ @cat $(INSTLOGFILE)
+
+instlinksbin :
+ @rm -f $(INSTLOGFILE)
+ $(MAKE) INSTBINCMD="$(INSTLINKBINCMD)" __instbin
+ @cat $(INSTLOGFILE)
+
+instlinksdev :
+ @rm -f $(INSTLOGFILE)
+ @$(MAKE) INSTDEVCMD="$(INSTLINKDEVCMD)" __instdev
+ @cat $(INSTLOGFILE)
+
+
+instclean : instcleanbin instcleandev
+
+instcleanbin :
+ @$(MAKE) INSTSRC=$(TOPDIR)/bin/$(OS)$(ARCH) INSTDEST=$(INST_EXAMPLES) \
+ INSTALL?="$(INSTBINCMD)" __instclean
+ @$(MAKE) INSTSRC=$(TOPDIR)/lib/$(OS)$(ARCH) INSTDEST=$(INST_LIBS) \
+ INSTALL?="$(INSTBINCMD)" __instclean
+
+instcleandev :
+ @for d in `ls -1 $(TOPDIR)/include/ | grep -v CVS`; \
+ do \
+ if [ -d $(TOPDIR)/include/$$d ]; \
+ then \
+ $(MAKE) INSTSRC=$(TOPDIR)/include/$$d INSTDEST=$(INST_INCLUDE)/$$d \
+ INSTALL?="$(INSTDEVCMD)" __instclean; \
+ fi \
+ done
+ @for d in `ls -1 $(TOPDIR)/examples | grep -v CVS`; \
+ do \
+ if [ -d $(TOPDIR)/examples/$$d ]; \
+ then \
+ $(MAKE) INSTSRC=$(TOPDIR)/examples/$$d INSTDEST=$(INST_EXAMPLE_SRC)/$$d \
+ INSTALL?="$(INSTDEVCMD)" __instclean; \
+ fi \
+ done
+
+__install :
+ @[ -n "$(INSTSRC)" ] || echo "Internal error (INSTSRC definition)"
+ @[ -n "$(INSTSRC)" ] && echo > /dev/null
+ @[ -n "$(INSTDEST)" ] || echo "Internal error (INSTDEST) definition)"
+ @[ -n "$(INSTDEST)" ] && echo > /dev/null
+ @[ -d $(INSTDEST) ] || mkdir -p $(INSTDEST)
+ @cd $(INSTSRC); \
+ THISDIR=`pwd`; \
+ if [ -n "`ls -1 | grep -v CVS`" ]; then \
+ for f in `ls -1 | grep -v CVS`; \
+ do \
+ if [ -f $$f ] ; \
+ then \
+ INSTPATH=$$THISDIR/$$f; \
+ $(INSTALL) $$INSTPATH $(INSTDEST)/$$f; \
+ fi \
+ done \
+ fi
+
+__instclean :
+ @[ -n "$(INSTSRC)" ] || echo "Internal error (INSTSRC definition)"
+ @[ -n "$(INSTSRC)" ] && echo > /dev/null
+ @[ -n "$(INSTDEST)" ] || echo "Internal error (INSTDEST definition)"
+ @[ -n "$(INSTDEST)" ] && echo > /dev/null
+ @if [ -d $(INSTDEST) ] ; \
+ then \
+ cd $(INSTSRC); \
+ if [ -n "`ls -1 | grep -v CVS`" ]; then \
+ for f in `ls -1 | grep -v CVS`; \
+ do \
+ if [ -f $$f ] ; \
+ then \
+ echo "rm -f $(INSTDEST)/$$f"; \
+ rm -f $(INSTDEST)/$$f; \
+ fi \
+ done \
+ fi; \
+ empty=`ls $(INSTDEST)`; \
+ if [ -z "$$empty" ]; \
+ then \
+ rm -rf $(INSTDEST); \
+ fi \
+ fi
diff --git a/libwms/Make/makedefs b/libwms/Make/makedefs
new file mode 100644
index 0000000..d8e3cf3
--- /dev/null
+++ b/libwms/Make/makedefs
@@ -0,0 +1,474 @@
+SHELL = /bin/sh
+OS := $(shell uname)
+
+include $(TOPDIR)/Make/dependencies
+
+## We don't care about architectural distinguishers in the OS
+## such as IRIX64, IRIX32, etc. so we truncate IRIX?? to IRIX
+ifeq ($(findstring IRIX,$(OS)),IRIX)
+OS := IRIX
+endif
+
+## Make CYGWIN_XXXX CYGWIN so it's "Windows cross platform" :)
+ifeq ($(findstring CYGWIN,$(OS)),CYGWIN)
+OS := CYGWIN
+#OS := MINGW
+endif
+
+## Make MINGW_XXXX MINGW so it's "Windows cross platform" :)
+ifeq ($(findstring MINGW,$(OS)),MINGW)
+OS := MINGW
+endif
+
+# TOPDIR needs to be redefined for every GNUmakefile
+TOPDIR ?= ../
+THISDIR = .
+MAKEDEPEND = ignore
+
+#######################################################################
+##
+## VERSIONING SEMANTICS
+##
+## Version consistes of <major> . <minor> . <release> - <revision>
+## Where:
+## major : Production (0 = pre-production)
+## minor : 0-7 = Production minor, 8 = Alpha, 9 = Beta
+## release : Release tag
+## revision: Release revision - 0 = development (cutting edge).
+##
+## Usage:
+## Default - VERSION_REVISION is set to the value defined here
+## Env variable WMS_VERSION_REVISION overrides default
+## e.g.:
+## % setenv WMS_VERSION_REVISION 5
+## % make version
+## Command line overrides env variable
+## % make VERSION_REVISION=
+#######################################################################
+VERSION_MAJOR = 1
+VERSION_MINOR = 0
+VERSION_RELEASE = 0
+VERSION_REVISION ?= 0
+VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
+
+INC = -I$(TOPDIR)/include
+
+############################################################################
+## NOTE - Semantics for the use of ARCH, ARCHARGS, and ARCHINST parameters
+## ARCH - must be defined if the OS supports both 64 and 32 bit
+## architectures may remain undefined if it does not.
+## ARCHARGS - Compiler directives to indicate for which architecture
+## to build for
+## ARCHINST - Installation target directory. Define if the OS supports
+## more than one architecture (32 and 64).
+## for ARCH=32 - define ARCHINST only if the system uses an
+## extension on 'lib' to indicate 32 bit. e.g.
+## IRIX defines /usr/lib32
+## for ARCH=64 - Always define ARCHINST. Even if the OS
+## doesn't make a distinction, we will.
+############################################################################
+
+CXXFLAGS = $(ARCHARGS) $(DOF) $(DEF) $(INC)
+LDFLAGS = $(ARCHARGS) $(DOF) $(LINKARGS) -L$(TOPDIR)/lib/$(OS)$(ARCH)
+OBJS = $(C++FILES:.cpp=.o) \
+ $(CXXFILES:.cpp=.o) \
+ $(CFILES:.c=.o) \
+
+EXE_EXT =
+
+DOF = $(OPTF)
+DEBUGDIR = $(OS)$(ARCH).Debug
+OPTDIR = $(OS)$(ARCH).Opt
+BININST = bin
+LIBINST = lib
+
+ifeq ("$(INST_LOCATION)","")
+INST_LOCATION = /usr/local
+endif
+INST_LIBS = $(INST_LOCATION)/lib$(ARCHINST)
+INST_INCLUDE = $(INST_LOCATION)/include
+INST_SHARE = $(INST_LOCATION)/share
+INST_EXAMPLES = $(INST_LOCATION)/bin
+INST_SRC = $(INST_SHARE)/libwms/src
+INST_EXAMPLE_SRC = $(INST_SRC)/examples
+INST_DOC = $(INST_SHARE)/libwms/doc
+INST_DATA = $(INST_SHARE)/libwms/data
+LINK = ln -sf
+INSTBINCMD = install -m 755
+INSTDEVCMD = install -m 644
+INSTLINKBINCMD = $(LINK)
+INSTLINKDEVCMD = $(LINK)
+LIB_PREFIX = lib
+LIB_EXT = so
+PLUGIN_EXT = so
+MAKEDIST = echo " === Distribution build is not implemented yet for $(OS)"; printf "\n"
+INSTLOGFILE = /tmp/.wms_inst_log
+
+
+RECURSIVE_TARGETS = \
+ opt\
+ debug\
+ clean\
+ cleandepend\
+ cleandependopt\
+ cleandependdbg\
+ cleandbg\
+ cleanopt\
+ cleantarget\
+ cleantargetopt\
+ cleantargetdbg\
+ clobber\
+ clobberdbg\
+ clobberopt\
+ cleantmp\
+ docs\
+ depend
+
+#### SUN OS Specific definitions
+ifeq ($(OS),SunOS)
+ ifeq ($(COMPILER),)
+ COMPILER=gnu
+ endif
+LDFLAGS += -L/usr/local/lib
+ #### if useing g++ on a sun
+ ifeq ($(COMPILER),gnu)
+ C++ = g++
+ DEPARG = -M
+ INC += -I/usr/local/include
+ DEF += -W -Wall -fPIC -fpermissive
+ OPTF = -O2
+ DBGF = -g
+ SHARED = -shared -fPIC
+ ARCH = 32
+ ifeq ($(ARCH),64)
+ ARCHARGS = -m64 -DARCH64
+ ARCHINST = 64
+ else
+ ARCHARGS =
+ endif
+ OTHER_LIBS = -L/usr/local/lib -lexpat -lcurl
+
+ #### using forte compilers (default)
+ else
+ C++ = CC
+ DEPARG = -xM1
+ INC +=
+ DEF += -features=extensions -w
+ OPTF = -xO4
+ DBGF = -g
+ SHARED = -G
+ ARCH = 32
+ ifeq ($(ARCH),64)
+ ARCHARGS = -xarch=v9 -DARCH64
+ ARCHINST = 64
+ else
+ ARCHARGS =
+ ARCHINST =
+ endif
+ OTHER_LIBS = -L/usr/local/lib -lCstd -lexpat -lcurl
+ LINKARGS =
+ endif
+ DYNAMICLIBRARYLIB = -ldl
+ SOCKET_LIBS = -lsocket -lnsl
+ INSTBINCMD = cp
+ INSTDEVCMD = cp
+ INST_LOCATION = /usr/local
+ MAKEDIST = $(TOPDIR)/Make/makepkg
+ OTHER_LIBS = -lexpat -lcurl
+endif
+
+#### IRIX Specific definitions
+ifeq ($(OS),IRIX)
+ CXX = CC
+ ifeq ($(CXX),CC)
+ LINKARGS = -L${TOPDIR}/lib -LANG:std -OPT:Olimit=0
+ C++ = CC
+ DEPARG = -M
+ INC += -I${TOPDIR}/include -I/usr/freeware/include
+ DEF += -LANG:std -OPT:Olimit=0 \
+ -DEBUG:woff=1681 -DEBUG:woff=1682 -DEBUG:woff=3303\
+ -MDupdate $(MAKEDEPEND)
+ OPTF = -O2
+ DBGF = -g
+ SHARED = -shared
+ PFLIBS = \
+ -lpf3ds -lpfdem -lpfdted -lpfdwb -lpfdxf -lpfevt \
+ -lpfflt -lpfgds -lpfgfo -lpfim -lpflsa -lpflsb \
+ -lpfnff -lpfobj -lpfpegg -lpfpfb -lpfphd -lpfpts \
+ -lpfrot -lpfscale -lpfsgf -lpfsgo -lpfsphere -lpfsv \
+ -lpftri -lpfunc -lpfvct -lpfdu -lpfutil -lpf -all -limage
+ ARCH = 32
+ ifeq ($(ARCH),64)
+ ARCHARGS = -64 -DARCH64
+ ARCHINST = 64
+ LINKARGS += -L/usr/freeware/lib64
+ PF_XTRA_LIBS = -L/usr/lib64/libpfdb -rpath /usr/lib64/libpfdb \
+ $(PFLIBS)
+ else
+ ARCHARGS = -n32
+ ARCHINST = 32
+ LINKARGS += -L/usr/freeware/lib32
+ PF_XTRA_LIBS = -L/usr/lib32/libpfdb -rpath /usr/lib32/libpfdb \
+ $(PFLIBS)
+ endif
+ else
+ LIBS = -lstdc++
+ LINKARGS = -L${TOPDIR}/lib
+ C++ = g++
+ INC += -I${TOPDIR}/include -I/usr/freeware/include
+ DEF += -fPIC -W -Wno-unused
+ OPTF = -O2
+ DBGF = -g -gstabs+
+ SHARED = -shared
+ PFLIBS = \
+ -lpf3ds -lpfdem -lpfdted -lpfdwb -lpfdxf -lpfevt \
+ -lpfflt -lpfgds -lpfgfo -lpfim -lpflsa -lpflsb \
+ -lpfnff -lpfobj -lpfpegg -lpfpfb -lpfphd -lpfpts \
+ -lpfrot -lpfscale -lpfsgf -lpfsgo -lpfsphere -lpfsv \
+ -lpftri -lpfunc -lpfvct -lpfdu -lpfutil -lpf -all -limage
+ ARCH = 32
+ ifeq ($(ARCH),64)
+ ARCHARGS = -mabi=64 -mips4 -DARCH64
+ ARCHINST = 64
+ LINKARGS += -L/usr/freeware/lib64
+ PF_XTRA_LIBS = -L/usr/lib64/libpfdb -rpath /usr/lib64/libpfdb \
+ $(PFLIBS)
+ else
+ ARCHARGS = -mabi=n32 -mips4
+ ARCHINST = 32
+ LINKARGS += -L/usr/freeware/lib32
+ PF_XTRA_LIBS = -L/usr/lib32/libpfdb -rpath /usr/lib32/libpfdb \
+ $(PFLIBS)
+ endif
+ endif
+
+ DYNAMICLIBRARYLIB =
+ OTHER_LIBS = -lm -lexpat -lcurl
+ MAKEDIST = $(TOPDIR)/Make/makeirixdist
+
+endif
+
+#### Linux specific definitions
+
+ifeq ($(OS),Linux)
+
+ ifeq (x$(CXX),x)
+ C++ = g++
+ else
+ C++ = $(CXX)
+ endif
+
+ DEPARG = -M
+ INC +=
+
+ ifeq ($(COMPILER),intel)
+ C++ = ecc
+ LIBS = -lgcc_s
+ DEF += -KPIC
+ OPTF = -O2
+ DBGF = -g
+ ifeq ($(SYSARCH),ia64)
+ ARCHARGS =
+ ARCH = IA64
+ ARCHINST = IA64
+ else
+ ARCHARGS =
+ ARCH = 32
+ ARCHINST =
+ endif
+ else
+ LIBS = -lstdc++
+ DEF += -W -Wall -fPIC
+ OPTF = -O2
+ DBGF = -g -gstabs+
+ SYSARCH := $(shell arch)
+ ifeq ($(SYSARCH),x86_64)
+ ARCHARGS =
+ ARCH = 64
+ ARCHINST = 64
+ else
+ ARCHARGS =
+ ARCH = 32
+ ARCHINST =
+ endif
+ endif
+
+
+ SHARED = -shared
+ DYNAMICLIBRARYLIB = -ldl
+ PF_XTRA_LIBS = -L/usr/lib/libpfdb -Xlinker -rpath /usr/lib/libpfdb \
+ -lpfdu -lpfutil -lpf
+ SOCKET_LIBS =
+ OTHER_LIBS = -lexpat -lcurl
+ MAKEDIST = $(TOPDIR)/Make/makerpms
+endif
+
+#### FreeBSD specific definitions
+ifeq ($(OS),FreeBSD)
+ C++ = g++
+ DEPARG = -MM
+ INC += -I/usr/local/include
+ DEF += -W -Wall
+ OPTF = -O2
+ DBGF = -g
+ SHARED = -shared
+ ARCH =
+ ARCHINST =
+ ARCHARGS =
+ LINKARGS = -L/usr/local/lib -rpath /usr/local/lib
+ DYNAMICLIBRARYLIB =
+ SOCKET_LIBS =
+ OTHER_LIBS = -lexpat -lcurl
+endif
+
+#### MacOS X specific definitions
+ifeq ($(OS),Darwin)
+ ifeq (x$(CXX),x)
+ C++ = g++
+ else
+ C++ = $(CXX)
+ endif
+ INC += -I/usr/x11R6/include -I/opt/local/include
+ LDFLAGS += -L/usr/X11R6/lib -L/sw/lib -L/opt/local/lib
+ DEF += -Wall
+ OPTF = -O2
+ DBGF = -g
+ DEPARG = -M $(DEF)
+ SHARED = -dynamic
+ ARCH = 32
+ ARCHINST =
+ ARCHARGS =
+ LINKARGS =
+ DYNAMICLIBRARYLIB =
+ CARBON_LIB = -framework Carbon
+ OTHER_LIBS = -lm -lstdc++ -lexpat -lcurl
+ LIB_EXT = dylib
+ LIBVERSION = -current_version $(VERSION) \
+ -compatibility_version \
+ $(VERSION_MAJOR).$(VERSION_MINOR).0
+
+ ifeq ($(DARWIN_QUICKTIME),yes)
+ DEF += -DDARWIN_QUICKTIME
+ endif
+
+ QUICKTIME = -framework QuickTime $(CARBON_LIB)
+
+endif
+
+#### Cygwin specific definitions
+ifeq ($(OS),CYGWIN)
+ C++ = c++
+ DEPARG = -M
+ INC +=
+ DEF += -DWIN32 -W -Wall -DNOMINMAX
+ OPTF = -O2
+ DBGF = -g
+ SHARED = -shared\
+ -Wl,--out-implib,$(TOPDIR)/lib/$(OS)/lib$(TARGET_BASENAME).dll.a -Wl,--export-all-symbols
+
+ EXE_EXT =.exe
+ ARCH =
+ ARCHINST =
+ ARCHARGS =
+ LINKARGS = -W -Wall
+ DYNAMICLIBRARYLIB =
+ SOCKET_LIBS =
+ OTHER_LIBS = -lexpat `curl-config --libs`
+
+ LIBINST = bin
+ PLUGININST = bin/$(OS)$(ARCH)
+
+ LIB_PREFIX = cyg
+ LIB_EXT = dll
+ PLUGIN_EXT = dll
+ LINK = cp -f
+ INST_LOCATION = /usr/local
+ INST_LIBS = $(INST_LOCATION)/bin
+ INST_PLUGINS = $(INST_LOCATION)/bin
+ INST_INCLUDE = $(INST_LOCATION)/include
+ INST_SHARE_PREFIX = /usr/local
+ INST_SRC = $(INST_SHARE_PREFIX)/src
+ INST_EXAMPLES = $(INST_SHARE_PREFIX)/bin
+ INST_EXAMPLE_SRC = $(INST_SHARE_PREFIX)/src/demos
+ INST_DOC = $(INST_SHARE_PREFIX)/doc
+ INST_DATA = $(INST_SHARE_PREFIX)/data
+ MAKEDIST = $(TOPDIR)/Make/makeinnosetup
+endif
+
+#### Mingw specific definitions
+ifeq ($(OS),MINGW)
+ C++ = c++ -mthreads
+ DEPARG = -M
+ INC += -I/usr/local/include
+ DEF += -DWIN32 -Wall
+# -W
+ OPTF = -O2
+ DBGF = -g
+ SHARED = -shared -mthreads \
+ -Wl,--out-implib,$(TOPDIR)/lib/$(OS)/lib$(TARGET_BASENAME).dll.a -Wl,--export-all-symbols
+
+ EXE_EXT =.exe
+ ARCH =
+ ARCHINST =
+ ARCHARGS =
+ LINKARGS = -W -Wall
+ DYNAMICLIBRARYLIB =
+ OTHER_LIBS = -L/usr/local/lib -lexpat `curl-config --libs`
+
+ LIBINST = bin
+ PLUGININST = bin/$(OS)$(ARCH)
+
+ LIB_PREFIX = lib
+ LIB_EXT = dll
+ PLUGIN_EXT = dll
+ LINK = cp -f
+ INST_LOCATION = /usr/local
+ INST_LIBS = $(INST_LOCATION)/bin
+ INST_PLUGINS = $(INST_LOCATION)/bin
+ INST_INCLUDE = $(INST_LOCATION)/include
+ INST_SHARE_PREFIX = /usr/local
+ INST_SRC = $(INST_SHARE_PREFIX)/src
+ INST_EXAMPLES = $(INST_SHARE_PREFIX)/bin
+ INST_EXAMPLE_SRC = $(INST_SHARE_PREFIX)/src/examples
+ INST_DOC = $(INST_SHARE_PREFIX)/doc
+ INST_DATA = $(INST_SHARE_PREFIX)/data
+endif
+
+#### HP-UX Specific definitions
+# contributed by tino.schwarze at informatik.tu-chemnitz.de
+
+ifeq ($(OS),HP-UX)
+
+ C++ = g++
+ DEPARG = -M
+ INC +=
+ DEF += -W -Wall -fPIC
+ OPTF = -O2
+ # gcc 3.1 uses DWARF as default, my GDB might not yet support this...
+ # at least I've got problems everywhere
+ DBGF = -g -gstabs+
+ SHARED = -shared -fPIC
+ ARCH = 32
+ifeq ($(ARCH),64)
+ # not yet tested
+ ARCHARGS = -march=2.0 -DARCH64
+ ARCHINST = 64
+else
+ # at least my gcc 3.1 defaults to HP-PA RISC 1.1
+ ARCHARGS =
+ ARCHINST =
+endif
+ LINKARGS =
+ LIB_EXT = sl
+ PLUGIN_EXT = sl
+ DYNAMICLIBRARYLIB = -ldld
+ SOCKET_LIBS =
+ # make sure that global constructors/destructors are called upon
+ # shl_load() / shl_unload() - this is a gcc specific workaround
+ OTHER_LIBS = -lm -Wl,+init -Wl,_GLOBAL__DI -Wl,+fini -Wl,_GLOBAL__DD -lexpat -lcurl
+
+endif
+
+VPATH=..
+
+DBGF += -DWMS_DEBUG
diff --git a/libwms/Make/makedirdefs b/libwms/Make/makedirdefs
new file mode 100644
index 0000000..2d07eba
--- /dev/null
+++ b/libwms/Make/makedirdefs
@@ -0,0 +1,26 @@
+
+################################################################
+# Directories traversed from the top level
+TOP_LEVEL_DIRS = \
+ src \
+ examples
+
+
+################################################################
+# Directories traversed in the TOPDIR/src directory
+SRC_DIRS =
+
+
+SRC_DIRS += \
+ ../examples
+
+################################################################
+# Directories traversed in the TOPDIR/src/osgPlugins directory
+
+PLUGIN_DIRS =
+
+
+EXAMPLE_DIRS = \
+ wmscapabilities \
+ wmsurl
+
diff --git a/libwms/Make/makedirrules b/libwms/Make/makedirrules
new file mode 100644
index 0000000..68056f5
--- /dev/null
+++ b/libwms/Make/makedirrules
@@ -0,0 +1,6 @@
+
+default : $(DIRS)
+ @for f in $(DIRS); do echo "Entering directory $$f"; cd $$f; $(MAKE) $@ || exit 1; cd ..; done
+
+$(RECURSIVE_TARGETS) : $(DIRS)
+ @for f in $(DIRS); do echo "Entering directory $$f"; cd $$f; $(MAKE) $@ || exit 1; cd ..; done
diff --git a/libwms/Make/makeinnosetup b/libwms/Make/makeinnosetup
new file mode 100755
index 0000000..88ab159
--- /dev/null
+++ b/libwms/Make/makeinnosetup
@@ -0,0 +1,152 @@
+#!/bin/sh
+
+VERSION=`make -s version`
+
+print_header()
+{
+ cat <<- EOF
+[Setup]
+AppName=Open Scene Graph
+AppVerName=Open Scene Graph $VERSION
+AppPublisher=OpenSceneGraph
+AppPublisherURL=http://www.openscenegraph.com
+AppSupportURL=http://www.openscenegraph.com
+AppUpdatesURL=http://www.openscenegraph.com
+DefaultDirName={pf}\OpenSceneGraph
+DisableDirPage=yes
+DefaultGroupName=OpenSceneGraph
+DisableProgramGroupPage=yes
+LicenseFile=LICENSE.txt
+EOF
+}
+
+# Usage:
+# do_dir $DIR
+#
+
+print_file_entry()
+{
+ DIR=$1
+ FILE=$2
+ printf "Source: \"%s\\\%s\"; DestDir: \"{app}\\\%s\\\"; Flags: ignoreversion\n"\
+ $DIR $FILE $DIR
+
+}
+
+do_dir()
+{
+ DIR=$1
+ shift;
+
+ DOS_DIR=`echo $DIR | sed 's/\\//\\\/g'`
+
+ if [ $# -gt 0 ]
+ then
+ while [ $# -gt 0 ]
+ do
+ match=$1
+ shift;
+ for f in `find $DIR -type f | \
+ grep -v CVS | \
+ grep osg |
+ grep "$match"`
+ do
+ print_file_entry $DOS_DIR `basename $f`
+ done
+ done
+ else
+ for f in `find $DIR -type f | grep -v CVS | grep osg`
+ do
+ print_file_entry $DOS_DIR `basename $f`
+ done
+
+ fi
+}
+
+print_files()
+{
+ echo "[Files]"
+
+ do_dir lib .lib
+ do_dir bin .exe .dll
+ for dir in `ls -1 include | grep osg | grep -v CVS`
+ do
+ do_dir include/"$dir"
+ done
+}
+
+print_script()
+{
+ print_header
+ print_files
+}
+
+BUILD_ISS=1
+BUILD_DISTRIBUTION=1
+CLEAN_UP=1
+
+while [ $# -gt 0 ]
+do
+ case $1 in
+ -c )
+ BUILD_ISS=0
+ BUILD_DISTRIBUTION=0
+ CLEAN_UP=1
+ ;;
+
+ -d )
+ BUILD_ISS=0
+ BUILD_DISTRIBUTION=1
+ CLEAN_UP=0
+ ;;
+
+ -n )
+ CLEAN_UP=0
+ ;;
+
+ -s )
+ BUILD_ISS=1
+ BUILD_DISTRIBUTION=0
+ CLEAN_UP=0
+ ;;
+ esac
+
+ shift;
+done
+
+if [ $BUILD_ISS = 1 ]
+then
+ echo Building Inno Setup script ....
+ rm -f osg.iss
+
+ print_script | awk '{ printf "%s\r\n", $0 }' > osg.iss
+fi
+
+if [ $BUILD_DISTRIBUTION = 1 ]
+then
+ echo Building distribution ...
+ OS=`uname | cut -b1-6`
+
+ if [ "$OS" = "CYGWIN" ]
+ then
+ C:/Program\ Files/Inno\ Setup\ 3/iscc.exe osg.iss
+ [ -d dist/Win32 ] || mkdir -p dist/Win32
+ mv Output/setup.exe dist/Win32/OpenSceneGraph_"$VERSION"_setup.exe
+ rm -rf Output
+ else
+ echo " Distribution may only be built under Cygwin with Inno Setup"
+ fi
+fi
+
+if [ $CLEAN_UP = 1 ]
+then
+ echo Cleaning up...
+ rm -f osg.iss
+fi
+
+
+
+
+
+
+
diff --git a/libwms/Make/makeirixdist b/libwms/Make/makeirixdist
new file mode 100755
index 0000000..5340687
--- /dev/null
+++ b/libwms/Make/makeirixdist
@@ -0,0 +1,158 @@
+#!/bin/sh
+
+echo_idb()
+{
+
+## EOE
+ #####################################################################
+ # Capture bin directory
+
+ dd=`echo $INST_EXAMPLES | sed -e 's/\///'`
+ echo d 0755 root sys $dd $dd osg.eoe.sw
+ cd bin
+ for f in `find . -type l -print | grep -v CVS | sed -e 's/\.\///' | grep -v "\."`
+ do
+ echo f 0755 root sys $dd/$f $dd/$f osg.eoe.sw
+ done
+ cd ..
+
+ #####################################################################
+ # Capture lib and lib/osgPlugins directory
+
+ dd=`echo $INST_LIBS | sed -e 's/\///'`
+ echo d 0755 root sys $dd $dd osg.eoe.sw
+ echo d 0755 root sys $dd/osgPlugins $dd/osgPlugins osg.eoe.sw
+ cd lib
+ for f in `find . -type l -print | grep -v CVS | sed -e 's/\.\///' `
+ do
+ echo f 0755 root sys $dd/$f $dd/$f osg.eoe.sw
+ done
+ cd ..
+
+## DEV
+ #####################################################################
+ # Capture include directories and files
+ dd=`echo $INST_INCLUDE | sed -e 's/\///'`
+
+ cd include
+
+ echo d 0755 root sys $dd $dd osg.dev.sw
+ for d in `find . -type d -print | grep -v CVS | sed -e 's/\.\///' | grep -v "\."`
+ do
+ echo d 0755 root sys $dd/$d $dd/$d osg.dev.sw
+ done
+ cd ..
+
+ #####################################################################
+ # Capture installed example source
+
+ dd=`echo $INST_SRC | sed -e 's/\///'`
+ THISDIR=`pwd`
+ cd $INST_SRC
+ for d in `find . -type d -print | sed -e 's/\.\///' | grep -v "\." `
+ do
+ echo d 0755 root sys $dd/$d $dd/$d osg.dev.sw
+ done
+ for f in `find . -type f -print | sed -e 's/\.\///'`
+ do
+ echo f 0755 root sys $dd/$f $dd/$f osg.dev.sw
+ done
+ cd $THISDIR
+}
+
+make_idb()
+{
+ echo_idb | sort -k5
+}
+
+make_spec()
+{
+ cat <<- SPEC_EOF
+product osg
+ id "Open Scene Graph `bin/osgversion`"
+ image eoe
+ id "Open Scene Graph `bin/osgversion` Run-Time Environment"
+ version `bin/osgversion`
+ order 9999
+ subsys sw default
+ id "Open Scene Graph `bin/osgversion` Run-Time Environment"
+ replaces self
+ exp osg.eoe.sw
+ endsubsys
+ endimage
+ image dev
+ id "Open Scene Graph `bin/osgversion` Development Environment"
+ version `bin/osgversion`
+ order 9999
+ subsys sw default
+ id "Open Scene Graph `bin/osgversion` Development Environment"
+ replaces self
+ exp osg.dev.sw
+ endsubsys
+ endimage
+endproduct
+SPEC_EOF
+}
+
+intro()
+{
+ echo; echo;
+ echo "============ Building the $OS Distribution Package ==================="
+ echo ""
+ echo " Please note that this script requires that"
+ echo
+ echo " 'make install' "
+ echo
+ echo " be previously run. Please run "
+ echo
+ echo " 'make distribution' "
+ echo
+ echo " with the same arguments (if any) as 'make install'"
+ echo
+ repeat=1
+ while [ $repeat = 1 ]
+ do
+ printf " Continue? (y/n) [y]: "
+ read resp
+ case $resp in
+ ""|Yes|YES|yes|Y|y) repeat=0 ;;
+ n|N|no|NO) return 1; repeat=0;;
+ *) repeat=1;;
+ esac
+ done
+
+ return 0
+}
+
+OS=$1
+TOPDIR=$2
+INST_LIBS=$3
+INST_PLUGINS=$4
+INST_INCLUDE=$5
+INST_EXAMPLES=$6
+INST_SRC=$7
+INST_EXAMPLE_SRC=$8
+shift;shift; shift;shift; shift;shift; shift;shift;
+INST_DOC=$1
+INST_DATA=$2
+
+
+intro || exit 0
+
+make_spec > dist/Irix/osg.spec
+make_idb > dist/Irix/osg.idb
+
+DIST_DIR=Distribution-`bin/osgversion`
+
+cd dist/Irix
+rm -rf $DIST_DIR
+mkdir $DIST_DIR
+/usr/sbin/gendist -sbase / -idb osg.idb -spec osg.spec -dist $DIST_DIR
+cd $DIST_DIR
+tar cvf ../osg.tardist *
+mv ../osg.tardist .
+cd ../../../
+
+
+
+exit 0
diff --git a/libwms/Make/makepkg b/libwms/Make/makepkg
new file mode 100755
index 0000000..3f9f3ed
--- /dev/null
+++ b/libwms/Make/makepkg
@@ -0,0 +1,220 @@
+#!/bin/sh
+
+
+die()
+{
+ echo >& $1
+ exit 1
+}
+
+x()
+{
+ echo $*
+ $*
+}
+
+
+
+print_pkginfo()
+{
+
+ __pstamp=`fgrep $LOGNAME /etc/passwd | cut -f5 -d":"`
+ cat <<- EOF
+PKG="$1"
+NAME="$2"
+`[ "$OS" = "SunOS" ] && echo ARCH=sparc`
+VERSION=`gmake -s version`
+CATEGORY="application,graphics,opengl"
+DESC="$3"
+BASEDIR="/opt/"
+VENDOR="OpenSceneGraph"
+EMAIL="info at openscenegraph.org"
+PSTAMP=$__pstamp
+URL="http://openscenegraph.org"
+MAXINST="1"
+EOF
+
+}
+
+print_prototype()
+{
+ echo "i pkginfo"
+ [ -f depend ] && echo "i depend"
+
+ for d in $*
+ do
+ d=`echo $d | sed 's/\/opt\///`
+ echo "d none $d ? root sys"
+ done
+
+ for d in $*
+ do
+ for f in `ls -1 $d`
+ do
+ f=$d/$f
+ if [ -f $f ]
+ then
+ [ -x $f ] && MODE=0555 || MODE=0444
+ dest=`echo $f | sed 's/\/opt\///'`
+ echo "f none $dest=$f $MODE root sys"
+ fi
+ done
+ done
+
+}
+
+make_installable()
+{
+ PKGNAME=$1
+ PKGDIR=$PKGNAME.pkg
+ DISTNAME="$PKGNAME"-"`gmake -s version`"-"$OS".shar
+
+ THISDIR=`pwd`
+ cd $PKGSUBDIR
+
+ cat << INSTALL_EOF > $DISTNAME
+
+#!/bin/sh
+cat <<- 'LEOF' | uudecode -p | gzip -d -c | tar xvf -
+`tar cvf - $PKGDIR | gzip | uuencode .tmpuu`
+LEOF
+
+/bin/sh << EOF
+echo =========== INSTALLING $DISTNAME =================
+pkgadd -d $PKGNAME.pkg $PKGNAME
+rm -rf $PKGDIR
+EOF
+
+
+INSTALL_EOF
+
+ chmod +x $DISTNAME
+ cd $THISDIR
+}
+
+
+make_package()
+{
+ PKGNAME=$1
+ PKGDIR=$PKGSUBDIR/$PKGNAME.pkg
+ x rm -rf $PKGDIR
+ x mkdir $PKGDIR
+
+ echo Making pkginfo ...
+ print_pkginfo "$1" "$2" "$3" > $PKGDIR/pkginfo
+
+ shift; shift; shift
+
+ echo Making prototype ...
+
+ print_prototype $* > $PKGDIR/prototype
+
+# DISTNAME="$PKGNAME"-"`$TOPDIR/bin/osgversion`"-"$OS"-"local"
+
+ THISDIR=`pwd`
+ x cd $PKGDIR
+ x pkgmk -d .
+ x cd $THISDIR
+# make_installable $PKGNAME $PKGDIR $DISTNAME
+# x pkgtrans -s $PKGDIR $DISTNAME $PKGNAME
+# x mv "$PKGDIR"/"$DISTNAME" "$PKGDIR"/..
+}
+
+
+intro()
+{
+ echo; echo;
+ echo "============ Building the $OS Distribution Package ==================="
+ echo ""
+ echo " Please note that this script requires that"
+ echo
+ echo " 'make install' "
+ echo
+ echo " be previously run. Please run "
+ echo
+ echo " 'make distribution' "
+ echo
+ echo " with the same arguments (if any) as 'make install'"
+ echo
+ repeat=1
+ while [ $repeat = 1 ]
+ do
+ printf " Continue? (y/n) [y]: "
+ read resp
+ case $resp in
+ ""|Yes|YES|yes|Y|y) repeat=0 ;;
+ n|N|no|NO) return 1; repeat=0;;
+ *) repeat=1;;
+ esac
+ done
+
+ return 0
+}
+
+intro || exit 0
+
+OS=$1
+TOPDIR=$2
+INST_LIBS=$3
+INST_PLUGINS=$4
+INST_INCLUDE=$5
+INST_EXAMPLES=$6
+INST_SRC=$7
+INST_EXAMPLE_SRC=$8
+shift;shift; shift;shift; shift;shift; shift;shift;
+INST_DOC=$1
+INST_DATA=$2
+
+
+PKGSUBDIR=dist/PKG
+
+make_package\
+ "OpenSceneGraph" \
+ "Open Scene Graph - Run-time environment"\
+ "An OpenGL based scene graph. This installation includes a set of run-time libraries, and example programs"\
+ $INST_LIBS $INST_PLUGINS $INST_EXAMPLES\
+
+make_installable "OpenSceneGraph"
+
+#
+# Capture include directories
+#
+SUBDIRS=`ls $TOPDIR/include | grep -v CVS`
+INSTARG=""
+for d in $SUBDIRS
+do
+ dd="$INST_INCLUDE"/"$d"
+ [ -d $dd ] && INSTARG="$INSTARG $dd"
+done
+
+#
+# Capthre examples subdirectories
+#
+SUBDIRS=`ls $TOPDIR/src/examples | grep -v CVS`
+for d in $SUBDIRS
+do
+ dd="$INST_EXAMPLE_SRC"/"$d"
+ [ -d $dd ] && INSTARG="$INSTARG $dd"
+done
+
+#
+# Capture Make subdirectory
+#
+dd="$INST_SRC"/"Make"
+
+echo dd is $dd
+ls $dd
+
+[ -d $dd ] && INSTARG="$INSTARG $dd"
+
+
+make_package\
+ "OpenSceneGraph-dev"\
+ "Open Scene Graph - Development environment"\
+ "An OpenGL based scene graph. This installation includes header files and example program source files"\
+ $INSTARG
+
+make_installable "OpenSceneGraph-dev"
+
+
+exit 0
diff --git a/libwms/Make/makerpms b/libwms/Make/makerpms
new file mode 100755
index 0000000..5764f76
--- /dev/null
+++ b/libwms/Make/makerpms
@@ -0,0 +1,200 @@
+#!/bin/sh
+
+die()
+{
+ echo $1
+ exit 1
+}
+
+
+s_install()
+{
+ src_DIR=$1
+ mode=$2
+ dst_DIR=$RPM_BUILD_DIR/`echo $3 | sed 's/\///'`
+
+ [ -d $dst_DIR ] || mkdir -p $dst_DIR
+
+ THISDIR=`pwd`
+ cd $src_DIR
+ for f in `ls -1`
+ do
+ if [ -f $f ]
+ then
+ install -m $mode $f $dst_DIR/$f
+ fi
+ done
+ cd $THISDIR
+}
+
+
+print_attr()
+{
+ dst_DIR=$1
+ mode=$2
+ t_dir=$RPM_BUILD_DIR/$dst_DIR
+
+ THISDIR=`pwd`
+ cd $t_dir
+ for f in `ls -1`
+ do
+ [ -f $f ] && echo "%attr($mode, root, root) $dst_DIR/$f"
+ done
+ cd $THISDIR
+}
+
+make_targz()
+{
+ THISDIR=`pwd`
+ src_dir=$1
+ cd $RPM_BUILD_DIR/..
+ tar cvf - $src_dir |\
+ gzip > /usr/src/redhat/SOURCES/$src_dir.tar.gz
+ cd $THISDIR
+}
+
+make_spec()
+{
+ name=$1
+ cat <<-LEOF > $TOPDIR/dist/RPM/$name.spec
+
+Summary: libwms - get and parse wms data
+Name: $name
+Version: $REV
+Release: $REL
+Copyright: LGPL
+Group: Graphics
+Source: $name-$REV.tar.gz
+URL: http://www.flids.com
+Packager: `awk -f - /etc/passwd <<-EOF
+BEGIN { FS=":"}
+{
+ if( \\$1 == "$LOGNAME" )
+ print \\$5
+}
+EOF`
+
+%description
+
+
+%prep
+
+%setup
+
+%build
+
+%install
+
+cd $RPM_BUILD_DIR
+tar cvf - . | tar xvfC - /
+
+# ---------------------
+# FILES Sections
+%files
+
+LEOF
+}
+
+
+make_wms()
+{
+ RPM_BUILD_DIR=/usr/src/redhat/BUILD/libwms-$REV
+ rm -rf $RPM_BUILD_DIR
+ mkdir $RPM_BUILD_DIR
+
+ s_install $TOPDIR/lib 755 $INST_LIBS
+ s_install $TOPDIR/bin 755 $INST_EXAMPLES
+
+ make_targz -$REV
+ make_spec libwms
+
+ print_attr $INST_LIBS 755 >> $TOPDIR/dist/RPM/libwms.spec
+ print_attr $INST_EXAMPLES 755 >> $TOPDIR/dist/RPM/libwms.spec
+
+ rpmbuild -bb --clean $TOPDIR/dist/RPM/libwms.spec
+
+ mv /usr/src/redhat/RPMS/i386/libwms-$REV-$REL.i386.rpm dist/RPM
+}
+
+make_wms_dev()
+{
+ RPM_BUILD_DIR=/usr/src/redhat/BUILD/libwms_dev-$REV
+ rm -rf $RPM_BUILD_DIR
+ mkdir $RPM_BUILD_DIR
+
+ for d in `ls $TOPDIR/include | grep -v CVS`
+ do
+ [ -d $TOPDIR/include/$d ] && \
+ s_install $TOPDIR/include/$d 644 $INST_INCLUDE/$d
+ done
+
+
+ for d in `ls -1 $INST_EXAMPLE_SRC`
+ do
+ if [ -d $INST_EXAMPLE_SRC/$d ]
+ then
+ s_install $INST_EXAMPLE_SRC/$d 644 $INST_EXAMPLE_SRC/$d
+ fi
+ cd $THISDIR
+ done
+
+ s_install $INST_SRC/Make 644 $INST_SRC/Make
+
+
+ make_targz libwms_dev-$REV
+ make_spec libwms_dev
+
+ for d in `ls -1 $RPM_BUILD_DIR/$INST_INCLUDE`
+ do
+ print_attr $INST_INCLUDE/$d 755 >> $TOPDIR/dist/RPM/libwms_dev.spec
+ done
+
+ for d in `ls -1 $RPM_BUILD_DIR/$INST_EXAMPLE_SRC`
+ do
+ print_attr $INST_EXAMPLE_SRC/$d 755 >> $TOPDIR/dist/RPM/libwms_dev.spec
+ done
+
+ print_attr $INST_SRC/Make 755 >> $TOPDIR/dist/RPM/libwms_dev.spec
+
+ rpm -ba --clean $TOPDIR/dist/RPM/libwms_dev.spec
+
+ mv /usr/src/redhat/RPMS/i386/libwms_dev-$REV-$REL.i386.rpm dist/RPM
+}
+
+if [ "`whoami`" != "root" ]
+then
+ echo
+ echo " === makerpm : You must be root do make the RPM distribution."
+ echo
+ exit 1
+fi
+
+if [ $# -ne 9 ]
+then
+ echo
+ echo makerpm : Internal Error - Bad Usage
+ echo
+ exit 1
+fi
+
+OS=$1
+TOPDIR=$2
+INST_LIBS=$3
+INST_INCLUDE=$4
+INST_EXAMPLES=$5
+INST_SRC=$6
+INST_EXAMPLE_SRC=$7
+VERSION=$8
+shift; shift;shift; shift;shift; shift;shift;shift;
+INST_DOC=$1
+
+REV=$VERSION
+REL=1
+
+make_wms
+
+make_wms_dev
+
+
+
+exit 0
diff --git a/libwms/Make/makerules b/libwms/Make/makerules
new file mode 100644
index 0000000..7b8fe2f
--- /dev/null
+++ b/libwms/Make/makerules
@@ -0,0 +1,197 @@
+
+default: opt
+
+opt: $(EXEC:=.opt)\
+ $(LIB:=.opt)\
+ $(PLUGIN:=.opt)
+
+debug: $(EXEC:=.dbg)\
+ $(LIB:=.dbg)\
+ $(PLUGIN:=.dbg)
+
+cleandepend: cleandependopt cleandependdbg
+
+cleandependopt:
+ @[ -d $(OPTDIR) ] && cd $(OPTDIR); rm -f Makedepend; rm -rf .depend
+
+cleandependdbg:
+ @[ -d $(DEBUGDIR) ] && cd $(DEBUGDIR); rm -f Makedepend; rm -rf .depend
+
+cleantarget: cleantargetopt cleantargetdbg
+
+cleantargetopt:
+ @[ -d $(OPTDIR) ] && cd $(OPTDIR); rm -f $(EXEC) $(LIB) $(PLUGIN)
+
+cleantargetdbg:
+ @[ -d $(DEBUGDIR) ] && cd $(DEBUGDIR); rm -f $(EXEC) $(LIB) $(PLUGIN)
+
+clean: cleanopt cleandbg cleantmp cleandepend
+
+cleanopt:
+ @[ -d $(OPTDIR) ] && cd $(OPTDIR); rm -f $(OBJS) Makedepend; rm -rf .depend
+
+cleandbg:
+ @[ -d $(DEBUGDIR) ] && cd $(DEBUGDIR); rm -f $(OBJS) Makedepend; rm -rf .depend
+
+clobber: clobberdbg clobberopt
+
+clobberopt:
+ rm -rf $(OPTDIR)
+
+clobberdbg:
+ rm -rf $(DEBUGDIR)
+
+cleanlib:
+ rm -rf $(TOPDIR)/lib/*
+
+cleanbin:
+ rm -rf $(TOPDIR)/bin/*
+
+cleandoc:
+ rm -rf $(TOPDIR)/doc/*
+
+cleantmp:
+ @for f in * ; do [ -d $$f ]||rm -f $$f~; done
+
+docs:
+ [ "$(TARGET_BASENAME)" != "" ] && \
+ mkdir -p $(TOPDIR)/doc/$(TARGET_BASENAME) && \
+ doc++ -d $(TOPDIR)/doc/doc++/$(TARGET_BASENAME) -H -A \
+ $(TOPDIR)/include/$(TARGET_BASENAME)/* && \
+ echo "$(TARGET_BASENAME) HTML documentation created in "\
+ "$(TOPDIR)/doc/doc++/$(TARGET_BASENAME)"
+
+
+$(EXEC): $(OBJS)
+ $(C++) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
+
+
+## Mac OSX makes the distinction between -dynamiclib and -bundle
+## causing us to have to make a special case here, rather than
+## just redefining the SHARED argument.
+
+ifeq ($(OS),Darwin)
+
+$(LIB): $(OBJS)
+ $(C++) $(LDFLAGS) $(LIBVERSION) -dynamiclib $(OBJS) $(LIBS) -o $@
+
+$(PLUGIN): $(OBJS)
+ $(C++) $(LDFLAGS) -bundle $(OBJS) $(LIBS) -o $@
+else
+ifeq ($(OS),HP-UX)
+# we need to explicitly tell the linker the library name - else it will
+# include paths like ../../../libosg.sl into executables
+$(LIB) $(PLUGIN) : $(OBJS)
+ $(C++) $(LDFLAGS) $(SHARED) $(OBJS) $(LIBS) -Wl,+h -Wl,$@ -o $@
+else
+$(LIB) $(PLUGIN) : $(OBJS)
+ $(C++) $(LDFLAGS) $(SHARED) $(OBJS) $(LIBS) -o $@
+
+endif # not HP-UX
+endif # not Darwin
+
+$(EXEC:=.dbg) :
+ @[ -d $(DEBUGDIR) ] || mkdir $(DEBUGDIR)
+ @cd $(DEBUGDIR); \
+ $(MAKE) -f ../GNUmakefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
+ THISDIR=../$(THISDIR)\
+ MAKEDEPEND=Makedepend $(EXEC)
+ @$(MAKE) LNSRC=$(DEBUGDIR)/$(EXEC)$(EXE_EXT) LNDEST=$(BININST)/$(OS)$(ARCH)/$(EXEC)$(EXE_EXT) __link
+
+$(LIB:=.dbg) : $(PLUGIN:=.dbg)
+ @[ -d $(DEBUGDIR) ] || mkdir $(DEBUGDIR)
+ @[ -d "$(TOPDIR)/lib/$(OS)$(ARCH)" ] || mkdir -p $(TOPDIR)/lib/$(OS)$(ARCH)
+ @cd $(DEBUGDIR);\
+ $(MAKE) -f ../GNUmakefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
+ THISDIR=../$(THISDIR)\
+ MAKEDEPEND=Makedepend $(LIB)
+ @$(MAKE) LNSRC=$(DEBUGDIR)/$(LIB) LNDEST=$(LIBINST)/$(OS)$(ARCH)/$(LIB) __link
+
+$(PLUGIN:=.dbg) :
+ @[ -d $(DEBUGDIR) ] || mkdir $(DEBUGDIR)
+ @cd $(DEBUGDIR); \
+ $(MAKE) -f ../GNUmakefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
+ THISDIR=../$(THISDIR)\
+ MAKEDEPEND=Makedepend $(PLUGIN)
+ @$(MAKE) LNSRC=$(DEBUGDIR)/$(PLUGIN) LNDEST=$(PLUGININST)/$(PLUGIN) __link
+
+$(EXEC:=.opt) :
+ @[ -d $(OPTDIR) ] || mkdir $(OPTDIR)
+ @cd $(OPTDIR); \
+ $(MAKE) -f ../GNUmakefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
+ THISDIR=../$(THISDIR)\
+ MAKEDEPEND=Makedepend $(EXEC)
+ @$(MAKE) LNSRC=$(OPTDIR)/$(EXEC)$(EXE_EXT) LNDEST=$(BININST)/$(OS)$(ARCH)/$(EXEC)$(EXE_EXT) __link
+
+
+$(LIB:=.opt) :
+ @[ -d $(OPTDIR) ] || mkdir -p $(OPTDIR)
+ @[ -d "$(TOPDIR)/lib/$(OS)$(ARCH)" ] || mkdir -p $(TOPDIR)/lib/$(OS)$(ARCH)
+ @cd $(OPTDIR);\
+ $(MAKE) -f ../GNUmakefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
+ THISDIR=../$(THISDIR)\
+ MAKEDEPEND=Makedepend $(LIB)
+ @$(MAKE) LNSRC=$(OPTDIR)/$(LIB) LNDEST=$(LIBINST)/$(OS)$(ARCH)/$(LIB) __link
+
+$(PLUGIN:=.opt) :
+ @[ -d $(OPTDIR) ] || mkdir -p $(OPTDIR)
+ @cd $(OPTDIR); \
+ $(MAKE) -f ../GNUmakefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
+ THISDIR=../$(THISDIR)\
+ MAKEDEPEND=Makedepend $(PLUGIN)
+ @$(MAKE) LNSRC=$(OPTDIR)/$(PLUGIN) LNDEST=$(PLUGININST)/$(PLUGIN) __link
+
+
+## Revamped method for making Makedepend files
+## Under this method, Makedepend simply includes
+## all dependency files which are built for each
+## individual source file. At update, only the individual
+## dependency file is updated rather than the whole of Makedepend
+
+Makedepend : $(CXXFILES) $(CFILES)
+ifeq ($(OS),IRIX)
+ touch $@
+else
+ @ touch $@
+ @if [ ! -d .depend ] ; then \
+ mkdir .depend;\
+ depfiles="$+";\
+ else\
+ depfiles="$?";\
+ fi;\
+ if [ ! -z "$$depfiles" ]; then \
+ for f in $$depfiles; do \
+ echo "$(C++) $(DEPARG) $(INC) $$f pipeto .depend/`basename $$f`"; \
+ $(C++) $(DEPARG) $(INC) $$f > .depend/`basename $$f`; \
+ grep $$f $@ || echo include .depend/`basename $$f` >> Makedepend ;\
+ done;\
+ fi
+endif
+
+
+ifeq (0,1) ##### OLD WAY : Keep until we've proven that this doesn't trip up
+ ##### on other OS's.
+ Makedepend : $(CXXFILES) $(CFILES)
+ ifeq ($(OS),IRIX)
+ touch $@
+ else
+ $(C++) $(INC) $(DEPARG) $^ > $(MAKEDEPEND)
+ endif
+
+endif
+
+
+.SUFFIXES: .cpp .o
+.cpp.o:
+ $(C++) $(CXXFLAGS) -c $<
+
+depend : $(MAKEDEPEND)
+
+__link :
+ @sh $(TOPDIR)/Make/dolink.sh $(TOPDIR) $(LNSRC) $(LNDEST) "$(LINK)"
+
+__instfiles :
+ @echo $(INSTFILES)
+
+sinclude $(MAKEDEPEND)
+
diff --git a/libwms/Make/maketoprule b/libwms/Make/maketoprule
new file mode 100644
index 0000000..d91f797
--- /dev/null
+++ b/libwms/Make/maketoprule
@@ -0,0 +1,20 @@
+veryclean: clobber cleanlib cleanbin cleandoc
+
+cleanlib:
+ rm -rf $(TOPDIR)/lib
+
+cleanbin:
+ rm -rf $(TOPDIR)/bin
+
+cleandoc:
+ rm -rf $(TOPDIR)/doc/*
+
+rpm:
+ $(TOPDIR)/Make/makerpms "$(OS)" \
+ "$(TOPDIR)" \
+ "$(INST_LIBS)" \
+ "$(INST_INCLUDE)" \
+ "$(INST_EXAMPLES)" \
+ "$(INST_SRC)" \
+ "$(INST_EXAMPLE_SRC)" \
+ "$(INST_DOC)"
diff --git a/libwms/Make/versionrules b/libwms/Make/versionrules
new file mode 100644
index 0000000..61af727
--- /dev/null
+++ b/libwms/Make/versionrules
@@ -0,0 +1,16 @@
+#######################################################################
+##
+## VERSIONING SEMANTICS
+##
+## Version consistes of <major> . <minor> . <release> - <revision>
+## Where:
+## major : Production (0 = pre-production)
+## minor : 0-7 = Production minor, 8 = Alpha, 9 = Beta
+## release : Release tag
+## revision: Release revision - 0 = development (cutting edge).
+##
+##
+## 'make version' will print the version with a
+#######################################################################
+version :
+ @echo $(VERSION)-$(VERSION_REVISION);
diff --git a/libwms/README.txt b/libwms/README.txt
new file mode 100644
index 0000000..9ae632b
--- /dev/null
+++ b/libwms/README.txt
@@ -0,0 +1,28 @@
+###
+# libwms README.txt file
+#
+# $Id: README.txt 11732 2007-09-17 14:05:37Z dburken $
+###
+
+libwms requires:
+- curl
+- expat
+
+
+//----------------------------------------------------------------------------
+Begin linux build notes:
+
+On machines with yum you can do:
+
+As root:
+
+# yum install curl curl-devel expat expat-devel
+
+Or with sudo:
+
+$ sudo yum install curl curl-devel expat expat-devel
+
+If you do not have yum find the appropriate rpms or packages.
+
+End linux build notes
+//----------------------------------------------------------------------------
diff --git a/libwms/examples/GNUmakefile b/libwms/examples/GNUmakefile
new file mode 100644
index 0000000..3d18103
--- /dev/null
+++ b/libwms/examples/GNUmakefile
@@ -0,0 +1,11 @@
+TOPDIR = ..
+include $(TOPDIR)/Make/makedefs
+include $(TOPDIR)/Make/makedirdefs
+
+DIRS = $(EXAMPLE_DIRS)
+
+include $(TOPDIR)/Make/makedirrules
+include $(TOPDIR)/Make/versionrules
+include $(TOPDIR)/Make/instrules
+include $(TOPDIR)/Make/distrules
+include $(TOPDIR)/Make/helprules
diff --git a/libwms/examples/wmscapabilities/GNUmakefile b/libwms/examples/wmscapabilities/GNUmakefile
new file mode 100644
index 0000000..6ddfd2c
--- /dev/null
+++ b/libwms/examples/wmscapabilities/GNUmakefile
@@ -0,0 +1,18 @@
+TOPDIR = ../..
+include $(TOPDIR)/Make/makedefs
+
+CXXFILES =\
+ wmscapabilities.cpp\
+
+LIBS += -lwms $(OTHER_LIBS)
+
+INSTFILES = \
+ $(CXXFILES)\
+ GNUmakefile.inst=GNUmakefile
+
+EXEC = wmscapabilities
+
+INC += $(X_INC)
+LIB=
+include $(TOPDIR)/Make/makerules
+
diff --git a/libwms/examples/wmscapabilities/wmscapabilities.cpp b/libwms/examples/wmscapabilities/wmscapabilities.cpp
new file mode 100644
index 0000000..9154678
--- /dev/null
+++ b/libwms/examples/wmscapabilities/wmscapabilities.cpp
@@ -0,0 +1,58 @@
+#include <iostream>
+#include <wms/wmsNotify.h>
+#include <curl/curl.h>
+#include <wms/wms.h>
+#include <wms/wmsClient.h>
+#include <wms/wmsUrl.h>
+#include <wms/wmsRefPtr.h>
+#include <wms/wmsMemoryStream.h>
+#include <wms/wmsCapabilitiesRoot.h>
+#include <wms/wmsCapabilitiesState.h>
+#include <wms/wmsCapabilitiesParser.h>
+
+int main(int argc, char* argv[])
+{
+ if(argc != 2)
+ {
+ std::cout << "Please supply a url you wish to get the capabilities of" << std::endl;
+ return 1;
+ }
+ // initilize communication environment
+ wmsInitialize();
+
+ wmsClient client;
+
+ wmsNotify(wmsNotifyLevel_INFO)<<"Getting capabilitites from url " << wmsUrl(argv[1]) << std::endl;
+ wmsRefPtr<wmsMemoryStream> memoryStream;
+ if(client.getCapabilities(wmsUrl(argv[1])))
+ {
+ memoryStream = client.getStream();
+ std::cout <<"______________________CAPABILITIES IN RAW XML FORM_______________________\n";
+ std::cout.write(memoryStream->getBuffer(),
+ memoryStream->getBufferSize());
+ std::cout <<"______________________END CAPABILITIES IN RAW XML FORM_______________________\n";
+
+ wmsRefPtr<wmsCapabilitiesParser> parser = new wmsCapabilitiesParser;
+ wmsRefPtr<wmsCapabilitiesRoot> root = parser->parse(*memoryStream);
+
+ if(root.valid())
+ {
+ std::cout << "__________________________PARSED CAPABILITIES____________________________\n"
+ << *root << std::endl
+ << "________________________END PARSED CAPABILITIES__________________________\n";
+ }
+ else
+ {
+ std::cout << "__________________________UNABLE TO PARSE CAPABILITIES____________________________\n";
+
+ }
+ }
+ else
+ {
+ std::cout << "Unable to get capabilities from url = " << argv[1] << std::endl;
+ }
+ // finalize communication environment
+ wmsFinalize();
+
+ return 0;
+}
diff --git a/libwms/examples/wmsurl/GNUmakefile b/libwms/examples/wmsurl/GNUmakefile
new file mode 100644
index 0000000..4a0602f
--- /dev/null
+++ b/libwms/examples/wmsurl/GNUmakefile
@@ -0,0 +1,16 @@
+TOPDIR = ../..
+include $(TOPDIR)/Make/makedefs
+
+CXXFILES =\
+ wmsurl.cpp\
+
+LIBS += -lwms $(OTHER_LIBS)
+
+INSTFILES = \
+ $(CXXFILES)\
+ GNUmakefile.inst=GNUmakefile
+
+EXEC = wmsurl
+LIB=
+include $(TOPDIR)/Make/makerules
+
diff --git a/libwms/examples/wmsurl/wmsurl.cpp b/libwms/examples/wmsurl/wmsurl.cpp
new file mode 100644
index 0000000..90d9492
--- /dev/null
+++ b/libwms/examples/wmsurl/wmsurl.cpp
@@ -0,0 +1,29 @@
+#include <wms/wmsUrl.h>
+
+int main(int argc, char* argv[])
+{
+ if(argc != 2)
+ {
+ std::cout << "Please supply a url as an argument and it will be split into it's parts" << std::endl;
+ return 1;
+ }
+ wmsUrl url;
+
+ url.url() = argv[1];
+
+ std::cout << "URL:"<< url << std::endl;
+ std::cout << "SPLIT INTO ITS PARTS" << std::endl
+ << "protocol: " << url.protocol() << std::endl
+ << "server: " << url.server() << std::endl
+ << "path: " << url.path() << std::endl
+ << "options: " << url.options() << std::endl;
+
+ std::cout << "MERGING http://a.b.c/cgi-bin/mycgi?f=g" << std::endl;
+ url.mergeUrl("http",
+ "a.b.c",
+ "/cgi-bin/mycgi",
+ "f=g");
+
+ std::cout << "MERGED URL: " << url << std::endl;
+
+}
diff --git a/libwms/include/wms/iso8601.h b/libwms/include/wms/iso8601.h
new file mode 100644
index 0000000..4a86aab
--- /dev/null
+++ b/libwms/include/wms/iso8601.h
@@ -0,0 +1,65 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+
+
+#ifndef WMS_ISO8601_H
+#define WMS_ISO8601_H
+
+#include <string>
+
+typedef struct wmsMyTime_t {
+ int year;
+ int month;
+ int day;
+ int hour;
+ int min;
+ float sec;
+} wmsMyTime;
+
+// Returns true if the first date is less than the second date.
+bool operator<(const wmsMyTime & a, const wmsMyTime & b);
+
+// Are two times equal?
+bool operator==(const wmsMyTime & a, const wmsMyTime & b);
+bool operator!=(const wmsMyTime & a, const wmsMyTime & b);
+
+// month is in range [1-12]. Returns 1 if there is a leap day this month/year.
+int wms_leap_days(int year, int month);
+
+// Adds two times together. This is more useful if one of the times
+// is actually an interval.
+wmsMyTime operator+(const wmsMyTime & a, const wmsMyTime & b);
+
+// Find the absolute difference between two times. Returns the interval
+// between the two times.
+wmsMyTime operator-(const wmsMyTime & a, const wmsMyTime & b);
+
+
+// Convert a time in string format to a wmsMyTime struct. It's pretty
+// forgiving to what it calls a time.
+void wms_parse_time(wmsMyTime & t, const std::string & str);
+
+// Convert a period or interval into a wmsMyTime struct.
+void wms_parse_period(wmsMyTime & t, const std::string & str);
+
+
+// Produce a date/time in standard ISO8601 form from a wmsMyTime struct.
+std::string wms_iso8601_time(const wmsMyTime & t);
+
+// Produce a date/time in standard ISO8601 form from a string.
+std::string wms_iso8601_time(const std::string & str);
+
+// Produce a time period from a wmsMyTime struct.
+std::string wms_iso8601_period(const wmsMyTime & t);
+
+#endif
diff --git a/libwms/include/wms/wms.h b/libwms/include/wms/wms.h
new file mode 100644
index 0000000..8073bf0
--- /dev/null
+++ b/libwms/include/wms/wms.h
@@ -0,0 +1,31 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#ifndef wms_HEADER
+#define wms_HEADER
+#include <string>
+#include "wmsExport.h"
+
+WMS_EXPORT std::string wmsUpcase(const std::string& input);
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+WMS_EXPORT bool wmsStringContains(const std::string& srcStr, const std::string& searchStr);
+WMS_EXPORT void wmsInitialize();
+WMS_EXPORT void wmsFinalize();
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/libwms/include/wms/wmsCapabilitiesParser.h b/libwms/include/wms/wmsCapabilitiesParser.h
new file mode 100644
index 0000000..66e485f
--- /dev/null
+++ b/libwms/include/wms/wmsCapabilitiesParser.h
@@ -0,0 +1,61 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#ifndef wmsCapabilitiesParser_HEADER
+#define wmsCapabilitiesParser_HEADER
+#include <iostream>
+#include <string>
+#include <vector>
+#include <wms/wmsReferenced.h>
+#include <wms/wmsRefPtr.h>
+
+class wmsCapabilitiesState;
+class wmsCapabilitiesRoot;
+class WMS_EXPORT wmsCapabilitiesParser : public wmsReferenced
+{
+public:
+ wmsCapabilitiesParser();
+
+ wmsRefPtr<wmsCapabilitiesRoot> parse(const std::string& inputFile);
+ wmsRefPtr<wmsCapabilitiesRoot> parse(std::istream& in);
+ wmsRefPtr<wmsCapabilitiesRoot> parseRawString(const std::string& rawCapabilities);
+
+ static void start(void *data, const char *element, const char **attrs);
+ static void end(void *data, const char *element);
+ static void handler(void *data, const char *element, int len);
+
+ // Function to determine if we're inside a particular tag. This could
+ // eliminate a lot of state variables. Returns the depth of the
+ // current tag under the queried tag or 0 if not under the queried tag.
+ unsigned int getTagDepth(const std::string& tag)const;
+ std::vector<wmsRefPtr<wmsCapabilitiesState> >& getStateStack();
+ std::vector<std::string>& getTagStack();
+ wmsRefPtr<wmsCapabilitiesRoot> root();
+ const wmsRefPtr<wmsCapabilitiesRoot> root()const;
+ const bool& processDimSeqExtent()const;
+ bool& processDimSeqExtent();
+ bool& processTimeExtent();
+ const bool& processTimeExtent()const;
+ static std::string trim(const std::string& s);
+ static void addTimes(std::vector<std::string> & times, std::string el);
+
+protected:
+ ~wmsCapabilitiesParser();
+
+ wmsRefPtr<wmsCapabilitiesRoot> theRoot;
+ std::vector<wmsRefPtr<wmsCapabilitiesState> > theStateStack;
+ std::vector<std::string> theTagStack;
+ mutable bool theProcessDimSeqExtent;
+ mutable bool theProcessTimeExtent;
+};
+
+#endif
diff --git a/libwms/include/wms/wmsCapabilitiesRoot.h b/libwms/include/wms/wmsCapabilitiesRoot.h
new file mode 100644
index 0000000..b5affa8
--- /dev/null
+++ b/libwms/include/wms/wmsCapabilitiesRoot.h
@@ -0,0 +1,48 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#ifndef wmsCapabilitiesRoot_HEADER
+#define wmsCapabilitiesRoot_HEADER
+#include <string>
+#include <iostream>
+#include <vector>
+#include <wms/wmsReferenced.h>
+#include <wms/wmsRefPtr.h>
+
+class wmsCapabilitiesState;
+
+class WMS_EXPORT wmsCapabilitiesRoot : public wmsReferenced
+{
+public:
+ friend std::ostream& operator <<(std::ostream& out, const wmsCapabilitiesRoot& src);
+ wmsCapabilitiesRoot();
+ ~wmsCapabilitiesRoot();
+ wmsRefPtr<wmsCapabilitiesState> root();
+ const wmsRefPtr<wmsCapabilitiesState> root()const;
+ const std::string& wmsVersion()const;
+ std::string& wmsVersion();
+ const std::string& wmsServerUrl()const;
+ std::string& wmsServerUrl();
+ wmsRefPtr<wmsCapabilitiesState> getNodeGivenName(const std::string& name);
+ void getLeafNodes(std::vector<wmsRefPtr<wmsCapabilitiesState> >& leafNodes, bool includeGroupNodes=false);
+ bool getLatLonBoundingBox(double& minLat,
+ double& minLon,
+ double& maxLat,
+ double& maxLon)const;
+
+protected:
+ wmsRefPtr<wmsCapabilitiesState> theRootLayer;
+ std::string theWmsVersion;
+ std::string theWmsServerUrl;
+};
+
+#endif
diff --git a/libwms/include/wms/wmsCapabilitiesState.h b/libwms/include/wms/wmsCapabilitiesState.h
new file mode 100644
index 0000000..adb4025
--- /dev/null
+++ b/libwms/include/wms/wmsCapabilitiesState.h
@@ -0,0 +1,488 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+
+#ifndef wmsCapabilititesState_HEADER
+#define wmsCapabilititesState_HEADER
+#include <wms/wmsStyle.h>
+#include <iostream>
+#include <string>
+#include <wms/wmsReferenced.h>
+#include <wms/wmsRefPtr.h>
+#include <wms/wmsExport.h>
+
+class WMS_EXPORT wmsCapabilitiesState : public wmsReferenced
+{
+public:
+ friend WMS_EXPORT std::ostream& operator <<(std::ostream& out, const wmsCapabilitiesState& src);
+
+ wmsCapabilitiesState();
+
+ const std::string& name()const
+ {
+ return theName;
+ }
+ std::string& name()
+ {
+ return theName;
+ }
+ std::string& title()
+ {
+ return theTitle;
+ }
+ const std::string& title()const
+ {
+ return theTitle;
+ }
+ std::string& abstract()
+ {
+ return theAbstract;
+ }
+ const std::string& abstract()const
+ {
+ return theAbstract;
+ }
+ std::string& contactPerson()
+ {
+ return theContactPerson;
+ }
+ const std::string& contactPerson()const
+ {
+ return theContactPerson;
+ }
+ std::string& contactOrganization()
+ {
+ return theContactOrganization;
+ }
+ const std::string& contactOrganization()const
+ {
+ return theContactOrganization;
+ }
+ std::string& contactInformation()
+ {
+ return theContactInformation;
+ }
+ const std::string& contactInformation()const
+ {
+ return theContactInformation;
+ }
+ std::string& address()
+ {
+ return theAddress;
+ }
+ const std::string& address()const
+ {
+ return theAddress;
+ }
+ std::string& city()
+ {
+ return theCity;
+ }
+ const std::string& city()const
+ {
+ return theCity;
+ }
+ std::string& stateOrProvince()
+ {
+ return theStateOrProvince;
+ }
+ const std::string& stateOrProvince()const
+ {
+ return theStateOrProvince;
+ }
+ std::string& postalCode()
+ {
+ return thePostalCode;
+ }
+ const std::string& postalCode()const
+ {
+ return thePostalCode;
+ }
+ std::string& country()
+ {
+ return theCountry;
+ }
+ const std::string& country()const
+ {
+ return theCountry;
+ }
+ std::string& voiceTelephone()
+ {
+ return theVoiceTelephone;
+ }
+ const std::string& voiceTelephone()const
+ {
+ return theVoiceTelephone;
+ }
+ std::string& faxNumber()
+ {
+ return theFaxNumber;
+ }
+ const std::string& faxNumber()const
+ {
+ return theFaxNumber;
+ }
+ std::string& emailAddress()
+ {
+ return theEmailAddress;
+ }
+ const std::string& emailAddress()const
+ {
+ return theEmailAddress;
+ }
+ std::string& fees()
+ {
+ return theFees;
+ }
+ const std::string& fees()const
+ {
+ return theFees;
+ }
+ std::string& accessContraints()
+ {
+ return theAccessConstraints;
+ }
+ const std::string& accessContraints()const
+ {
+ return theAccessConstraints;
+ }
+ wmsStyle getStyle(unsigned int idx)const
+ {
+ if(idx < theStyles.size())
+ {
+ return theStyles[idx];
+ }
+ return wmsStyle();
+ }
+ void addStyle(const wmsStyle& style)
+ {
+ theStyles.push_back(style);
+ }
+ void setStyle(unsigned int idx,
+ const wmsStyle& style)
+ {
+ if(idx < theStyles.size())
+ {
+ theStyles[idx] = style;
+ }
+ }
+ unsigned int getNumberOfStyles()const
+ {
+ return theStyles.size();
+ }
+ const std::string& latMin()const
+ {
+ return theLatMin;
+ }
+ std::string& latMin()
+ {
+ return theLatMin;
+ }
+
+ const std::string& latMax()const
+ {
+ return theLatMax;
+ }
+ std::string& latMax()
+ {
+ return theLatMax;
+ }
+
+ std::string& lonMin()
+ {
+ return theLonMin;
+ }
+ const std::string& lonMin()const
+ {
+ return theLonMin;
+ }
+ std::string& lonMax()
+ {
+ return theLonMax;
+ }
+ const std::string& lonMax()const
+ {
+ return theLonMax;
+ }
+ std::vector<std::string>& times()
+ {
+ return theTimes;
+ }
+ const std::vector<std::string>& times()const
+ {
+ return theTimes;
+ }
+ std::string getTime(unsigned long idx)const
+ {
+ if(idx < theTimes.size())
+ {
+ return theTimes[idx];
+ }
+ return "";
+ }
+ void addTime(const std::string& time)
+ {
+ theTimes.push_back(time);
+ }
+ void setTime(unsigned int idx,
+ const std::string& time)
+ {
+ theTimes[idx] = time;
+ }
+ std::string& timeDefault()
+ {
+ return theTimeDefault;
+ }
+ const std::string& timeDefault()const
+ {
+ return theTimeDefault;
+ }
+ std::string& dimSeqBegin()
+ {
+ return theDimSeqBegin;
+ }
+ const std::string& dimSeqBegin()const
+ {
+ return theDimSeqBegin;
+ }
+ std::string& dimSeqEnd()
+ {
+ return theDimSeqEnd;
+ }
+ const std::string& dimSeqEnd()const
+ {
+ return theDimSeqEnd;
+ }
+ std::string& dimSeqStep()
+ {
+ return theDimSeqStep;
+ }
+ const std::string& dimSeqStep()const
+ {
+ return theDimSeqStep;
+ }
+ std::string& dimSeqDefault()
+ {
+ return theDimSeqDefault;
+ }
+ const std::string& dimSeqDefault()const
+ {
+ return theDimSeqDefault;
+ }
+ bool& noSubsets()
+ {
+ return theNoSubsets;
+ }
+ const bool& noSubsets()const
+ {
+ return theNoSubsets;
+ }
+ int getFixedWidth()const
+ {
+ return theFixedWidth;
+ }
+ int& fixedWidth()
+ {
+ return theFixedWidth;
+ }
+ const int& fixedWidth()const
+ {
+ return theFixedWidth;
+ }
+ int& fixedHeight()
+ {
+ return theFixedHeight;
+ }
+ const int& fixedHeight()const
+ {
+ return theFixedHeight;
+ }
+ std::string getFormat(unsigned int idx)const
+ {
+ if(idx < theFormats.size())
+ {
+ return theFormats[idx];
+ }
+ return "";
+ }
+ std::vector<std::string>& formats()
+ {
+ return theFormats;
+ }
+ const std::vector<std::string>& formats()const
+ {
+ return theFormats;
+ }
+ unsigned int getNumberOfFormats()const
+ {
+ return theFormats.size();
+ }
+ bool& inheritedTimes()
+ {
+ return theInheritedTimes;
+ }
+ const bool& inheritedTimes()const
+ {
+ return theInheritedTimes;
+ }
+ bool hasChildren()const
+ {
+ return (theChildren.size() > 0);
+ }
+ wmsRefPtr<wmsCapabilitiesState> child(unsigned int idx);
+ const wmsRefPtr<wmsCapabilitiesState> child(unsigned int idx)const;
+ void addChild(wmsCapabilitiesState* child);
+ const std::vector<wmsRefPtr<wmsCapabilitiesState> >& children()const
+ {
+ return theChildren;
+ }
+ std::vector<wmsRefPtr<wmsCapabilitiesState> >& children()
+ {
+ return theChildren;
+ }
+
+ bool& isSequence()
+ {
+ return theIsSequence;
+ }
+
+ const bool& isSequence()const
+ {
+ return theIsSequence;
+ }
+
+ std::vector<wmsStyle>& styles()
+ {
+ return theStyles;
+ }
+ const std::vector<wmsStyle>& styles()const
+ {
+ return theStyles;
+ }
+ std::string& minScaleHint()
+ {
+ return theMinScaleHint;
+ }
+ const std::string& minScaleHint()const
+ {
+ return theMinScaleHint;
+ }
+ std::string& maxScaleHint()
+ {
+ return theMaxScaleHint;
+ }
+ const std::string& maxScaleHint()const
+ {
+ return theMaxScaleHint;
+ }
+ std::string& minScaleDenominator()
+ {
+ return theMinScaleDenominator;
+ }
+ const std::string& minScaleDenominator()const
+ {
+ return theMinScaleDenominator;
+ }
+ bool hasMinMaxScaleHints()const
+ {
+ return ((theMinScaleHint!="")&&
+ (theMaxScaleHint!=""));
+ }
+ bool hasMinScaleDenominator()const
+ {
+ return (theMinScaleDenominator!="");
+ }
+ std::string& opaqueFlag()
+ {
+ return theOpaqueFlag;
+ }
+ const std::string& opaqueFlag()const
+ {
+ return theOpaqueFlag;
+ }
+ std::string& queryableFlag()
+ {
+ return theQueryableFlag;
+ }
+ const std::string& queryableFlag()const
+ {
+ return theQueryableFlag;
+ }
+ std::string& cascadedFlag()
+ {
+ return theCascadedFlag;
+ }
+ const std::string& cascadedFlag()const
+ {
+ return theCascadedFlag;
+ }
+ void inherit(const wmsCapabilitiesState& src);
+
+ bool getLatLonBoundingBox(double& minLat,
+ double& minLon,
+ double& maxLat,
+ double& maxLon)const;
+protected:
+ std::string theName; /* not inherited */
+ std::string theTitle; /* not inherited */
+ std::string theAbstract; /* not inherited */
+ std::string theContactPerson;
+ std::string theContactOrganization;
+ std::string theContactInformation;
+ std::string theAddress;
+ std::string theCity;
+ std::string theStateOrProvince;
+ std::string thePostalCode;
+ std::string theCountry;
+ std::string theVoiceTelephone;
+ std::string theFaxNumber;
+ std::string theEmailAddress;
+ std::string theFees;
+ std::string theAccessConstraints;
+
+ std::vector<wmsStyle> theStyles; /* added to values from parent */
+ std::string theLatMin;
+ std::string theLatMax;
+ std::string theLonMin;
+ std::string theLonMax;
+ std::vector<std::string> theTimes; /* from time dimension */
+ std::string theTimeDefault; /* default attr in time dimension */
+ std::string theDimSeqBegin; /* from dim_sequence dimension */
+ std::string theDimSeqEnd;
+ std::string theDimSeqStep;
+ std::string theDimSeqDefault;
+ std::string theMinScaleHint;
+ std::string theMaxScaleHint;
+ std::string theMinScaleDenominator;
+ std::string theQueryableFlag;
+ std::string theOpaqueFlag;
+ std::string theCascadedFlag;
+
+ bool theNoSubsets;
+ int theFixedWidth;
+ int theFixedHeight;
+
+ std::vector<std::string> theFormats; // Initial values taken from the
+
+ bool theInheritedTimes;
+ bool theIsSequence;
+
+ std::vector<wmsRefPtr<wmsCapabilitiesState> > theChildren;
+
+private:
+ wmsCapabilitiesState(const wmsCapabilitiesState& src);
+ ~wmsCapabilitiesState();
+
+
+};
+
+#endif
diff --git a/libwms/include/wms/wmsClient.h b/libwms/include/wms/wmsClient.h
new file mode 100644
index 0000000..6f43c75
--- /dev/null
+++ b/libwms/include/wms/wmsClient.h
@@ -0,0 +1,93 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#ifndef wmsClient_HEADER
+#define wmsClient_HEADER
+#include <string>
+#include <wms/wmsRefPtr.h>
+#include <wms/wmsReferenced.h>
+#include <wms/wmsUrl.h>
+
+class wmsMemoryStream;
+class WMS_EXPORT wmsClient : public wmsReferenced
+{
+public:
+ wmsClient();
+ ~wmsClient();
+
+ bool getCapabilities(const wmsUrl& url,
+ const std::string filename="")const;
+ wmsUrl getCapabilitiesUrl(const wmsUrl& url)const;
+
+ wmsUrl getMapUrl(const wmsUrl& url,
+ unsigned int width,
+ unsigned int height,
+ const double& minLat,
+ const double& minLon,
+ const double& maxLat,
+ const double& maxLon,
+ const std::string& imageType="",
+ const std::string& version="",
+ const std::string& projection="")const;//"SRS=EPSG:4326")const;
+ bool getMap(const wmsUrl& url,
+ unsigned int width,
+ unsigned int height,
+ const double& minLat,
+ const double& minLon,
+ const double& maxLat,
+ const double& maxLon,
+ const std::string& imageType="",
+ const std::string& version="",
+ const std::string& outputFile="",
+ const std::string& projection="")const;
+
+ bool get(const wmsUrl& url,
+ const std::string& filename="")const;
+
+ wmsRefPtr<wmsMemoryStream> getStream();
+ const wmsRefPtr<wmsMemoryStream> getStream()const;
+
+ void setMaxNumberRetry(unsigned int maxNumberRetry);
+ unsigned int getMaxNumberRetry()const;
+ void setTimeout(unsigned int timeOut);
+ unsigned int getTimeout()const;
+ void setProxyHost(const std::string& host);
+ void setProxyPort(const std::string& port);
+ void setProxyUser(const std::string& user);
+ void setProxyPassword(const std::string passwd);
+ const std::string& proxyHost()const
+ {
+ return theProxyHost;
+ }
+ const std::string& proxyPort()const
+ {
+ return theProxyPort;
+ }
+ const std::string& proxyUser()const
+ {
+ return theProxyUser;
+ }
+ const std::string& proxyPassword()const
+ {
+ return theProxyPassword;
+ }
+protected:
+ std::string theProxyHost;
+ std::string theProxyPort;
+ std::string theProxyUser;
+ std::string theProxyPassword;
+ unsigned int theTimeout;
+ unsigned int theMaxNumberRetry;
+ mutable wmsRefPtr<wmsMemoryStream> theStream;
+};
+
+#endif
diff --git a/libwms/include/wms/wmsCurlMemoryStream.h b/libwms/include/wms/wmsCurlMemoryStream.h
new file mode 100644
index 0000000..d9a4e3b
--- /dev/null
+++ b/libwms/include/wms/wmsCurlMemoryStream.h
@@ -0,0 +1,59 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#ifndef wmsCurlMemoryStream_HEADER
+#define wmsCurlMemoryStream_HEADER
+#include <wms/wmsMemoryStream.h>
+#include <wms/wmsUrl.h>
+#include <wms/wmsReferenced.h>
+#include <wms/wmsRefPtr.h>
+#include <string>
+
+#include <curl/curl.h>
+
+class WMS_EXPORT wmsCurlMemoryStream : public wmsReferenced
+{
+public:
+ wmsCurlMemoryStream(const std::string& url="");
+ ~wmsCurlMemoryStream();
+ bool download(const std::string& filename="");
+ void setUrl(const wmsUrl& url);
+ wmsUrl getUrl()const;
+
+ wmsRefPtr<wmsMemoryStream> getStream();
+ const wmsRefPtr<wmsMemoryStream> getStream()const;
+ void setTimeout(unsigned int timeout);
+ void setMaxNumberRetry(unsigned int retryCount);
+ void setVerboseFlag(bool verboseFlag);
+ void setFollowLocationFlag(unsigned int flag);
+ void setMaxRedirects(unsigned int maxRedirects);
+ void setProxyHost(const std::string& host);
+ void setProxyPort(const std::string& port);
+ void setProxyUser(const std::string& user);
+ void setProxyPassword(const std::string passwd);
+
+protected:
+ wmsRefPtr<wmsMemoryStream> theStream;
+ wmsUrl theUrl;
+ CURL* theCurl;
+ unsigned int theMaxRetryCount;
+ unsigned int theTimeout;
+ bool theVerboseFlag;
+ int theFollowLocationFlag;
+ int theMaxRedirects;
+ std::string theProxyHost;
+ std::string theProxyPort;
+ std::string theProxyUser;
+ std::string theProxyPassword;
+};
+
+#endif
diff --git a/libwms/include/wms/wmsExport.h b/libwms/include/wms/wmsExport.h
new file mode 100644
index 0000000..0a112d8
--- /dev/null
+++ b/libwms/include/wms/wmsExport.h
@@ -0,0 +1,57 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#ifndef wmsExport_HEADER
+#define wmsExport_HEADER
+// define used to include in API which is being fazed out
+// if you can compile your apps with this turned off you are
+// well placed for compatablity with future versions.
+#define USE_DEPRECATED_API
+
+#if defined(_MSC_VER)
+ #pragma warning( disable : 4244 )
+ #pragma warning( disable : 4251 )
+ #pragma warning( disable : 4267 )
+ #pragma warning( disable : 4275 )
+ #pragma warning( disable : 4290 )
+ #pragma warning( disable : 4786 )
+ #pragma warning( disable : 4305 )
+#endif
+
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__)
+# ifdef WMS_LIBRARY
+# define WMS_EXPORT __declspec(dllexport)
+# else
+# define WMS_EXPORT __declspec(dllimport)
+# endif /* WMS_LIBRARY */
+#else
+# define WMS_EXPORT
+#endif
+
+// set up define for whether member templates are supported by VisualStudio compilers.
+#ifdef _MSC_VER
+# if (_MSC_VER >= 1300)
+# define __STL_MEMBER_TEMPLATES
+# endif
+#endif
+
+/* Define NULL pointer value */
+
+#ifndef NULL
+ #ifdef __cplusplus
+ #define NULL 0
+ #else
+ #define NULL ((void *)0)
+ #endif
+#endif
+
+#endif
diff --git a/libwms/include/wms/wmsMemoryStream.h b/libwms/include/wms/wmsMemoryStream.h
new file mode 100644
index 0000000..67f0c75
--- /dev/null
+++ b/libwms/include/wms/wmsMemoryStream.h
@@ -0,0 +1,104 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#ifndef wmsMemoryStream_HEADER
+#define wmsMemoryStream_HEADER
+#include <iostream>
+#include <string>
+#include <streambuf>
+#include <wms/wmsReferenced.h>
+
+class WMS_EXPORT wmsMemoryBufferStream : public std::streambuf
+{
+public:
+ friend class wmsMemoryStream;
+
+ wmsMemoryBufferStream();
+ virtual ~wmsMemoryBufferStream();
+ virtual int overflow(int c);
+ virtual std::streamsize xsputn(const char * pChar, std::streamsize n);
+ virtual std::streamsize xsgetn(char_type* __s, std::streamsize n);
+ virtual pos_type seekoff(off_type t, std::ios_base::seekdir dir,
+ std::ios_base::openmode omode = std::ios_base::in |
+ std::ios_base::out);
+ virtual pos_type seekpos(pos_type posType,
+ std::ios_base::openmode /*__mode*/ = std::ios_base::in | std::ios_base::out);
+ std::streamsize getBufferSize()const;
+ const char_type* getBuffer()const;
+ char_type* getBuffer();
+ virtual int_type underflow();
+ void clear();
+protected:
+ void extendBuffer(std::streamsize n);
+ off_type range(char_type* buf1,
+ char_type* buf2)const;
+ char_type* the_buf;
+
+ /**
+ * @if maint
+ * Actual size of allocated internal buffer, in bytes.
+ * @endif
+ */
+ size_t the_buf_size;
+
+ /**
+ * @if maint
+ * Optimal or preferred size of internal buffer, in bytes.
+ * @endif
+ */
+ size_t the_buf_size_opt;
+
+
+ //@{
+ /**
+ * @if maint
+ * This is based on _IO_FILE, just reordered to be more consistent,
+ * and is intended to be the most minimal abstraction for an
+ * internal buffer.
+ * - get == input == read
+ * - put == output == write
+ * @endif
+ */
+ char_type* the_in_beg; // Start of get area.
+ char_type* the_in_cur; // Current read area.
+ char_type* the_in_end; // End of get area.
+ char_type* the_out_beg; // Start of put area.
+ char_type* the_out_cur; // Current put area.
+ char_type* the_out_end; // End of put area.
+};
+
+class WMS_EXPORT wmsMemoryStream : public wmsReferenced, public std::ostream, public std::istream
+{
+public:
+ wmsMemoryStream() : std::ios(0), std::ostream(&theMemoryBufferStream), std::istream(&theMemoryBufferStream){}
+ virtual ~wmsMemoryStream()
+ {
+ theMemoryBufferStream.pubsync();
+ }
+ wmsMemoryStream(const char* bufferToCopy, std::streamsize size);
+
+ std::streamsize getBufferSize()const;
+ const wmsMemoryBufferStream::char_type* getBuffer()const;
+ wmsMemoryBufferStream::char_type* getBuffer();
+ std::string getBufferAsString()const;
+
+ void clear();
+private:
+ // Copy & assignment are undefined in iostreams
+ wmsMemoryStream & operator=(const wmsMemoryStream&){return *this;}
+ wmsMemoryStream(const wmsMemoryStream& src) : std::ios(0), wmsReferenced(src), std::ostream(&theMemoryBufferStream), std::istream(&theMemoryBufferStream){}
+
+
+ wmsMemoryBufferStream theMemoryBufferStream;
+};
+
+#endif
diff --git a/libwms/include/wms/wmsNotify.h b/libwms/include/wms/wmsNotify.h
new file mode 100644
index 0000000..82da979
--- /dev/null
+++ b/libwms/include/wms/wmsNotify.h
@@ -0,0 +1,86 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#ifndef wmsNotifyContext_HEADER
+#define wmsNotifyContext_HEADER 1
+#include <wms/wmsExport.h>
+#include <iostream>
+#include <string>
+#include <fstream>
+
+/**
+ * Notification level enumeration. This specifies the
+ * level of the mesage being written.
+ */
+WMS_EXPORT enum wmsNotifyLevel
+{
+ wmsNotifyLevel_ALWAYS = 0,
+ wmsNotifyLevel_FATAL = 1,
+ wmsNotifyLevel_WARN = 2,
+ wmsNotifyLevel_NOTICE = 3,
+ wmsNotifyLevel_INFO = 4,
+ wmsNotifyLevel_DEBUG = 5
+};
+
+/**
+ * Flags to allow the user to turn off certain notification levels
+ *
+ */
+WMS_EXPORT enum wmsNotifyFlags
+{
+ wmsNotifyFlags_NONE = 0,
+ wmsNotifyFlags_FATAL = 1,
+ wmsNotifyFlags_WARN = 2,
+ wmsNotifyFlags_NOTICE = 4,
+ wmsNotifyFlags_INFO = 8,
+ wmsNotifyFlags_DEBUG = 16,
+ wmsNotifyFlags_ALL = (wmsNotifyFlags_FATAL|
+ wmsNotifyFlags_WARN|
+ wmsNotifyFlags_NOTICE|
+ wmsNotifyFlags_INFO|
+ wmsNotifyFlags_DEBUG)
+};
+
+WMS_EXPORT void wmsSetDefaultNotifyHandlers();
+
+WMS_EXPORT void wmsSetNotifyStream(std::ostream* outputStream,
+ wmsNotifyFlags whichLevelsToRedirect=wmsNotifyFlags_ALL);
+
+WMS_EXPORT std::ostream* wmsGetNotifyStream(wmsNotifyLevel whichLevel);
+
+WMS_EXPORT bool wmsIsNotifyEnabled();
+
+WMS_EXPORT std::ostream& wmsNotify(wmsNotifyLevel level = wmsNotifyLevel_WARN);
+
+/**
+ *
+ */
+WMS_EXPORT void wmsSetLogFilename(const std::string& filename);
+
+
+/**
+ *
+ */
+WMS_EXPORT void wmsDisableNotify(wmsNotifyFlags notifyLevel=wmsNotifyFlags_ALL);
+
+/**
+ *
+ */
+WMS_EXPORT void wmsEnableNotify(wmsNotifyFlags notifyLevel=wmsNotifyFlags_ALL);
+
+
+WMS_EXPORT void wmsSetNotifyFlag(wmsNotifyFlags notifyFlags);
+WMS_EXPORT void wmsPushNotifyFlags();
+WMS_EXPORT void wmsPopNotifyFlags();
+WMS_EXPORT wmsNotifyFlags wmsGetNotifyFlags();
+
+#endif /* #ifndef wmsNotifyContext_HEADER */
diff --git a/libwms/include/wms/wmsRefPtr.h b/libwms/include/wms/wmsRefPtr.h
new file mode 100644
index 0000000..38a61f3
--- /dev/null
+++ b/libwms/include/wms/wmsRefPtr.h
@@ -0,0 +1,95 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#ifndef wmsRefPtr_HEADER
+#define wmsRefPtr_HEADER
+#include <wms/wmsExport.h>
+
+template<class T>
+class wmsRefPtr
+{
+ public:
+ typedef T element_type;
+
+ wmsRefPtr() :thePtr(0L) {}
+ wmsRefPtr(T* t):thePtr(t) { if (thePtr) thePtr->ref(); }
+ wmsRefPtr(const wmsRefPtr& rp):thePtr(rp.thePtr) { if (thePtr) thePtr->ref(); }
+ ~wmsRefPtr() { if (thePtr) thePtr->unref(); thePtr=0; }
+
+ inline wmsRefPtr& operator = (const wmsRefPtr& rp)
+ {
+ if (thePtr==rp.thePtr) return *this;
+ T* tmpPtr = thePtr;
+ thePtr = rp.thePtr;
+ if (thePtr) thePtr->ref();
+ // unref second to prevent any deletion of any object which might
+ // be referenced by the other object. i.e rp is child of the
+ // original _ptr.
+ if (tmpPtr) tmpPtr->unref();
+ return *this;
+ }
+
+ inline wmsRefPtr& operator = (T* ptr)
+ {
+ if (thePtr==ptr) return *this;
+ T* tmpPtr = thePtr;
+ thePtr = ptr;
+ if (thePtr) thePtr->ref();
+ // unref second to prevent any deletion of any object which might
+ // be referenced by the other object. i.e rp is child of the
+ // original thePtr.
+ if (tmpPtr) tmpPtr->unref();
+ return *this;
+ }
+
+ // comparison operators for wmsRefPtr.
+ inline bool operator == (const wmsRefPtr& rp) const { return (thePtr==rp.thePtr); }
+ inline bool operator != (const wmsRefPtr& rp) const { return (thePtr!=rp.thePtr); }
+ inline bool operator < (const wmsRefPtr& rp) const { return (thePtr<rp.thePtr); }
+ inline bool operator > (const wmsRefPtr& rp) const { return (thePtr>rp.thePtr); }
+
+ // comparion operator for const T*.
+ inline bool operator == (const T* ptr) const { return (thePtr==ptr); }
+ inline bool operator != (const T* ptr) const { return (thePtr!=ptr); }
+ inline bool operator < (const T* ptr) const { return (thePtr<ptr); }
+ inline bool operator > (const T* ptr) const { return (thePtr>ptr); }
+
+
+ inline T& operator*() { return *thePtr; }
+
+ inline const T& operator*() const { return *thePtr; }
+
+ inline T* operator->() { return thePtr; }
+
+ inline const T* operator->() const { return thePtr; }
+
+ inline bool operator!() const { return thePtr==0L; }
+
+ inline bool valid() const { return thePtr!=0L; }
+
+ inline T* get() { return thePtr; }
+
+ inline const T* get() const { return thePtr; }
+
+ /** take control over the object pointed to by ref_ptr, unreference but do not delete even if ref count goes to 0,
+ * return the pointer to the object.
+ * Note, do not use this unless you are 100% sure your code handles the deletion of the object correctly, and
+ * only use when absolutely required.*/
+ inline T* take() { return release();}
+
+ inline T* release() { T* tmp=thePtr; if (thePtr) thePtr->unref_nodelete(); thePtr=0; return tmp;}
+
+ private:
+ T* thePtr;
+};
+
+#endif
diff --git a/libwms/include/wms/wmsReferenced.h b/libwms/include/wms/wmsReferenced.h
new file mode 100644
index 0000000..32f07ff
--- /dev/null
+++ b/libwms/include/wms/wmsReferenced.h
@@ -0,0 +1,57 @@
+#ifndef wmsReferenced_HEADER
+#define wmsReferenced_HEADER
+#include <wms/wmsExport.h>
+
+class WMS_EXPORT wmsReferenced
+{
+ public:
+ wmsReferenced()
+ {
+ theRefCount=0;
+ }
+ wmsReferenced(const wmsReferenced&)
+ {
+ theRefCount=0;
+ }
+
+ inline wmsReferenced& operator = (const wmsReferenced&) { return *this; }
+
+
+ /*! increment the reference count by one, indicating that
+ this object has another pointer which is referencing it.*/
+ inline void ref() const { ++theRefCount; }
+
+ /*! decrement the reference count by one, indicating that
+ a pointer to this object is referencing it. If the
+ reference count goes to zero, it is assumed that this object
+ is no longer referenced and is automatically deleted.*/
+ inline void unref() const;
+
+ /*! decrement the reference count by one, indicating that
+ a pointer to this object is referencing it. However, do
+ not delete it, even if ref count goes to 0. Warning, unref_nodelete()
+ should only be called if the user knows exactly who will
+ be resonsible for, one should prefer unref() over unref_nodelete()
+ as the later can lead to memory leaks.*/
+ inline void unref_nodelete() const { --theRefCount; }
+
+ /*! return the number pointers currently referencing this object. */
+ inline int referenceCount() const { return theRefCount; }
+
+
+ protected:
+ virtual ~wmsReferenced();
+ mutable int theRefCount;
+};
+
+inline void wmsReferenced::unref() const
+{
+ --theRefCount;
+ if (theRefCount==0)
+ {
+ delete this;
+ }
+
+}
+
+#endif
diff --git a/libwms/include/wms/wmsStyle.h b/libwms/include/wms/wmsStyle.h
new file mode 100644
index 0000000..3da84cb
--- /dev/null
+++ b/libwms/include/wms/wmsStyle.h
@@ -0,0 +1,86 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#ifndef wmsStyle_HEADER
+#define wmsStyle_HEADER
+#include <vector>
+#include <string>
+#include <iostream>
+#include <wms/wmsUrl.h>
+#include <wms/wmsReferenced.h>
+
+class wmsStyle : public wmsReferenced
+{
+public:
+ friend std::ostream& operator <<(std::ostream& out, const wmsStyle& src);
+ wmsStyle(){}
+ ~wmsStyle(){}
+ std::string& name()
+ {
+ return theName;
+ }
+ const std::string& name()const
+ {
+ return theName;
+ }
+ std::string& title()
+ {
+ return theTitle;
+ }
+ const std::string& title()const
+ {
+ return theTitle;
+ }
+
+ std::string& abstract()
+ {
+ return theAbstract;
+ }
+ const std::string& abstract()const
+ {
+ return theAbstract;
+ }
+ wmsUrl getLegendUrl(unsigned int idx)const
+ {
+ if(idx < theLegendUrlList.size())
+ {
+ return theLegendUrlList[idx];
+ }
+ return wmsUrl("");
+ }
+ void addLegendUrl(const wmsUrl& legendUrl)
+ {
+ theLegendUrlList.push_back(legendUrl);
+ }
+ const std::vector<wmsUrl>& legendUrlList()const
+ {
+ return theLegendUrlList;
+ }
+ std::vector<wmsUrl>& legendUrlList()
+ {
+ return theLegendUrlList;
+ }
+ void eraseLegendUrl(unsigned int idx)
+ {
+ if(idx < theLegendUrlList.size())
+ {
+ theLegendUrlList.erase(theLegendUrlList.begin()+idx);
+ }
+ }
+protected:
+ std::string theName;
+ std::string theTitle;
+ std::string theAbstract;
+ std::vector<wmsUrl> theLegendUrlList;
+};
+
+#endif
diff --git a/libwms/include/wms/wmsUrl.h b/libwms/include/wms/wmsUrl.h
new file mode 100644
index 0000000..c2c8247
--- /dev/null
+++ b/libwms/include/wms/wmsUrl.h
@@ -0,0 +1,91 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#ifndef wmsUrl_HEADER
+#define wmsUrl_HEADER
+#include <string>
+#include <iostream>
+#include <wms/wmsExport.h>
+
+class WMS_EXPORT wmsUrl
+{
+public:
+ friend WMS_EXPORT std::ostream& operator <<(std::ostream& out, const wmsUrl& src);
+
+ wmsUrl(const char* url)
+ {
+ theUrl = ((url)?url:"");
+ }
+ wmsUrl(const std::string& url="")
+ :theUrl(url)
+ {
+ }
+ wmsUrl(const wmsUrl& src)
+ :theUrl(src.theUrl)
+ {
+ }
+ ~wmsUrl()
+ {}
+
+ /**
+ * Decodes a URL that had encode special characters
+ * using the %.
+ */
+ std::string decode()const;
+ std::string& url()
+ {
+ return theUrl;
+ }
+ const std::string& url()const
+ {
+ return theUrl;
+ }
+
+ bool operator !=(const wmsUrl& rhs)const
+ {
+ return (theUrl!=rhs.theUrl);
+ }
+ bool operator ==(const wmsUrl& rhs)const
+ {
+ return (theUrl==rhs.theUrl);
+ }
+
+ void mergeUrl(const std::string& tempProtocol,
+ const std::string& tempServer,
+ const std::string& tempPath,
+ const std::string& tempOptions);
+ /*!
+ * http://myserver/mypath/toprogram?options=value
+ *
+ * Will be split apart as follows:
+ *
+ * protocol = http
+ * server = myserver
+ * path = mypath/toprogram
+ * options = optoins=value
+ */
+ void splitUrl(std::string& tempProtocol,
+ std::string& tempServer,
+ std::string& tempPath,
+ std::string& tempOptions)const;
+
+
+ std::string protocol()const;
+ std::string server()const;
+ std::string path()const;
+ std::string options()const;
+ protected:
+ std::string theUrl;
+
+};
+
+#endif
diff --git a/libwms/libwms.sln b/libwms/libwms.sln
new file mode 100644
index 0000000..a4388de
--- /dev/null
+++ b/libwms/libwms.sln
@@ -0,0 +1,19 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libwms", "libwms.vcproj", "{544EE0D7-9D17-4CC8-8D65-F89C6C96F9B1}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {544EE0D7-9D17-4CC8-8D65-F89C6C96F9B1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {544EE0D7-9D17-4CC8-8D65-F89C6C96F9B1}.Debug|Win32.Build.0 = Debug|Win32
+ {544EE0D7-9D17-4CC8-8D65-F89C6C96F9B1}.Release|Win32.ActiveCfg = Release|Win32
+ {544EE0D7-9D17-4CC8-8D65-F89C6C96F9B1}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/libwms/libwms.vcproj b/libwms/libwms.vcproj
new file mode 100644
index 0000000..e43265b
--- /dev/null
+++ b/libwms/libwms.vcproj
@@ -0,0 +1,302 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="libwms"
+ ProjectGUID="{544EE0D7-9D17-4CC8-8D65-F89C6C96F9B1}"
+ RootNamespace="libwms"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".\include;"$(OSSIM_DEPENDENCIES)\include""
+ AdditionalUsingDirectories=" "
+ PreprocessorDefinitions="WIN32;_DEBUG;_DLL;WMS_LIBRARY"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(SolutionDir)bin\libwmsd.dll"
+ AdditionalLibraryDirectories=""$(OSSIM_DEPENDENCIES)\lib""
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(SolutionDir)$(ConfigurationName)\lib\libwms.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories=".\include;"$(OSSIM_DEPENDENCIES)\include""
+ PreprocessorDefinitions="WIN32;NDEBUG;_DLL;WMS_LIBRARY"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ PerUserRedirection="true"
+ AdditionalDependencies="libexpat.lib libcurl_imp.lib"
+ OutputFile="$(OutDir)\bin\$(ProjectName).dll"
+ AdditionalLibraryDirectories=""$(OSSIM_DEPENDENCIES)\lib""
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(OutDir)\lib\$(ProjectName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\src\iso8601.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\wms.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\wmsCapabilitiesParser.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\wmsCapabilitiesRoot.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\wmsCapabilitiesState.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\wmsClient.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\wmsCurlMemoryStream.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\wmsMemoryStream.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\wmsNotify.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\wmsReferenced.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\wmsStyle.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\wmsUrl.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\include\wms\iso8601.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\wms\wms.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\wms\wmsCapabilitiesParser.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\wms\wmsCapabilitiesRoot.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\wms\wmsCapabilitiesState.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\wms\wmsClient.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\wms\wmsCurlMemoryStream.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\wms\wmsExport.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\wms\wmsMemoryStream.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\wms\wmsNotify.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\wms\wmsReferenced.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\wms\wmsRefPtr.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\wms\wmsStyle.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\wms\wmsUrl.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/libwms/src/GNUmakefile b/libwms/src/GNUmakefile
new file mode 100644
index 0000000..d5856d6
--- /dev/null
+++ b/libwms/src/GNUmakefile
@@ -0,0 +1,25 @@
+TOPDIR= ..
+include $(TOPDIR)/Make/makedefs
+
+CXXFILES =\
+ iso8601.cpp \
+ wms.cpp \
+ wmsCapabilitiesParser.cpp \
+ wmsCapabilitiesRoot.cpp \
+ wmsCapabilitiesState.cpp \
+ wmsClient.cpp \
+ wmsCurlMemoryStream.cpp \
+ wmsMemoryStream.cpp \
+ wmsNotify.cpp \
+ wmsReferenced.cpp \
+ wmsStyle.cpp \
+ wmsUrl.cpp
+
+DEF += -DWMS_LIBRARY
+
+LIBS += $(OTHER_LIBS)
+
+TARGET_BASENAME = wms
+LIB = $(LIB_PREFIX)$(TARGET_BASENAME).$(LIB_EXT)
+
+include $(TOPDIR)/Make/makerules
diff --git a/libwms/src/iso8601.cpp b/libwms/src/iso8601.cpp
new file mode 100644
index 0000000..2ef89f8
--- /dev/null
+++ b/libwms/src/iso8601.cpp
@@ -0,0 +1,363 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
+#include <cstdlib>
+#include <cmath>
+#include <cstring>
+#include <string>
+#include <cstdio>
+#include "wms/iso8601.h"
+
+bool operator<(const wmsMyTime & a, const wmsMyTime & b)
+{
+ if (a.year != b.year) return (a.year < b.year);
+ if (a.month != b.month) return (a.month < b.month);
+ if (a.day != b.day) return (a.day < b.day);
+ if (a.hour != b.hour) return (a.hour < b.hour);
+ if (a.min != b.min) return (a.min < b.min);
+ if (a.sec != b.sec) return (a.sec < b.sec);
+
+ return false;
+}
+
+bool operator==(const wmsMyTime & a, const wmsMyTime & b)
+{
+ if (a.year == b.year &&
+ a.month == b.month &&
+ a.day == b.day &&
+ a.hour == b.hour &&
+ a.min == b.min &&
+ a.sec == b.sec)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+bool operator!=(const wmsMyTime & a, const wmsMyTime & b)
+{
+ return ! (a == b);
+}
+
+// month is in range [1-12]. Returns 1 if there is a leap day this month/year.
+int wms_leap_days(int year, int month)
+{
+ int result = 0;
+ if ((month-1) % 12 == 1)
+ {
+ if (year % 4 == 0)
+ {
+ // If the year is divisible by 4, this is a leap year.
+ result = 1;
+ if (year % 100 == 0)
+ {
+ // If the year is divisible by 100, this is not a leap year.
+ result = 0;
+ if (year % 400 == 0)
+ {
+ // If the year is divisible by 400, this is a leap year.
+ result = 1;
+ }
+ }
+ }
+ }
+
+ return result;
+}
+
+static int days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+
+wmsMyTime operator+(const wmsMyTime & a, const wmsMyTime & b)
+{
+ wmsMyTime result(a);
+ result.year += b.year;
+ result.month += b.month;
+ result.day += b.day;
+ result.hour += b.hour;
+ result.min += b.min;
+ result.sec += b.sec;
+
+ while (result.sec >= 60)
+ result.sec -= 60, result.min++;
+ while (result.min >= 60)
+ result.min -= 60, result.hour++;
+ while (result.hour >= 24)
+ result.hour -= 24, result.day++;
+
+
+ while (result.day > (days[(result.month-1)%12] + wms_leap_days(result.year, result.month)))
+ {
+ result.day -= days[(result.month-1)%12] + wms_leap_days(result.year, result.month);
+ result.month++;
+ }
+
+ while (result.month > 12)
+ result.month -= 12, result.year++;
+
+ return result;
+}
+
+/* Returns the absolute difference between the two times */
+wmsMyTime operator-(const wmsMyTime & a_src, const wmsMyTime & b_src)
+{
+ if (a_src < b_src)
+ return b_src - a_src;
+
+ wmsMyTime result;
+ wmsMyTime a(a_src);
+ wmsMyTime b(b_src);
+
+ // Debugging
+ //fprintf(stderr, "a-b: (%d %d %d %d %d %.3g)-(%d %d %d %d %d %.3g)=",
+ // a.year, a.month, a.day, a.hour, a.min, a.sec,
+ // b.year, b.month, b.day, b.hour, b.min, b.sec);
+
+ while (a.sec < b.sec)
+ a.min--, a.sec += 60;
+ result.sec = a.sec - b.sec;
+
+ while (a.min < b.min)
+ a.hour--, a.min += 60;
+ result.min = a.min - b.min;
+
+ while (a.hour < b.hour)
+ a.day--, a.hour += 24;
+ result.hour = a.hour - b.hour;
+
+ while (a.day < b.day)
+ {
+ a.month--;
+ a.day += days[(a.month+11)%12] + wms_leap_days(a.year, a.month);
+ }
+ result.day = a.day - b.day;
+
+ while (a.month < b.month)
+ a.year--, a.month += 12;
+ result.month = a.month - b.month;
+
+ result.year = a.year - b.year;
+
+ // Debugging
+ //fprintf(stderr, "(%d %d %d %d %d %.3g)\n", result.year,
+ // result.month, result.day, result.hour, result.min, result.sec);
+
+ return result;
+}
+
+void wms_parse_time(wmsMyTime & t, const std::string & str)
+{
+ int loc, loc2;
+
+ // year
+ loc = str.find_first_of("0123456789");
+ loc2 = str.find_first_not_of("0123456789", loc);
+ if (loc < 0 || loc == loc2)
+ return;
+ t.year = atoi(str.substr(loc, loc2-loc).c_str());
+
+ // month
+ //loc = strcspn(cp, "- \t");
+ loc = str.find_first_of("0123456789", loc2);
+ loc2 = str.find_first_not_of("0123456789", loc);
+ if (loc < 0 || loc == loc2)
+ return;
+ t.month = atoi(str.substr(loc, loc2-loc).c_str());
+
+ // day
+ loc = str.find_first_of("0123456789", loc2);
+ loc2 = str.find_first_not_of("0123456789", loc);
+ if (loc < 0 || loc == loc2)
+ return;
+ t.day = atoi(str.substr(loc, loc2-loc).c_str());
+
+ // hour
+ loc = str.find_first_of("0123456789", loc2);
+ loc2 = str.find_first_not_of("0123456789", loc);
+ if (loc < 0 || loc == loc2)
+ return;
+ t.hour = atoi(str.substr(loc, loc2-loc).c_str());
+
+ // minute
+ loc = str.find_first_of("0123456789", loc2);
+ loc2 = str.find_first_not_of("0123456789", loc);
+ if (loc < 0 || loc == loc2)
+ return;
+ t.min = atoi(str.substr(loc, loc2-loc).c_str());
+
+ // second
+ loc = str.find_first_of("0123456789.", loc2);
+ loc2 = str.find_first_not_of("0123456789.", loc);
+ if (loc < 0 || loc == loc2)
+ return;
+ t.sec = atof(str.substr(loc, loc2-loc).c_str());
+}
+
+void wms_parse_period(wmsMyTime & t, const std::string & str)
+{
+ const char *cp = str.c_str();
+
+ bool t_flag = false; // true after a T is parsed
+
+ while (cp && *cp)
+ {
+ int loc = strspn(cp, "0123456789.");
+ std::string str(cp, loc);
+ cp += loc;
+
+ switch(*cp)
+ {
+ case 'P':
+ break;
+ case 'Y':
+ t.year = atoi(str.c_str());
+ break;
+ case 'M':
+ if (t_flag)
+ t.min = atoi(str.c_str());
+ else
+ t.month = atoi(str.c_str());
+ break;
+ case 'D':
+ t.day = atoi(str.c_str());
+ break;
+ case 'T':
+ t_flag = true;
+ break;
+ case 'H':
+ t.hour = atoi(str.c_str());
+ break;
+ case 'S':
+ t.sec = atof(str.c_str());
+ break;
+ default:
+ // Illegal character; ignore
+ break;
+ }
+
+ if (*cp) cp++;
+ }
+}
+
+
+
+std::string wms_iso8601_time(const wmsMyTime & t)
+{
+ // Debugging
+ //printf("iso8601_time: %dy %dm %dd %dh %dm %.6gs\n",
+ // t.year, t.month, t.day, t.hour, t.min, t.sec);
+
+ char buf[400];
+ std::string result;
+
+ snprintf(buf, sizeof(buf), "%04d-%02d-%02d", t.year, t.month, t.day);
+ result = buf;
+
+ if (t.hour >= 0)
+ {
+ snprintf(buf, sizeof(buf), "T%02d", t.hour);
+ result += buf;
+
+ if (t.min >= 0)
+ {
+ snprintf(buf, sizeof(buf), ":%02d", t.min);
+ result += buf;
+
+ if (t.sec >= 0)
+ {
+ int int_sec = (int) floor(t.sec);
+ snprintf(buf, sizeof(buf), ":%02d", int_sec);
+ result += buf;
+
+ int frac = (int) (floor((t.sec - int_sec) * 1000.0));
+ if (frac > 0)
+ {
+ snprintf(buf, sizeof(buf), ".%03d", frac);
+ result += frac;
+ }
+ }
+ }
+ result += "Z";
+ }
+
+ return result;
+}
+
+std::string wms_iso8601_time(const std::string & str)
+{
+ wmsMyTime t = { -1, -1, -1, -1, -1, -1 };
+ wms_parse_time(t, str);
+ return wms_iso8601_time(t);
+}
+
+std::string wms_iso8601_period(const wmsMyTime & t)
+{
+ std::string first; // Contains years, months, days
+ std::string second; // Hours, minutes, seconds
+ char buf[400];
+
+ if (t.year != 0)
+ {
+ snprintf(buf, 400, "%d", t.year);
+ first += buf;
+ first += "Y";
+ }
+
+ if (t.month != 0)
+ {
+ snprintf(buf, 400, "%d", t.month);
+ first += buf;
+ first += "M";
+ }
+
+ if (t.day != 0)
+ {
+ snprintf(buf, 400, "%d", t.day);
+ first += buf;
+ first += "D";
+ }
+
+ if (t.hour != 0)
+ {
+ snprintf(buf, 400, "%d", t.hour);
+ second += buf;
+ second += "H";
+ }
+
+ if (t.min != 0)
+ {
+ snprintf(buf, 400, "%d", t.min);
+ second += buf;
+ second += "M";
+ }
+
+ if (t.sec != 0)
+ {
+ snprintf(buf, 400, "%.3g", t.sec);
+ second += buf;
+ second += "S";
+ }
+
+ std::string result = first;
+ if (second != "")
+ {
+ result += "T";
+ result += second;
+ }
+
+ return result;
+}
+
diff --git a/libwms/src/wms.cpp b/libwms/src/wms.cpp
new file mode 100644
index 0000000..7df1b3e
--- /dev/null
+++ b/libwms/src/wms.cpp
@@ -0,0 +1,45 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#include <wms/wms.h>
+#include <curl/curl.h>
+#include <algorithm>
+#include <ctype.h>
+
+std::string wmsUpcase(const std::string& input)
+{
+ std::string s(input);
+
+ std::string::iterator eachCharacter = s.begin();
+ while(eachCharacter != s.end())
+ {
+ *eachCharacter = toupper(*eachCharacter);
+ ++eachCharacter;
+ }
+
+ return s;
+}
+
+bool wmsStringContains(const std::string& srcStr, const std::string& searchStr)
+{
+ return (srcStr.find(searchStr)!=std::string::npos);
+}
+
+void wmsInitialize()
+{
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+}
+
+void wmsFinalize()
+{
+ curl_global_cleanup();
+}
diff --git a/libwms/src/wmsCapabilitiesParser.cpp b/libwms/src/wmsCapabilitiesParser.cpp
new file mode 100644
index 0000000..769534b
--- /dev/null
+++ b/libwms/src/wmsCapabilitiesParser.cpp
@@ -0,0 +1,648 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#include <cstring>
+#include <sstream>
+#include <fstream>
+#include <map>
+#include <vector>
+#include <expat.h>
+#include <wms/wmsCapabilitiesParser.h>
+#include <wms/wmsCapabilitiesState.h>
+#include <wms/wmsCapabilitiesRoot.h>
+#include <wms/wmsStyle.h>
+#include <wms/wmsMemoryStream.h>
+#include <wms/iso8601.h>
+
+wmsCapabilitiesParser::wmsCapabilitiesParser()
+{
+ theRoot = NULL;
+}
+
+wmsCapabilitiesParser::~wmsCapabilitiesParser()
+{
+}
+
+wmsRefPtr<wmsCapabilitiesRoot> wmsCapabilitiesParser::parse(const std::string& inputFile)
+{
+ std::ifstream in;
+
+ in.open(inputFile.c_str(),
+ std::ios::in|std::ios::binary);
+
+ return parse(in);
+}
+
+wmsRefPtr<wmsCapabilitiesRoot> wmsCapabilitiesParser::parse(std::istream& in)
+{
+ if(!in)
+ {
+ return 0;
+ }
+ theRoot = new wmsCapabilitiesRoot;
+ theStateStack.push_back(theRoot->root());
+
+ std::stringstream out;
+ char c;
+ while(!in.fail())
+ {
+ in.get(c);
+ if(!in.fail())
+ {
+ out << (char)c;
+ }
+ }
+ out << std::endl;
+
+ std::string s = out.str();
+ if(s!="")
+ {
+ XML_Parser p = XML_ParserCreate(NULL);
+ XML_SetElementHandler(p, wmsCapabilitiesParser::start, wmsCapabilitiesParser::end);
+ XML_SetCharacterDataHandler(p, wmsCapabilitiesParser::handler);
+ XML_SetUserData(p, this);
+ int done = 0;
+ if(!XML_Parse(p, (char*)s.c_str(), s.size(), done))
+ {
+ theRoot = new wmsCapabilitiesRoot;
+ return 0;
+ }
+ }
+ else
+ {
+ theRoot = new wmsCapabilitiesRoot;
+
+ return 0;
+ }
+ theStateStack.clear();
+
+ return theRoot.get();
+}
+
+wmsRefPtr<wmsCapabilitiesRoot> wmsCapabilitiesParser::parseRawString(const std::string& rawCapabilities)
+{
+ std::istringstream in(rawCapabilities);
+
+ return parse(in);
+}
+
+void printMultimap(const std::multimap<std::string, std::string>& mmap)
+{
+ std::multimap<std::string, std::string>::const_iterator iter = mmap.begin();
+ while(iter != mmap.end())
+ {
+ std::cout << "<" << (*iter).first << ", " << (*iter).second << ">"<<std::endl;
+ ++iter;
+ }
+
+}
+
+void wmsCapabilitiesParser::start(void *data, const char *element, const char **attrs)
+{
+ wmsCapabilitiesParser* parse = (wmsCapabilitiesParser*)data;
+ if(!parse) return;
+
+ std::string el(element);
+
+ typedef std::multimap<std::string, std::string> attr_t;
+ attr_t attr;
+ int i;
+ for (i = 0; attrs[i]; i+=2)
+ {
+ attr.insert(attr_t::value_type(attrs[i], attrs[i + 1]));
+ }
+// std::cout << "ATTRIBUTES for " << el << std::endl;
+// printMultimap(attr);
+ std::vector<wmsRefPtr<wmsCapabilitiesState> >& stateStack = parse->getStateStack();
+ std::vector<std::string>& tagStack = parse->getTagStack();
+
+ if(stateStack.size() < 1)
+ {
+ return;
+ }
+ wmsRefPtr<wmsCapabilitiesState> layer = stateStack[stateStack.size() - 1];
+
+ std::vector<wmsStyle>::iterator style = layer->styles().end();
+ if (layer->styles().size() > 0)
+ {
+ style = layer->styles().begin() + layer->styles().size() - 1;
+ }
+
+ if (el == "WMT_MS_Capabilities" || el == "WMS_Capabilities" )
+ {
+ if (attr.find("version") != attr.end())
+ {
+ parse->root()->wmsVersion() = attr.find("version")->second;
+ }
+ }
+
+ // Place an extra newline in the abstract when the ContactInformation
+ // tag is encountered.
+ if (el == "ContactInformation")
+ {
+ layer->contactInformation() = trim(layer->contactInformation());
+ }
+ std::string wmsVersion = parse->root()->wmsVersion();
+ if (wmsVersion < "1.3.0" && el == "Extent")
+ {
+ if (attr.find("name") != attr.end() &&
+ attr.find("name")->second == "time")
+ {
+ parse->processTimeExtent() = true;
+ if (attr.find("default") != attr.end())
+ {
+ layer->timeDefault() = attr.find("default")->second;
+ }
+ }
+ }
+
+ if (wmsVersion >= "1.3.0" && el == "Dimension")
+ {
+ if (attr.find("name") != attr.end() &&
+ attr.find("name")->second == "time" &&
+ attr.find("units") != attr.end() &&
+ attr.find("units")->second == "ISO8601")
+ {
+ parse->processTimeExtent() = true;
+ if (attr.find("default") != attr.end())
+ layer->timeDefault() = attr.find("default")->second;
+ }
+ }
+ if (((wmsVersion >= "1.3.0" && el == "Dimension") ||
+ (wmsVersion < "1.3.0" && el == "Extent")) &&
+ attr.find("name") != attr.end() &&
+ attr.find("name")->second == "dim_sequence")
+ {
+ parse->processDimSeqExtent() = true;
+ if (attr.find("default") != attr.end())
+ {
+ layer->dimSeqDefault() = attr.find("default")->second;
+ }
+ layer->dimSeqBegin() = "";
+ layer->dimSeqEnd() = "";
+ layer->dimSeqStep() = "";
+ }
+
+ if (el == "Dimension")
+ {
+ if (attr.find("name") != attr.end() &&
+ attr.find("name")->second == "moving_bbox_sequence")
+ {
+ layer->isSequence() = true;
+ }
+ }
+
+ // This tag probably only exists for wms version <= 1.1.1
+ if (el == "LatLonBoundingBox" && parse->getTagDepth("Layer"))
+ {
+ layer->latMin() = attr.find("miny")->second;
+ layer->latMax() = attr.find("maxy")->second;
+ layer->lonMin() = attr.find("minx")->second;
+ layer->lonMax() = attr.find("maxx")->second;
+ }
+ else if (el == "BoundingBox" && parse->getTagDepth("Layer"))
+ {
+ attr_t::iterator it = attr.find("SRS");
+ if (it == attr.end())
+ {
+ it = attr.find("CRS");
+ }
+ if (it != attr.end())
+ {
+ if ((wmsVersion < "1.3.0" && it->second == "EPSG:4326") ||
+ it->second == "CRS:84")
+ {
+ layer->latMin() = attr.find("miny")->second;
+ layer->latMax() = attr.find("maxy")->second;
+ layer->lonMin() = attr.find("minx")->second;
+ layer->lonMax() = attr.find("maxx")->second;
+ }
+ }
+ }
+
+ if (el == "Style")
+ {
+ layer->addStyle(wmsStyle());
+ }
+
+
+ // This usage is for old versions of WMS (1.0.0)
+ if (parse->getTagDepth("Format") &&
+ (el == "JPEG" ||
+ el == "PNG" ||
+ el == "GeoTIFF" ||
+ el == "TIFF" ||
+ el == "GIF"))
+ {
+ layer->formats().push_back(trim(el));
+ }
+ // This usage is for old versions of WMS (1.0.0)
+ if ((el == "Get") && (parse->getTagDepth("GetMap") || parse->getTagDepth("Map"))) {
+ if (attr.find("onlineResource") != attr.end())
+ {
+ parse->root()->wmsServerUrl() = attr.find("onlineResource")->second;
+ }
+ }
+
+ else if (el == "OnlineResource")
+ {
+ if ((parse->getTagDepth("GetMap") || parse->getTagDepth("Map")) && parse->getTagDepth("Get"))
+ {
+ if (attr.find("xlink:href") != attr.end())
+ {
+ parse->root()->wmsServerUrl() = attr.find("xlink:href")->second;
+ }
+ }
+ else if (parse->getTagDepth("Style") && parse->getTagDepth("LegendURL"))
+ {
+ if (style != layer->styles().end() &&
+ attr.find("xlink:href") != attr.end())
+ {
+ wmsUrl legend_url;
+ legend_url.url() = attr.find("xlink:href")->second;
+ style->addLegendUrl(legend_url);
+ }
+ }
+ }
+ else if(el == "ScaleHint")
+ {
+ if (attr.find("min") != attr.end())
+ {
+ layer->minScaleHint() = attr.find("min")->second;
+ }
+ if (attr.find("max") != attr.end())
+ {
+ layer->maxScaleHint() = attr.find("max")->second;
+ }
+ }
+ else if (el == "Layer")
+ {
+ wmsCapabilitiesState *newLayer = new wmsCapabilitiesState;
+ newLayer->inherit(*stateStack[stateStack.size()-1]);
+ stateStack[stateStack.size()-1]->addChild(newLayer);
+ stateStack.push_back(newLayer);
+ if(attr.find("fixedWidth") != attr.end())
+ {
+ newLayer->fixedWidth() = atoi(attr.find("fixedWidth")->second.c_str());
+ }
+ if(attr.find("fixedHeight") != attr.end())
+ {
+ newLayer->fixedHeight() = atoi(attr.find("fixedHeight")->second.c_str());
+ }
+ if(attr.find("queryable") != attr.end())
+ {
+ newLayer->queryableFlag() = attr.find("queryable")->second;
+ }
+ if(attr.find("opaque") != attr.end())
+ {
+ newLayer->opaqueFlag() = attr.find("opaque")->second;
+ }
+ if(attr.find("cascaded") != attr.end())
+ {
+ newLayer->cascadedFlag() = attr.find("cascaded")->second;
+ }
+ }
+ tagStack.push_back(el);
+}
+
+void wmsCapabilitiesParser::end(void *data, const char *element)
+{
+ wmsCapabilitiesParser* parse = (wmsCapabilitiesParser*)data;
+ std::vector<wmsRefPtr<wmsCapabilitiesState> >& stateStack = parse->getStateStack();
+ std::vector<std::string>& tagStack = parse->getTagStack();
+ wmsRefPtr<wmsCapabilitiesState> layer = stateStack[stateStack.size() - 1];
+ if(!parse) return;
+ std::string el(element);
+
+ if(el == "ServiceExceptionReport")
+ {
+ }
+ else if(el == "Layer")
+ {
+ stateStack.pop_back();
+ }
+ else if (el == "Extent") {
+ parse->processTimeExtent() = false;
+ parse->processDimSeqExtent() = false;
+ }
+ else if (el == "Dimension")
+ {
+ parse->processTimeExtent() = false;
+ parse->processDimSeqExtent() = false;
+ }
+
+ std::string startTag = tagStack[tagStack.size() - 1];
+ if (startTag != el)
+ {
+ std::cerr << "End tag " << el << " does not match start tag " << startTag << ".\n";
+ }
+
+ tagStack.pop_back();
+}
+
+void wmsCapabilitiesParser::handler(void *data, const char *element, int len)
+{
+ wmsCapabilitiesParser* parse = (wmsCapabilitiesParser*)data;
+ std::string el(element, len);
+
+ if(parse->getStateStack().size() < 1)
+ {
+ // need an exception here
+ return;
+ }
+ wmsRefPtr<wmsCapabilitiesState> layer = parse->getStateStack()[parse->getStateStack().size() - 1];
+
+ if (parse->getTagDepth("Service"))
+ {
+ if (parse->getTagDepth("Title"))
+ {
+ layer->title() = el;
+ }
+ if (parse->getTagDepth("Abstract"))
+ {
+ layer->abstract() += el;
+ }
+ if (parse->getTagDepth("ContactPerson"))
+ {
+ layer->contactPerson() += el;
+ }
+ if (parse->getTagDepth("ContactOrganization"))
+ {
+ layer->contactOrganization() += el ;
+ }
+ if (parse->getTagDepth("Address"))
+ {
+ layer->address() += el;
+ }
+ if (parse->getTagDepth("City"))
+ {
+ layer->city() += el;
+ }
+ if (parse->getTagDepth("StateOrProvince"))
+ {
+ layer->stateOrProvince() += el;
+ }
+ if (parse->getTagDepth("PostCode"))
+ {
+ layer->postalCode() += el;
+ }
+ if (parse->getTagDepth("Country"))
+ {
+ layer->country() += el;
+ }
+ if (parse->getTagDepth("ContactVoiceTelephone"))
+ {
+ layer->voiceTelephone() += el;
+ }
+ if (parse->getTagDepth("ContactFacsimileTelephone"))
+ {
+ layer->faxNumber() += el;
+ }
+ if (parse->getTagDepth("ContactElectronicMailAddress"))
+ {
+ layer->emailAddress() += el;
+ }
+ if (parse->getTagDepth("Fees"))
+ {
+ layer->fees() += el;
+ }
+ if (parse->getTagDepth("AccessConstraints"))
+ {
+ layer->accessContraints() += el;
+ }
+ }
+
+ // Process tags under Layer.
+ if (parse->getTagDepth("Layer"))
+ {
+ if (parse->getTagDepth("Style"))
+ {
+ std::vector<wmsStyle>& styles = layer->styles();
+ unsigned num_styles = styles.size();
+ if (parse->getTagDepth("Name"))
+ {
+ styles[num_styles - 1].name() += el;
+ }
+ else if (parse->getTagDepth("Title"))
+ {
+ styles[num_styles - 1].title() += el;
+ }
+ else if (parse->getTagDepth("Abstract"))
+ {
+ styles[num_styles - 1].abstract() += el;
+ }
+ }
+ else if (parse->getTagDepth("Attribution"))
+ {
+ // We don't care about Title in Attribution, so we have to
+ // exclude it here or else it will be used.
+ }
+ else
+ {
+ // We are now inside a Layer but not inside an Attribution or Style.
+ if (parse->getTagDepth("Name"))
+ {
+ layer->name() += el;
+ }
+ else if (parse->getTagDepth("Title"))
+ {
+ layer->title() += el;
+ }
+ else if (parse->getTagDepth("Abstract"))
+ {
+ layer->abstract() += el;
+ }
+ else if(parse->getTagDepth("MinScaleDenominator"))
+ {
+ layer->minScaleDenominator() += el;
+ }
+ }
+ } // end if for processing layer section
+
+ if (parse->getTagDepth("Capability"))
+ {
+ if (parse->getTagDepth("Request"))
+ {
+ if (parse->getTagDepth("Map") || parse->getTagDepth("GetMap"))
+ {
+ if (parse->getTagDepth("Format"))
+ {
+ layer->formats().push_back(trim(el));
+ }
+ }
+ }
+ }
+ // Add all of the times singly to the times array even if there is
+ // an indicated period. It could be complicated.
+ if ((parse->getTagDepth("Extent") || parse->getTagDepth("Dimension")) &&
+ parse->processTimeExtent())
+ {
+ // If we got our times from the parent, we need to remove them
+ // since the WMS spec says that child values replace the parent
+ // values.
+ if (layer->inheritedTimes())
+ {
+ layer->times().clear();
+ layer->inheritedTimes() = false;
+ }
+ parse->addTimes(layer->times(), el);
+ }
+ if ((parse->getTagDepth("Extent") || parse->getTagDepth("Dimension")) &&
+ parse->processDimSeqExtent())
+ {
+ std::string::size_type a = 0, b = 0;
+ a = el.find_first_not_of("/", b);
+ b = el.find_first_of("/", a);
+ layer->dimSeqBegin() = el.substr(a, b-a);
+ a = el.find_first_not_of("/", b);
+ b = el.find_first_of("/", a);
+ layer->dimSeqEnd() = el.substr(a, b-a);
+ a = el.find_first_not_of("/", b);
+ b = el.find_first_of("/", a);
+ layer->dimSeqStep() = el.substr(a, b-a);
+ }
+}
+
+unsigned int wmsCapabilitiesParser::getTagDepth(const std::string& tag)const
+{
+ if(theTagStack.size() < 1) return 0;
+
+ for (int i = ((int) theTagStack.size()) - 1; i >= 0; i--)
+ {
+ if (theTagStack[i] == tag)
+ {
+ return theTagStack.size() - (unsigned int) i;
+ }
+ }
+
+ return 0;
+}
+
+std::vector<wmsRefPtr<wmsCapabilitiesState> >& wmsCapabilitiesParser::getStateStack()
+{
+ return theStateStack;
+}
+
+std::vector<std::string>& wmsCapabilitiesParser::getTagStack()
+{
+ return theTagStack;
+}
+
+std::string wmsCapabilitiesParser::trim(const std::string& s)
+{
+ int firstpos = s.find_first_not_of("\t\n\r ");
+ int lastpos = s.find_last_not_of("\t\n\r ");
+ std::string result;
+
+ if (firstpos >= 0 && lastpos >= 0)
+ {
+ result = std::string(s, firstpos, lastpos - firstpos + 1);
+ }
+
+ return result;
+
+}
+
+wmsRefPtr<wmsCapabilitiesRoot> wmsCapabilitiesParser::root()
+{
+ return theRoot;
+}
+
+const wmsRefPtr<wmsCapabilitiesRoot> wmsCapabilitiesParser::root()const
+{
+ return theRoot;
+}
+
+const bool& wmsCapabilitiesParser::processDimSeqExtent()const
+{
+ return theProcessDimSeqExtent;
+}
+
+bool& wmsCapabilitiesParser::processDimSeqExtent()
+{
+ return theProcessDimSeqExtent;
+}
+
+bool& wmsCapabilitiesParser::processTimeExtent()
+{
+ return theProcessTimeExtent;
+}
+
+const bool& wmsCapabilitiesParser::processTimeExtent()const
+{
+ return theProcessTimeExtent;
+}
+
+void wmsCapabilitiesParser::addTimes(std::vector<std::string> & times, std::string el)
+{
+ // Separate element by commas
+ const char *cp = el.c_str();
+ while (cp && *cp)
+ {
+ int loc = strcspn(cp, " \t\r\n,");
+ std::string sub(cp, loc);
+
+ // sub now contains a single time or a periodic interval. We
+ // don't do well with time fragments.
+
+ if (strchr(sub.c_str(), '/'))
+ {
+ // We have a period. Get the three components: start, end, period
+
+ wmsMyTime start_time = { -1, -1, -1, -1, -1, -1 };
+ wmsMyTime end_time = { -1, -1, -1, -1, -1, -1 };
+ wmsMyTime period = { 0, 0, 0, 0, 0, 0 };
+ wmsMyTime nullPeriod = { 0, 0, 0, 0, 0, 0 };
+
+ const char *comp = sub.c_str();
+ int comploc;
+
+ comploc = strcspn(comp, "/");
+ std::string start_time_str(comp, comploc);
+ comp += comploc + 1;
+
+ comploc = strcspn(comp, "/");
+ std::string end_time_str(comp, comploc);
+ comp += comploc + 1;
+
+ std::string period_str(comp);
+
+ wms_parse_time(start_time, start_time_str);
+ wms_parse_time(end_time, end_time_str);
+ wms_parse_period(period, period_str);
+
+ if(period == nullPeriod)
+ {
+ times.push_back(wms_iso8601_time(start_time));
+ times.push_back(wms_iso8601_time(end_time));
+ }
+ else
+ {
+ while (start_time < end_time)
+ {
+ times.push_back(wms_iso8601_time(start_time));
+ start_time = start_time + period;
+ }
+ times.push_back(wms_iso8601_time(end_time));
+ }
+ }
+ else
+ {
+ // Whew. We have a single time. This is easy.
+ times.push_back(wms_iso8601_time(sub));
+ }
+
+ cp += loc;
+ cp += strspn(cp, " \t\r\n,");
+ }
+}
+
diff --git a/libwms/src/wmsCapabilitiesRoot.cpp b/libwms/src/wmsCapabilitiesRoot.cpp
new file mode 100644
index 0000000..8c73317
--- /dev/null
+++ b/libwms/src/wmsCapabilitiesRoot.cpp
@@ -0,0 +1,149 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#include <wms/wmsCapabilitiesRoot.h>
+#include <wms/wmsCapabilitiesState.h>
+
+std::ostream& operator <<(std::ostream& out, const wmsCapabilitiesRoot& src)
+{
+ out << "WmsVersion: " << src.theWmsVersion << std::endl
+ << "WmsServer: " << src.theWmsServerUrl << std::endl
+ << *src.root();
+
+ return out;
+}
+
+wmsCapabilitiesRoot::wmsCapabilitiesRoot()
+{
+ theRootLayer = new wmsCapabilitiesState;
+}
+
+wmsCapabilitiesRoot::~wmsCapabilitiesRoot()
+{
+ theRootLayer = NULL;
+}
+
+wmsRefPtr<wmsCapabilitiesState> wmsCapabilitiesRoot::root()
+{
+ return theRootLayer;
+}
+
+const wmsRefPtr<wmsCapabilitiesState> wmsCapabilitiesRoot::root()const
+{
+ return theRootLayer;
+}
+
+const std::string& wmsCapabilitiesRoot::wmsVersion()const
+{
+ return theWmsVersion;
+}
+
+std::string& wmsCapabilitiesRoot::wmsVersion()
+{
+ return theWmsVersion;
+}
+
+const std::string& wmsCapabilitiesRoot::wmsServerUrl()const
+{
+ return theWmsServerUrl;
+}
+
+std::string& wmsCapabilitiesRoot::wmsServerUrl()
+{
+ return theWmsServerUrl;
+}
+
+wmsRefPtr<wmsCapabilitiesState> wmsCapabilitiesRoot::getNodeGivenName(const std::string& name)
+{
+ if(theRootLayer->name() == name)
+ {
+ return theRootLayer.get();
+ }
+ if(theRootLayer->hasChildren())
+ {
+ std::vector<wmsRefPtr<wmsCapabilitiesState> > stateStack;
+ stateStack = theRootLayer->children();
+ while(stateStack.size()>0)
+ {
+ wmsRefPtr<wmsCapabilitiesState> current = stateStack[stateStack.size()-1];
+ stateStack.pop_back();
+ if(current.valid())
+ {
+ if(current->name() == name)
+ {
+ return current.get();
+ }
+ if(current->hasChildren())
+ {
+ stateStack.insert(stateStack.end(),
+ current->children().begin(),
+ current->children().end());
+ }
+ }
+ }
+ }
+
+ return 0;
+}
+
+void wmsCapabilitiesRoot::getLeafNodes(std::vector<wmsRefPtr<wmsCapabilitiesState> >& leafNodes, bool includeGroupNodes)
+{
+ if(!theRootLayer.valid()) return;
+
+ if(theRootLayer->hasChildren())
+ {
+ std::vector<wmsRefPtr<wmsCapabilitiesState> > stateStack;
+ stateStack = theRootLayer->children();
+ while(stateStack.size()>0)
+ {
+ wmsRefPtr<wmsCapabilitiesState> current = stateStack[stateStack.size()-1];
+ stateStack.pop_back();
+ if(current.valid())
+ {
+ if(current->hasChildren())
+ {
+ stateStack.insert(stateStack.end(),
+ current->children().begin(),
+ current->children().end());
+ if(includeGroupNodes&& (current.get() != root().get()))
+ {
+ leafNodes.push_back(current);
+ }
+ }
+ else
+ {
+ leafNodes.push_back(current);
+ }
+ }
+ }
+ }
+ else
+ {
+ leafNodes.push_back(theRootLayer);
+ }
+}
+
+bool wmsCapabilitiesRoot::getLatLonBoundingBox(double& minLat,
+ double& minLon,
+ double& maxLat,
+ double& maxLon)const
+{
+ if(theRootLayer.valid())
+ {
+ return theRootLayer->getLatLonBoundingBox(minLat,
+ minLon,
+ maxLat,
+ maxLon);
+ }
+ return false;
+}
+
diff --git a/libwms/src/wmsCapabilitiesState.cpp b/libwms/src/wmsCapabilitiesState.cpp
new file mode 100644
index 0000000..bef60fc
--- /dev/null
+++ b/libwms/src/wmsCapabilitiesState.cpp
@@ -0,0 +1,297 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#include <cstdlib>
+#include <cstring>
+#include <iterator>
+#include <wms/wmsCapabilitiesState.h>
+
+std::ostream& operator <<(std::ostream& out, const wmsCapabilitiesState& src)
+{
+ unsigned int idx = 0;
+ out << "Name: " << src.theName << std::endl
+ << "Title: " << src.theTitle << std::endl
+ << "Abstract: " << src.theAbstract << std::endl
+ << "Contact Person: " << src.theContactPerson << std::endl
+ << "Contact Organization: " << src.theContactOrganization << std::endl
+ << "Contact Information: " << src.theContactInformation << std::endl
+ << "Address: " << src.theAddress << std::endl
+ << "City: " << src.theCity << std::endl
+ << "State or Province: " << src.theStateOrProvince << std::endl
+ << "Postal Code: " << src.thePostalCode << std::endl
+ << "Country: " << src.theCountry << std::endl
+ << "Voice Telephone: " << src.theVoiceTelephone << std::endl
+ << "Fax Number: " << src.theFaxNumber << std::endl
+ << "E-mail Address: " << src.theEmailAddress << std::endl
+ << "Fees: " << src.theFees << std::endl
+ << "Access Contraints: " << src.theAccessConstraints << std::endl
+ << "LatMin: " << src.theLatMin << std::endl
+ << "LatMax: " << src.theLatMax << std::endl
+ << "LonMin: " << src.theLonMin << std::endl
+ << "LonMax: " << src.theLonMax << std::endl
+ << "Min Scale Hint: " << src.theMinScaleHint << std::endl
+ << "Max Scale Hint: " << src.theMaxScaleHint << std::endl
+ << "Min Scale Denom: " << src.theMinScaleDenominator << std::endl
+ << "TimeDefault: " << src.theTimeDefault << std::endl
+ << "DimSeqBegin: " << src.theDimSeqBegin << std::endl
+ << "DimSeqEnd: " << src.theDimSeqEnd << std::endl
+ << "DimSeqStep: " << src.theDimSeqStep << std::endl
+ << "DimSeqDefault: " << src.theDimSeqDefault << std::endl
+ << "OpaqueFlag: " << src.theOpaqueFlag << std::endl
+ << "NoSubsets: " << src.theNoSubsets << std::endl
+ << "FixedWidth: " << src.theFixedWidth << std::endl
+ << "FixedHeight: " << src.theFixedHeight << std::endl
+ << "InheritedTimes: " << src.theInheritedTimes << std::endl
+ << "Children: " << src.theChildren.size() << std::endl
+ << "IsSequence: " << src.theIsSequence << std::endl
+ << "Queryable: " << src.theQueryableFlag << std::endl
+ << "Opaque: " << src.theOpaqueFlag << std::endl
+ << "Cascaded: " << src.theCascadedFlag << std::endl;
+
+ if(src.theStyles.size()>0)
+ {
+ out << "STYLES\n" << std::endl;
+ for(idx = 0; idx < (src.theStyles.size()-1); ++idx)
+ {
+ out << src.theStyles[idx] << std::endl;
+ }
+ out << src.theStyles[src.theStyles.size()-1];
+
+ }
+ if(src.formats().size() > 0)
+ {
+ if(src.theStyles.size() > 0)
+ {
+ out << std::endl;
+ }
+ out << "Formats: ";
+ for(idx = 0; idx < src.formats().size()-1; ++idx)
+ {
+ out << src.formats()[idx] << " ";
+ }
+ out << src.formats()[src.formats().size()-1] << " ";
+ }
+
+ if(src.times().size() > 0)
+ {
+ out << std::endl;
+ out << "Times: ";
+ for(idx = 0; idx < src.times().size()-1; ++idx)
+ {
+ out << src.getTime(idx) << ", ";
+ }
+ out << src.times()[src.times().size()-1] << " ";
+ }
+ if(src.theChildren.size()>0)
+ {
+ if(src.formats().size() > 0)
+ {
+ out << std::endl;
+ }
+ for(idx = 0; idx < (src.theChildren.size()-1);++idx)
+ {
+ if(src.theChildren[idx].valid())
+ {
+ out << "Child " << idx << std::endl
+ << *src.theChildren[idx] << std::endl;
+ }
+ }
+ if(src.theChildren[src.theChildren.size()-1].valid())
+ {
+ out << "Child " << (src.theChildren.size()-1) << std::endl
+ << *src.theChildren[src.theChildren.size()-1];
+ }
+ }
+ return out;
+}
+
+
+wmsCapabilitiesState::~wmsCapabilitiesState()
+{
+}
+
+wmsCapabilitiesState::wmsCapabilitiesState()
+{
+ theLatMin = "-90";
+ theLatMax = "90";
+ theLonMin = "-180";
+ theLonMax = "180";
+
+ theNoSubsets = false;
+ theFixedWidth = 0;
+ theFixedHeight = 0;
+
+ theInheritedTimes = false;
+ theIsSequence = false;
+}
+
+void wmsCapabilitiesState::inherit(const wmsCapabilitiesState& src)
+{
+ theStyles = src.theStyles;
+ theLatMin = src.theLatMin;
+ theLatMax = src.theLatMax;
+ theLonMin = src.theLonMin;
+ theLonMax = src.theLonMax;
+ theTimes = src.theTimes;
+ theTimeDefault = src.theTimeDefault;
+ theDimSeqBegin = src.theDimSeqBegin;
+ theDimSeqEnd = src.theDimSeqEnd;
+ theDimSeqStep = src.theDimSeqStep;
+ theDimSeqDefault = src.theDimSeqDefault;
+ theNoSubsets = src.theNoSubsets;
+ theFixedWidth = src.theFixedWidth;
+ theFixedHeight = src.theFixedHeight;
+ theFormats = src.theFormats;
+ theInheritedTimes = src.theInheritedTimes;
+ theIsSequence = src.theIsSequence;
+ theMinScaleHint = src.theMinScaleHint;
+ theMaxScaleHint = src.theMaxScaleHint;
+}
+
+wmsRefPtr<wmsCapabilitiesState> wmsCapabilitiesState::child(unsigned int idx)
+{
+ if(idx < theChildren.size())
+ {
+ return theChildren[idx];
+ }
+ return NULL;
+}
+
+const wmsRefPtr<wmsCapabilitiesState> wmsCapabilitiesState::child(unsigned int idx)const
+{
+ if(idx < theChildren.size())
+ {
+ return theChildren[idx];
+ }
+ return NULL;
+}
+
+
+void wmsCapabilitiesState::addChild(wmsCapabilitiesState* child)
+{
+ theChildren.push_back(child);
+}
+
+
+bool wmsCapabilitiesState::getLatLonBoundingBox(double& minLat,
+ double& minLon,
+ double& maxLat,
+ double& maxLon)const
+{
+ bool validChildBounds = false;
+ double tempMinLat = 0.0;
+ double tempMinLon = 0.0;
+ double tempMaxLat = 0.0;
+ double tempMaxLon = 0.0;
+ if(hasChildren())
+ {
+ unsigned int idx = 0;
+ for(idx = 0; idx < theChildren.size(); ++idx)
+ {
+
+ if(theChildren[idx].valid()&&
+ theChildren[idx]->getLatLonBoundingBox(tempMinLat,
+ tempMinLon,
+ tempMaxLat,
+ tempMaxLon))
+ {
+ if(!validChildBounds)
+ {
+ minLat = tempMinLat;
+ minLon = tempMinLon;
+ maxLat = tempMaxLat;
+ maxLon = tempMaxLon;
+ validChildBounds = true;
+ }
+ else
+ {
+ if(tempMinLat < minLat)
+ {
+ minLat = tempMinLat;
+ }
+ if(tempMinLon < minLon)
+ {
+ minLon = tempMinLon;
+ }
+ if(tempMaxLat > maxLat)
+ {
+ maxLat = tempMaxLat;
+ }
+ if(tempMaxLon > maxLon)
+ {
+ maxLon = tempMaxLon;
+ }
+ }
+ }
+ }
+ }
+
+ if((theLatMin == "") ||
+ (theLonMin == "") ||
+ (theLatMax == "") ||
+ (theLonMax == "") )
+ {
+ if(validChildBounds)
+ {
+ return true;
+ }
+ }
+
+ tempMinLat = atof(theLatMin.c_str());
+ tempMinLon = atof(theLonMin.c_str());
+ tempMaxLat = atof(theLatMax.c_str());
+ tempMaxLon = atof(theLonMax.c_str());
+
+ if(tempMinLat < -90.0)
+ {
+ tempMinLat = -90.0;
+ }
+ if(tempMinLon < -180.0)
+ {
+ tempMinLon = -180.0;
+ }
+ if(tempMaxLat > 90.0)
+ {
+ tempMaxLat = 90.0;
+ }
+ if(tempMaxLon > 180.0)
+ {
+ tempMaxLon = 180.0;
+ }
+ if(validChildBounds)
+ {
+ if(tempMinLat < minLat)
+ {
+ minLat = tempMinLat;
+ }
+ if(tempMinLon < minLon)
+ {
+ minLon = tempMinLon;
+ }
+ if(tempMaxLat > maxLat)
+ {
+ maxLat = tempMaxLat;
+ }
+ if(tempMaxLon > maxLon)
+ {
+ maxLon = tempMaxLon;
+ }
+ }
+ else
+ {
+ minLat = tempMinLat;
+ minLon = tempMinLon;
+ maxLat = tempMaxLat;
+ maxLon = tempMaxLon;
+ }
+ return true;
+}
diff --git a/libwms/src/wmsClient.cpp b/libwms/src/wmsClient.cpp
new file mode 100644
index 0000000..3a4844e
--- /dev/null
+++ b/libwms/src/wmsClient.cpp
@@ -0,0 +1,244 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#include <sstream>
+#include <wms/wmsClient.h>
+#include <wms/wmsCurlMemoryStream.h>
+#include <wms/wmsUrl.h>
+#include <wms/wmsMemoryStream.h>
+#include <string.h>
+#include <wms/wms.h>
+#include <iomanip>
+
+wmsClient::wmsClient()
+ :theTimeout(0),
+ theMaxNumberRetry(5)
+{
+}
+
+wmsClient::~wmsClient()
+{
+}
+
+wmsUrl wmsClient::getMapUrl(const wmsUrl& url,
+ unsigned int width,
+ unsigned int height,
+ const double& minLat,
+ const double& minLon,
+ const double& maxLat,
+ const double& maxLon,
+ const std::string& imageFormat,
+ const std::string& version,
+ const std::string& projection)const
+{
+ wmsUrl tempUrl = url;
+ std::stringstream s;
+ std::string protocol = url.protocol();
+ std::string server = url.server();
+ std::string path = url.path();
+ std::string options = url.options();
+ s << "REQUEST=GetMap";
+
+ if(!version.empty())
+ {
+ s<<"&VERSION=" <<version;
+ }
+ if(!imageFormat.empty())
+ {
+ s << "&FORMAT=" << imageFormat;
+ }
+ if(!projection.empty())
+ {
+ s<< "&SRS=" << projection;
+ }
+
+ s << "&WIDTH=" << width
+ << "&HEIGHT=" << height << std::setiosflags(std::ios::fixed)
+ << std::setprecision(15)
+ << "&BBOX="<<minLon <<","<<minLat<<","<<maxLon<<","<<maxLat;
+
+ if(options == "")
+ {
+ options = s.str();
+ }
+ else if( (*(--options.end())) != '&')
+ {
+ options += "&";
+ }
+ options += s.str();
+ tempUrl.mergeUrl(protocol,
+ server,
+ path,
+ options);
+
+ return tempUrl;
+};
+
+bool wmsClient::getMap(const wmsUrl& url,
+ unsigned int width,
+ unsigned int height,
+ const double& minLat,
+ const double& minLon,
+ const double& maxLat,
+ const double& maxLon,
+ const std::string& imageFormat,
+ const std::string& version,
+ const std::string& filename,
+ const std::string& projection)const
+{
+ wmsUrl tempUrl = getMapUrl(url,
+ width,
+ height,
+ minLat,
+ minLon,
+ maxLat,
+ maxLon,
+ imageFormat,
+ version,
+ projection);
+
+ return get(tempUrl, filename);
+}
+
+
+bool wmsClient::getCapabilities(const wmsUrl& url,
+ const std::string filename)const
+{
+ wmsUrl tempUrl = getCapabilitiesUrl(url);
+ if(!tempUrl.url().empty())
+ {
+ return get(tempUrl, filename);
+ }
+
+ return false;
+}
+
+wmsUrl wmsClient::getCapabilitiesUrl(const wmsUrl& url)const
+{
+ wmsUrl result;
+ if(url!= "")
+ {
+ std::string optionStr = url.options();
+ std::string request = url.options();
+ optionStr = wmsUpcase(optionStr);
+ if (!wmsStringContains(optionStr, "REQUEST"))
+ {
+ if(optionStr == "")
+ {
+ request = "REQUEST=GetCapabilities";
+ }
+ else
+ {
+ request = request+"&REQUEST=GetCapabilities";
+ }
+ }
+ if(!wmsStringContains(optionStr,"VERSION"))
+ {
+ request = request + "&VERSION=1.0";
+ }
+ if(!wmsStringContains(optionStr, "SERVICE"))
+ {
+ request = request + "&SERVICE=WMS";
+ }
+ result.mergeUrl("http",
+ url.server(),
+ url.path(),
+ request);
+ }
+
+ return result;
+}
+
+
+
+bool wmsClient::get(const wmsUrl& url,
+ const std::string& filename)const
+{
+ bool result = false;
+ theStream = 0;
+ wmsRefPtr<wmsCurlMemoryStream> curlMemoryStream = new wmsCurlMemoryStream;
+
+ if(url!= "")
+ {
+ curlMemoryStream->setUrl(url.url());
+ curlMemoryStream->setTimeout(theTimeout);
+ curlMemoryStream->setMaxNumberRetry(theMaxNumberRetry);
+ curlMemoryStream->setProxyHost(theProxyHost);
+ curlMemoryStream->setProxyPort(theProxyPort);
+ curlMemoryStream->setProxyUser(theProxyUser);
+ curlMemoryStream->setProxyPassword(theProxyPassword);
+ result = curlMemoryStream->download(filename);
+ if(result&&(filename==""))
+ {
+ if(curlMemoryStream->getStream().valid())
+ {
+ theStream = new wmsMemoryStream(curlMemoryStream->getStream()->getBuffer(),
+ curlMemoryStream->getStream()->getBufferSize());
+ theStream->seekg(0);
+ theStream->seekp(0);
+ }
+ }
+ }
+
+ return result;
+}
+
+wmsRefPtr<wmsMemoryStream> wmsClient::getStream()
+{
+ return theStream.get();
+}
+
+const wmsRefPtr<wmsMemoryStream> wmsClient::getStream()const
+{
+ return theStream.get();
+}
+
+void wmsClient::setMaxNumberRetry(unsigned int maxNumberRetry)
+{
+ theMaxNumberRetry = maxNumberRetry;
+}
+
+unsigned int wmsClient::getMaxNumberRetry()const
+{
+ return theMaxNumberRetry;
+}
+
+
+void wmsClient::setTimeout(unsigned int timeout)
+{
+ theTimeout = timeout;
+}
+
+unsigned int wmsClient::getTimeout()const
+{
+ return theTimeout;
+}
+
+void wmsClient::setProxyHost(const std::string& host)
+{
+ theProxyHost = host;
+}
+
+void wmsClient::setProxyPort(const std::string& port)
+{
+ theProxyPort = port;
+}
+
+void wmsClient::setProxyUser(const std::string& user)
+{
+ theProxyUser = user;
+}
+
+void wmsClient::setProxyPassword(const std::string passwd)
+{
+ theProxyPassword = passwd;
+}
diff --git a/libwms/src/wmsCurlMemoryStream.cpp b/libwms/src/wmsCurlMemoryStream.cpp
new file mode 100644
index 0000000..d8b7b37
--- /dev/null
+++ b/libwms/src/wmsCurlMemoryStream.cpp
@@ -0,0 +1,215 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#include <cstdlib>
+#include <wms/wmsCurlMemoryStream.h>
+#include <wms/wmsNotify.h>
+#include <fstream>
+#include <sstream>
+
+struct wmsCurlMemoryStreamStruct
+{
+ wmsCurlMemoryStreamStruct()
+ {
+ curlStream = 0;
+ }
+ std::ostream* curlStream;
+};
+
+static int wmsCurlWrite(void *buffer, size_t size, size_t nmemb, void *stream)
+{
+ int rc = 0;
+
+ wmsCurlMemoryStreamStruct *out=(struct wmsCurlMemoryStreamStruct *)stream;
+
+// if(out->curlStream->getStream()->good())
+// {
+// out->curlStream->getStream()->write((char*)buffer, nmemb*size);
+// rc = nmemb*size;
+// }
+
+ if(out->curlStream&&out->curlStream->good())
+ {
+ out->curlStream->write((char*)buffer, nmemb*size);
+ rc = nmemb*size;
+ }
+
+ return rc;
+}
+
+wmsCurlMemoryStream::wmsCurlMemoryStream(const std::string& url)
+{
+ theMaxRedirects = 1;
+ theFollowLocationFlag = 0;
+ theCurl = curl_easy_init();
+ curl_easy_setopt(theCurl, CURLOPT_WRITEFUNCTION, wmsCurlWrite);
+ setUrl(url);
+ theMaxRetryCount = 5;
+ theTimeout = 0;
+ theVerboseFlag = false;
+ theStream = new wmsMemoryStream;
+#ifdef WMS_DEBUG
+ theVerboseFlag = true;
+#endif
+
+}
+
+wmsCurlMemoryStream::~wmsCurlMemoryStream()
+{
+ if(theCurl)
+ {
+ curl_easy_cleanup(theCurl);
+ theCurl = NULL;
+ }
+
+ theStream->clear();
+}
+
+void wmsCurlMemoryStream::setUrl(const wmsUrl& url)
+{
+ theUrl = url;
+ curl_easy_setopt(theCurl, CURLOPT_URL, theUrl.url().c_str());
+}
+
+wmsUrl wmsCurlMemoryStream::getUrl()const
+{
+ return theUrl;
+}
+
+void wmsCurlMemoryStream::setFollowLocationFlag(unsigned int flag)
+{
+ theFollowLocationFlag = flag;
+}
+
+void wmsCurlMemoryStream::setMaxRedirects(unsigned int maxRedirects)
+{
+ theMaxRedirects = maxRedirects;
+}
+
+bool wmsCurlMemoryStream::download(const std::string& filename)
+{
+ std::string authenticationString;
+
+ theStream = new wmsMemoryStream;
+ std::ostream* outStream = theStream.get();
+ bool needToDeleteStream = false;
+ bool result = false;
+ wmsCurlMemoryStreamStruct outStruct;
+ theStream->clear();
+ if(filename != "")
+ {
+ std::ofstream* outFileStream = new std::ofstream;
+ outFileStream->open(filename.c_str(),
+ std::ios::out|std::ios::binary);
+ if(!outFileStream->fail())
+ {
+ outStream = outFileStream;
+ needToDeleteStream = true;
+ }
+ else
+ {
+ delete outFileStream;
+ outFileStream = 0;
+ }
+ }
+ outStruct.curlStream = outStream;
+ curl_easy_setopt(theCurl, CURLOPT_FOLLOWLOCATION, theFollowLocationFlag);
+ curl_easy_setopt(theCurl, CURLOPT_MAXREDIRS, theMaxRedirects);
+ curl_easy_setopt(theCurl, CURLOPT_WRITEDATA, (void*)(&outStruct));
+ if(!theProxyHost.empty())
+ {
+ if(!theProxyUser.empty())
+ {
+ authenticationString = theProxyUser+":"+theProxyPassword;
+ curl_easy_setopt(theCurl, CURLOPT_PROXYUSERPWD, authenticationString.c_str());
+ }
+ curl_easy_setopt(theCurl, CURLOPT_PROXY,theProxyHost.c_str());
+ if(!theProxyPort.empty())
+ {
+ curl_easy_setopt(theCurl, CURLOPT_PROXYPORT, std::atoi(theProxyPort.c_str()));
+ }
+ }
+
+ curl_easy_setopt(theCurl, CURLOPT_VERBOSE, theVerboseFlag);
+ if(theTimeout > 0)
+ {
+ curl_easy_setopt(theCurl, CURLOPT_TIMEOUT, theTimeout);
+ }
+ int rc = curl_easy_perform(theCurl);
+ result = (rc < 1);
+ unsigned int currentCount = 0;
+ while(!result &&
+ (currentCount < theMaxRetryCount))
+ {
+ wmsNotify(wmsNotifyLevel_WARN) << "wmsCurlMemoryStream::download() INFO: ***** reattempting HTTP::GET *****" << std::endl;
+ rc = curl_easy_perform(theCurl);
+ result = (rc < 1);
+ ++currentCount;
+ }
+
+ if(!result)
+ {
+ wmsNotify(wmsNotifyLevel_WARN) << "wmsCurlMemoryStream::download() WARNING: Unable to get address: " << theUrl << std::endl;
+ }
+
+ if(needToDeleteStream)
+ {
+ delete outStream;
+ }
+
+ return result;
+}
+
+wmsRefPtr<wmsMemoryStream> wmsCurlMemoryStream::getStream()
+{
+ return theStream;
+}
+
+const wmsRefPtr<wmsMemoryStream> wmsCurlMemoryStream::getStream()const
+{
+ return theStream;
+}
+
+void wmsCurlMemoryStream::setTimeout(unsigned int timeout)
+{
+ theTimeout = timeout;
+}
+void wmsCurlMemoryStream::setMaxNumberRetry(unsigned int retryCount)
+{
+ theMaxRetryCount = retryCount;
+}
+
+void wmsCurlMemoryStream::setVerboseFlag(bool verboseFlag)
+{
+ theVerboseFlag = verboseFlag;
+}
+
+void wmsCurlMemoryStream::setProxyHost(const std::string& host)
+{
+ theProxyHost = host;
+}
+
+void wmsCurlMemoryStream::setProxyPort(const std::string& port)
+{
+ theProxyPort = port;
+}
+
+void wmsCurlMemoryStream::setProxyUser(const std::string& user)
+{
+ theProxyUser = user;
+}
+
+void wmsCurlMemoryStream::setProxyPassword(const std::string passwd)
+{
+ theProxyPassword = passwd;
+}
+
diff --git a/libwms/src/wmsMemoryStream.cpp b/libwms/src/wmsMemoryStream.cpp
new file mode 100644
index 0000000..5c81fbc
--- /dev/null
+++ b/libwms/src/wmsMemoryStream.cpp
@@ -0,0 +1,279 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#include <cstring>
+#include <wms/wmsMemoryStream.h>
+#include <iostream>
+#include <iterator>
+
+wmsMemoryBufferStream::wmsMemoryBufferStream()
+{
+ the_buf_size = 0;
+ the_buf = 0;
+ the_buf_size_opt = the_buf_size;
+ the_in_beg = the_buf;
+ the_in_end = the_buf;
+ the_out_beg = the_buf;
+ the_out_end = the_in_end;
+ the_in_cur = the_buf;
+ the_out_cur = the_buf;
+}
+
+wmsMemoryBufferStream::~wmsMemoryBufferStream()
+{
+ clear();
+}
+
+int wmsMemoryBufferStream::overflow(int c)
+{
+ extendBuffer(1);
+ *the_out_cur = (char_type)c;
+ the_out_cur += 1;
+
+ return c;
+}
+
+std::streamsize wmsMemoryBufferStream::xsputn(const char * pChar, std::streamsize n)
+{
+ if(n == 0) return 0;
+
+ std::streampos r1 = range(the_out_beg, the_out_end);
+ std::streampos r2 = range(the_out_cur, the_out_beg);
+
+ if((r2 - r1) < n)
+ {
+ extendBuffer(n - (r2-r1));
+ }
+
+ memcpy(the_out_cur, pChar, n);
+
+ the_out_cur += n;
+
+ return n;
+}
+
+std::streamsize wmsMemoryBufferStream::xsgetn(char_type* __s, std::streamsize n)
+{
+ std::streampos r1 = range(the_in_cur, the_in_end);
+
+ std::streamsize bytesToRead = n;
+ if(r1 < n)
+ {
+ bytesToRead = r1;
+ }
+ memcpy(__s, the_in_cur, bytesToRead);
+
+ the_in_cur += bytesToRead;
+
+ if(bytesToRead > 0)
+ {
+ return n;
+ }
+ return 0;
+}
+
+wmsMemoryBufferStream::pos_type wmsMemoryBufferStream::seekoff(off_type t,
+ std::ios_base::seekdir dir,
+ std::ios_base::openmode omode )
+{
+ off_type offsetType = -1;
+ char_type *beg = 0;
+ char_type *end = 0;
+ char_type *cur = 0;
+ char_type *buf = the_buf;
+ if(omode == std::ios_base::in)
+ {
+ beg = the_in_beg;
+ end = the_in_end;
+ cur = the_in_cur;
+ }
+ else if(omode == std::ios_base::out)
+ {
+ beg = the_out_beg;
+ end = the_out_end;
+ cur = the_out_cur;
+ }
+ switch(dir)
+ {
+ case std::ios_base::cur:
+ {
+ offsetType =range(buf,cur) + t;
+ break;
+ }
+ case std::ios_base::beg:
+ {
+ offsetType =range(buf, beg) + t;
+ break;
+ }
+ case std::ios_base::end:
+ {
+ offsetType =range(buf, end)+t;
+ break;
+ }
+ default:
+ {
+ // error
+ }
+ }
+
+ return pos_type(offsetType);
+}
+
+wmsMemoryBufferStream::pos_type wmsMemoryBufferStream::seekpos(pos_type posType,
+ std::ios_base::openmode omode)
+{
+ sync();
+ pos_type pType = -1;
+ if(omode == std::ios_base::in)
+ {
+ if(posType < range(the_in_beg, the_in_end))
+ {
+ the_in_cur = the_in_beg + posType;
+ pType = posType;
+ }
+ }
+ else if(omode == std::ios_base::out)
+ {
+ if(posType < range(the_out_beg, the_out_end))
+ {
+ the_out_cur = the_out_beg + posType;
+ pType = posType;
+ }
+ }
+
+ return pType;
+}
+
+
+void wmsMemoryBufferStream::extendBuffer(std::streamsize n)
+{
+ if(the_buf_size == 0)
+ {
+ the_buf = new char_type[n];
+ the_buf_size = n;
+ the_buf_size_opt = the_buf_size;
+ the_in_beg = the_buf;
+ the_in_end = the_buf + n;
+ the_out_beg = the_buf;
+ the_out_end = the_in_end;
+ the_in_cur = the_buf;
+ the_out_cur = the_buf;
+ }
+ else
+ {
+ char_type* tempBuf = new char_type[the_buf_size + n];
+ memcpy(tempBuf, the_buf, the_buf_size);
+
+ std::streamsize offin = range(the_in_cur, the_in_beg);
+ std::streamsize offout = range(the_out_cur, the_out_beg);
+ delete [] the_buf;
+ the_buf = tempBuf;
+ the_buf_size += n;
+ the_buf_size_opt = the_buf_size;
+ the_in_beg = the_buf;
+ the_in_end = the_buf + the_buf_size;
+ the_out_beg = the_buf;
+ the_out_end = the_in_end;
+
+ the_in_cur = the_buf + offin;
+ the_out_cur = the_buf + offout;
+ }
+}
+
+wmsMemoryBufferStream::off_type wmsMemoryBufferStream::range(char_type* buf1,
+ char_type* buf2)const
+{
+ if(buf1 < buf2)
+ {
+ return (wmsMemoryBufferStream::off_type)(buf2-buf1);
+ }
+
+ return (wmsMemoryBufferStream::off_type)(buf1-buf2);
+}
+
+wmsMemoryBufferStream::int_type wmsMemoryBufferStream::underflow()
+{
+ return traits_type::eof();
+}
+
+void wmsMemoryBufferStream::clear()
+{
+ if(the_buf)
+ {
+ delete [] the_buf;
+ the_buf = 0;
+ }
+ the_buf_size = 0;
+ the_buf = 0;
+ the_buf_size_opt = the_buf_size;
+ the_in_beg = the_buf;
+ the_in_end = the_buf;
+ the_out_beg = the_buf;
+ the_out_end = the_in_end;
+ the_in_cur = the_buf;
+ the_out_cur = the_buf;
+}
+
+std::streamsize wmsMemoryBufferStream::getBufferSize()const
+{
+ return (std::streamsize)the_buf_size;
+}
+
+const wmsMemoryBufferStream::char_type* wmsMemoryBufferStream::getBuffer()const
+{
+ return the_buf;
+}
+
+wmsMemoryBufferStream::char_type* wmsMemoryBufferStream::getBuffer()
+{
+ return the_buf;
+}
+
+std::streamsize wmsMemoryStream::getBufferSize()const
+{
+ return theMemoryBufferStream.getBufferSize();
+}
+
+const wmsMemoryBufferStream::char_type* wmsMemoryStream::getBuffer()const
+{
+ return theMemoryBufferStream.getBuffer();
+}
+
+wmsMemoryBufferStream::char_type* wmsMemoryStream::getBuffer()
+{
+ return theMemoryBufferStream.getBuffer();
+}
+
+void wmsMemoryStream::clear()
+{
+ theMemoryBufferStream.clear();
+}
+
+wmsMemoryStream::wmsMemoryStream(const char* buf, std::streamsize size)
+ : std::ios(0), std::ostream(&theMemoryBufferStream), std::istream(&theMemoryBufferStream)
+{
+ if(buf)
+ {
+ write(buf, size);
+ }
+}
+std::string wmsMemoryStream::getBufferAsString()const
+{
+ if(getBuffer())
+ {
+ return std::string(getBuffer(),
+ getBuffer() + getBufferSize());
+ }
+
+ return std::string("");
+}
+
diff --git a/libwms/src/wmsNotify.cpp b/libwms/src/wmsNotify.cpp
new file mode 100644
index 0000000..d43d113
--- /dev/null
+++ b/libwms/src/wmsNotify.cpp
@@ -0,0 +1,359 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#include <wms/wmsNotify.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <stack>
+#include <fstream>
+
+static std::ostream* theWmsFatalStream = &std::cerr;
+static std::ostream* theWmsWarnStream = &std::cerr;
+static std::ostream* theWmsInfoStream = &std::cout;
+static std::ostream* theWmsNoticeStream = &std::cout;
+static std::ostream* theWmsDebugStream = &std::cout;
+static std::ostream* theWmsAlwaysStream = &std::cout;
+
+static wmsNotifyFlags theNotifyFlags = wmsNotifyFlags_ALL;
+static std::stack<wmsNotifyFlags> theNotifyFlagsStack;
+
+template <class charT, class traits = std::char_traits<charT> >
+class wmsNullBufferStream : public std::basic_streambuf<charT, traits>
+{
+public:
+ wmsNullBufferStream(){};
+
+
+protected:
+
+ std::streamsize xsputn(const charT * /*pChar*/, std::streamsize /*n*/)
+ {
+ return 0;
+ }
+
+private:
+ wmsNullBufferStream(const wmsNullBufferStream&);
+ wmsNullBufferStream& operator=(const wmsNullBufferStream&);
+};
+
+template <class charT, class traits = std::char_traits<charT> >
+class wmsLogFileBufferStream : public std::basic_streambuf<charT, traits>
+{
+public:
+ wmsLogFileBufferStream(){};
+
+ void setLogFilename(const std::string& file)
+ {
+ theLogFilename = file;
+ }
+ std::string getLogFilename()const
+ {
+ return theLogFilename;
+ }
+
+protected:
+ std::string theLogFilename;
+ virtual int overflow(int c)
+ {
+ if(!traits::eq_int_type(c, traits::eof()))
+ {
+ char tempStr[2];
+ tempStr[0] = c;
+ tempStr[1] = '\0';
+
+ tempString = tempString + tempStr;
+ }
+
+ return c;
+ }
+
+ virtual std::streamsize xsputn(const charT * pChar, std::streamsize n)
+ {
+ tempString = tempString + std::string(pChar, pChar + n);
+
+ return n;
+ }
+
+ virtual int sync()
+ {
+ if ( theLogFilename.size() && tempString.size() )
+ {
+ std::ofstream outFile( theLogFilename.c_str(),
+ std::ios::app|std::ios::out );
+ if (outFile.good())
+ {
+ outFile.write(tempString.c_str(), tempString.length());
+ tempString = "";
+ }
+ }
+ return 0;
+ }
+
+private:
+ std::string tempString;
+
+ wmsLogFileBufferStream(const wmsLogFileBufferStream&);
+ wmsLogFileBufferStream& operator=(const wmsLogFileBufferStream&);
+};
+
+
+class wmsNullStream : public std::ostream
+{
+public:
+ wmsNullStream() : std::ios(0),std::ostream(&nullBufferStream){}
+ virtual ~wmsNullStream()
+ {
+ nullBufferStream.pubsync();
+ }
+
+private:
+ wmsNullBufferStream<char> nullBufferStream;
+ // Copy & assignment are undefined in iostreams
+ wmsNullStream(const wmsNullStream&);
+ wmsNullStream & operator=(const wmsNullStream&);
+};
+
+class wmsLogFileStream : public std::ostream
+{
+public:
+ wmsLogFileStream() : std::ios(0),std::ostream(&theLogFileBufferStream){}
+ virtual ~wmsLogFileStream()
+ {
+ theLogFileBufferStream.pubsync();
+ }
+ void setLogFilename(const std::string& filename)
+ {
+ theLogFileBufferStream.setLogFilename(filename);
+ }
+ std::string getLogFilename()const
+ {
+ return theLogFileBufferStream.getLogFilename();
+ }
+
+private:
+ wmsLogFileBufferStream<char> theLogFileBufferStream;
+ // Copy & assignment are undefined in iostreams
+ wmsLogFileStream(const wmsLogFileStream&);
+ wmsLogFileStream & operator=(const wmsLogFileStream&);
+};
+
+static wmsNullStream theWmsNullStream;
+static wmsLogFileStream theLogFileStream;
+
+void wmsSetDefaultNotifyHandlers()
+{
+ theWmsFatalStream = &std::cerr;
+ theWmsWarnStream = &std::cout;
+ theWmsInfoStream = &std::cout;
+ theWmsNoticeStream = &std::cout;
+ theWmsDebugStream = &std::cout;
+ theWmsAlwaysStream = &std::cout;
+}
+
+void wmsSetNotifyStream(std::ostream* outputStream,
+ wmsNotifyFlags whichLevelsToRedirect)
+{
+ if(whichLevelsToRedirect&wmsNotifyFlags_FATAL)
+ {
+ theWmsFatalStream = outputStream;
+ }
+ if(whichLevelsToRedirect&wmsNotifyFlags_WARN)
+ {
+ theWmsWarnStream = outputStream;
+ }
+ if(whichLevelsToRedirect&wmsNotifyFlags_INFO)
+ {
+ theWmsInfoStream = outputStream;
+ }
+ if(whichLevelsToRedirect&wmsNotifyFlags_NOTICE)
+ {
+ theWmsNoticeStream = outputStream;
+ }
+ if(whichLevelsToRedirect&wmsNotifyFlags_DEBUG)
+ {
+ theWmsDebugStream = outputStream;
+ }
+}
+
+std::ostream* wmsGetNotifyStream(wmsNotifyLevel whichLevel)
+{
+ std::ostream* notifyStream = &theWmsNullStream;
+
+ switch(whichLevel)
+ {
+ case wmsNotifyLevel_ALWAYS:
+ {
+ notifyStream = theWmsAlwaysStream;
+ break;
+ }
+ case wmsNotifyLevel_FATAL:
+ {
+ notifyStream = theWmsFatalStream;
+ break;
+ }
+ case wmsNotifyLevel_WARN:
+ {
+ notifyStream = theWmsWarnStream;
+ break;
+ }
+ case wmsNotifyLevel_INFO:
+ {
+ notifyStream = theWmsInfoStream;
+ break;
+ }
+ case wmsNotifyLevel_NOTICE:
+ {
+ notifyStream = theWmsNoticeStream;
+ break;
+ }
+ case wmsNotifyLevel_DEBUG:
+ {
+ notifyStream = theWmsDebugStream;
+ break;
+ }
+ }
+ return notifyStream;
+}
+
+std::ostream& wmsNotify(wmsNotifyLevel level)
+{
+ if(wmsIsNotifyEnabled())
+ {
+ if(theLogFileStream.getLogFilename() != "")
+ {
+ return theLogFileStream;
+ }
+ else
+ {
+ bool reportMessageFlag = false;
+ switch(level)
+ {
+ case wmsNotifyLevel_ALWAYS:
+ {
+ reportMessageFlag = true;
+ break;
+ }
+ case wmsNotifyLevel_FATAL:
+ {
+ if(theNotifyFlags&wmsNotifyFlags_FATAL)
+ {
+ reportMessageFlag = true;
+ }
+ break;
+ }
+ case wmsNotifyLevel_WARN:
+ {
+ if(theNotifyFlags&wmsNotifyFlags_WARN)
+ {
+ reportMessageFlag = true;
+ }
+ break;
+ }
+ case wmsNotifyLevel_INFO:
+ {
+ if(theNotifyFlags&wmsNotifyFlags_INFO)
+ {
+ reportMessageFlag = true;
+ }
+ break;
+ }
+ case wmsNotifyLevel_NOTICE:
+ {
+ if(theNotifyFlags&wmsNotifyFlags_NOTICE)
+ {
+ reportMessageFlag = true;
+ }
+ break;
+ }
+ case wmsNotifyLevel_DEBUG:
+ {
+ if(theNotifyFlags&wmsNotifyFlags_DEBUG)
+ {
+ reportMessageFlag = true;
+ }
+ break;
+ }
+ }
+ if(reportMessageFlag)
+ {
+ return *wmsGetNotifyStream(level);
+ }
+ }
+ }
+
+ return theWmsNullStream;
+}
+
+void wmsSetLogFilename(const std::string& filename)
+{
+ theLogFileStream.setLogFilename(filename);
+}
+
+const char* wmsErrorV(const char *fmt, va_list args )
+{
+ static char temp[2024];
+ if(fmt)
+ {
+ vsprintf(temp, fmt, args);
+ }
+ else
+ {
+ sprintf(temp,"%s", "");
+ }
+
+ return temp;
+}
+
+void wmsEnableNotify(wmsNotifyFlags flags)
+{
+ theNotifyFlags = (wmsNotifyFlags)(theNotifyFlags | flags);
+}
+
+void wmsDisableNotify(wmsNotifyFlags flags)
+{
+ theNotifyFlags = (wmsNotifyFlags)((wmsNotifyFlags_ALL^flags)&
+ theNotifyFlags);
+}
+
+void wmsSetNotifyFlag(wmsNotifyFlags notifyFlags)
+{
+ theNotifyFlags = notifyFlags;
+}
+
+void wmsPushNotifyFlags()
+{
+ theNotifyFlagsStack.push(theNotifyFlags);
+}
+
+void wmsPopNotifyFlags()
+{
+ if(theNotifyFlagsStack.empty())
+ {
+ return;
+ }
+ theNotifyFlags = theNotifyFlagsStack.top();
+ theNotifyFlagsStack.pop();
+}
+
+wmsNotifyFlags wmsGetNotifyFlags()
+{
+ return theNotifyFlags;
+}
+
+
+
+bool wmsIsNotifyEnabled()
+{
+ return (theNotifyFlags != wmsNotifyFlags_NONE);
+}
+
+
diff --git a/libwms/src/wmsReferenced.cpp b/libwms/src/wmsReferenced.cpp
new file mode 100644
index 0000000..bb7ab2c
--- /dev/null
+++ b/libwms/src/wmsReferenced.cpp
@@ -0,0 +1,24 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#include <typeinfo>
+#include <wms/wmsReferenced.h>
+#include <wms/wmsNotify.h>
+
+wmsReferenced::~wmsReferenced()
+{
+ if (theRefCount>0)
+ {
+ wmsNotify(wmsNotifyLevel_WARN)<<"Warning: deleting still referenced object "<<this<<" of type '"<<typeid(this).name()<<"'"<<std::endl;
+ wmsNotify(wmsNotifyLevel_WARN)<<" the final reference count was "<<theRefCount<<", memory corruption possible."<<std::endl;
+ }
+}
diff --git a/libwms/src/wmsStyle.cpp b/libwms/src/wmsStyle.cpp
new file mode 100644
index 0000000..18cc362
--- /dev/null
+++ b/libwms/src/wmsStyle.cpp
@@ -0,0 +1,30 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#include <wms/wmsStyle.h>
+
+
+std::ostream& operator <<(std::ostream& out, const wmsStyle& src)
+{
+ out << "Name: " << src.theName << std::endl
+ << "Title: " << src.theTitle << std::endl
+ << "Abstract: " << src.theAbstract << std::endl;
+
+ out << "Legend Url List\n" << std::endl;
+ unsigned int idx = 0;
+ for(idx = 0; idx < src.theLegendUrlList.size();++idx)
+ {
+ out << src.theLegendUrlList[idx] << std::endl;
+ }
+
+ return out;
+}
diff --git a/libwms/src/wmsUrl.cpp b/libwms/src/wmsUrl.cpp
new file mode 100644
index 0000000..615a64e
--- /dev/null
+++ b/libwms/src/wmsUrl.cpp
@@ -0,0 +1,211 @@
+/* -*-c++-*- libwms - Copyright (C) since 2004 Garrett Potts
+ *
+ * This library is open source and may be redistributed and/or modified under
+ * the terms of the libwms Public License (WMSGPL) version 0.0 or
+ * (at your option) any later version. The full license is in LICENSE file
+ * included with this distribution.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * libwms Public License for more details.
+*/
+#include <wms/wmsUrl.h>
+
+std::ostream& operator <<(std::ostream& out, const wmsUrl& src)
+{
+ out << src.theUrl;
+
+ return out;
+}
+static int offsetFromBase(char c)
+{
+ if((c >= 'a') && (c <='f'))
+ {
+ return (int)((c-'a')+10);
+ }
+ else if((c>='A') && (c <= 'F'))
+ {
+ return (int)((c-'A') + 10);
+ }
+ else if((c>='0')&&(c<='9'))
+ {
+ return (int)(c-'0');
+ }
+ return -1;
+}
+static char toChar(const std::string& s)
+{
+ char hexChars[2];
+ if(*s.begin() == '%')
+ {
+ hexChars[0] = *(s.begin()+1);
+ hexChars[1] = *(s.begin()+2);
+ }
+ else
+ {
+ hexChars[0] = *(s.begin());
+ hexChars[1] = *(s.begin()+1);
+ }
+ int c1 = offsetFromBase(hexChars[0]);
+ int c2 = offsetFromBase(hexChars[1]);
+
+ if((c1 < 0)||
+ (c2 < 0))
+ {
+ return '\0';
+ }
+ return (char)(c1*16+
+ c2);
+}
+
+
+std::string wmsUrl::decode()const
+{
+ std::string tempS;
+ std::string::const_iterator iter = theUrl.begin();
+
+ while(iter != theUrl.end())
+ {
+ if(*iter == '%')
+ {
+ tempS += toChar(std::string(iter, iter+3));
+ iter+=3;
+ }
+ else
+ {
+ tempS += *iter;
+ ++iter;
+ }
+ }
+
+ return tempS;
+}
+
+void wmsUrl::mergeUrl(const std::string& tempProtocol,
+ const std::string& tempServer,
+ const std::string& tempPath,
+ const std::string& tempOptions)
+{
+ theUrl = "";
+ if(tempProtocol!="")
+ {
+ theUrl = tempProtocol + "://";
+ }
+ if(tempServer != "")
+ {
+ theUrl = theUrl + tempServer;
+ }
+ if(tempPath != "")
+ {
+ if((*(--theUrl.end()) != '/')&&
+ ((*tempPath.begin())!='/'))
+ {
+ theUrl += "/"; // tack on a slash if one is not present
+ }
+ theUrl += tempPath;
+ }
+ if(tempOptions!= "")
+ {
+ if(*(--theUrl.end()) != '?')
+ {
+ theUrl += "?";
+ }
+ theUrl += tempOptions;
+ }
+}
+
+void wmsUrl::splitUrl(std::string& tempProtocol,
+ std::string& tempServer,
+ std::string& tempPath,
+ std::string& tempOptions)const
+{
+ tempProtocol = protocol();
+ tempServer = server();
+ tempPath = path();
+ tempOptions = options();
+}
+
+std::string wmsUrl::protocol()const
+{
+ std::string result;
+ std::string::size_type pos = theUrl.find(":");
+
+ if(pos != std::string::npos)
+ {
+ result = std::string(theUrl.begin(),
+ theUrl.begin()+pos);
+ }
+
+ return result;
+}
+
+std::string wmsUrl::server()const
+{
+ std::string::size_type posStart = theUrl.find("//");
+ std::string::size_type posEnd = 0;
+
+ if(posStart == std::string::npos)
+ {
+ posStart = 0;
+ }
+ else
+ {
+ posStart += 2; // skip the "//" string
+ }
+
+ posEnd = theUrl.find("/", posStart);
+
+ if(posEnd == std::string::npos)
+ {
+ return std::string(theUrl.begin() + posStart,
+ theUrl.end());
+ }
+ return std::string(theUrl.begin() + posStart,
+ theUrl.begin() + posEnd);
+}
+
+std::string wmsUrl::path()const
+{
+ std::string::size_type posStart = theUrl.find("//");
+ std::string::size_type posEnd = 0;
+
+ if(posStart == std::string::npos)
+ {
+ posStart = theUrl.find("/");
+ }
+ else
+ {
+ posStart +=2; //skip "//" string and start seaarching for / after that
+ posStart = theUrl.find("/", posStart);
+ }
+
+ if(posStart == std::string::npos)
+ {
+ return "/";
+ }
+ posEnd = theUrl.find("?");
+ if(posEnd == std::string::npos)
+ {
+ return std::string(theUrl.begin() + posStart,
+ theUrl.end());
+ }
+ return std::string(theUrl.begin() + posStart,
+ theUrl.begin() + posEnd);
+}
+
+std::string wmsUrl::options()const
+{
+ std::string result;
+ std::string::size_type pos = theUrl.find("?");
+
+ if(pos != std::string::npos)
+ {
+ // skip the question mark
+ //
+ result = std::string(theUrl.begin() + pos + 1,
+ theUrl.end());
+ }
+
+ return result;
+}
diff --git a/libwms/xcode/libwms/English.lproj/InfoPlist.strings b/libwms/xcode/libwms/English.lproj/InfoPlist.strings
new file mode 100644
index 0000000..26bf880
Binary files /dev/null and b/libwms/xcode/libwms/English.lproj/InfoPlist.strings differ
diff --git a/libwms/xcode/libwms/Info.plist b/libwms/xcode/libwms/Info.plist
new file mode 100644
index 0000000..8ebb0ad
--- /dev/null
+++ b/libwms/xcode/libwms/Info.plist
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.yourcocoaframework</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>NSPrincipalClass</key>
+ <string></string>
+</dict>
+</plist>
diff --git a/libwms/xcode/libwms/libwms.xcodeproj/project.pbxproj b/libwms/xcode/libwms/libwms.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..c1dcf44
--- /dev/null
+++ b/libwms/xcode/libwms/libwms.xcodeproj/project.pbxproj
@@ -0,0 +1,704 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 42;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1886E0860B1BA46D00D0E4E6 /* iso8601.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1886E06C0B1BA46D00D0E4E6 /* iso8601.cpp */; };
+ 1886E0870B1BA46D00D0E4E6 /* wmsUrl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E06D0B1BA46D00D0E4E6 /* wmsUrl.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E0880B1BA46D00D0E4E6 /* wmsStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E06E0B1BA46D00D0E4E6 /* wmsStyle.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E0890B1BA46D00D0E4E6 /* wmsReferenced.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E06F0B1BA46D00D0E4E6 /* wmsReferenced.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E08A0B1BA46D00D0E4E6 /* wmsCapabilitiesRoot.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E0700B1BA46D00D0E4E6 /* wmsCapabilitiesRoot.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E08B0B1BA46D00D0E4E6 /* wmsCapabilitiesParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E0710B1BA46D00D0E4E6 /* wmsCapabilitiesParser.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E08C0B1BA46D00D0E4E6 /* wmsExport.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E0720B1BA46D00D0E4E6 /* wmsExport.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E08D0B1BA46D00D0E4E6 /* wmsCurlMemoryStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E0730B1BA46D00D0E4E6 /* wmsCurlMemoryStream.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E08E0B1BA46D00D0E4E6 /* wms.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E0740B1BA46D00D0E4E6 /* wms.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E08F0B1BA46D00D0E4E6 /* iso8601.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E0750B1BA46D00D0E4E6 /* iso8601.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E0900B1BA46D00D0E4E6 /* wmsClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E0760B1BA46D00D0E4E6 /* wmsClient.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E0910B1BA46D00D0E4E6 /* wmsCapabilitiesState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E0770B1BA46D00D0E4E6 /* wmsCapabilitiesState.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E0920B1BA46D00D0E4E6 /* wmsRefPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E0780B1BA46D00D0E4E6 /* wmsRefPtr.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E0930B1BA46D00D0E4E6 /* wmsNotify.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E0790B1BA46D00D0E4E6 /* wmsNotify.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E0940B1BA46D00D0E4E6 /* wmsMemoryStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1886E07A0B1BA46D00D0E4E6 /* wmsMemoryStream.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1886E0950B1BA46D00D0E4E6 /* wms.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1886E07B0B1BA46D00D0E4E6 /* wms.cpp */; };
+ 1886E0960B1BA46D00D0E4E6 /* wmsCapabilitiesState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1886E07C0B1BA46D00D0E4E6 /* wmsCapabilitiesState.cpp */; };
+ 1886E0970B1BA46D00D0E4E6 /* wmsCapabilitiesRoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1886E07D0B1BA46D00D0E4E6 /* wmsCapabilitiesRoot.cpp */; };
+ 1886E0980B1BA46D00D0E4E6 /* wmsCapabilitiesParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1886E07E0B1BA46D00D0E4E6 /* wmsCapabilitiesParser.cpp */; };
+ 1886E0990B1BA46D00D0E4E6 /* wmsReferenced.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1886E07F0B1BA46D00D0E4E6 /* wmsReferenced.cpp */; };
+ 1886E09A0B1BA46D00D0E4E6 /* wmsNotify.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1886E0800B1BA46D00D0E4E6 /* wmsNotify.cpp */; };
+ 1886E09B0B1BA46D00D0E4E6 /* wmsMemoryStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1886E0810B1BA46D00D0E4E6 /* wmsMemoryStream.cpp */; };
+ 1886E09C0B1BA46D00D0E4E6 /* wmsUrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1886E0820B1BA46D00D0E4E6 /* wmsUrl.cpp */; };
+ 1886E09D0B1BA46D00D0E4E6 /* wmsStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1886E0830B1BA46D00D0E4E6 /* wmsStyle.cpp */; };
+ 1886E09E0B1BA46D00D0E4E6 /* wmsCurlMemoryStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1886E0840B1BA46D00D0E4E6 /* wmsCurlMemoryStream.cpp */; };
+ 1886E09F0B1BA46D00D0E4E6 /* wmsClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1886E0850B1BA46D00D0E4E6 /* wmsClient.cpp */; };
+ 1FD5B7D10E75D3FE00FBD730 /* wms.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* wms.framework */; };
+ 1FD5B7D20E75D40200FBD730 /* wmsurl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1FD5B7C30E75D3C200FBD730 /* wmsurl.cpp */; };
+ 1FD5B7F10E75D47400FBD730 /* wms.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* wms.framework */; };
+ 1FD5B7F20E75D47900FBD730 /* wmscapabilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1FD5B7BE0E75D3C200FBD730 /* wmscapabilities.cpp */; };
+ 1FD5B8070E75D4DA00FBD730 /* wms.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* wms.framework */; };
+ 1FD5B8080E75D4DD00FBD730 /* wmsgetmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1FD5B7C00E75D3C200FBD730 /* wmsgetmap.cpp */; };
+ 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 1886E06C0B1BA46D00D0E4E6 /* iso8601.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = iso8601.cpp; path = ../../src/iso8601.cpp; sourceTree = SOURCE_ROOT; };
+ 1886E06D0B1BA46D00D0E4E6 /* wmsUrl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wmsUrl.h; path = ../../include/wms/wmsUrl.h; sourceTree = SOURCE_ROOT; };
+ 1886E06E0B1BA46D00D0E4E6 /* wmsStyle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wmsStyle.h; path = ../../include/wms/wmsStyle.h; sourceTree = SOURCE_ROOT; };
+ 1886E06F0B1BA46D00D0E4E6 /* wmsReferenced.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wmsReferenced.h; path = ../../include/wms/wmsReferenced.h; sourceTree = SOURCE_ROOT; };
+ 1886E0700B1BA46D00D0E4E6 /* wmsCapabilitiesRoot.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wmsCapabilitiesRoot.h; path = ../../include/wms/wmsCapabilitiesRoot.h; sourceTree = SOURCE_ROOT; };
+ 1886E0710B1BA46D00D0E4E6 /* wmsCapabilitiesParser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wmsCapabilitiesParser.h; path = ../../include/wms/wmsCapabilitiesParser.h; sourceTree = SOURCE_ROOT; };
+ 1886E0720B1BA46D00D0E4E6 /* wmsExport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wmsExport.h; path = ../../include/wms/wmsExport.h; sourceTree = SOURCE_ROOT; };
+ 1886E0730B1BA46D00D0E4E6 /* wmsCurlMemoryStream.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wmsCurlMemoryStream.h; path = ../../include/wms/wmsCurlMemoryStream.h; sourceTree = SOURCE_ROOT; };
+ 1886E0740B1BA46D00D0E4E6 /* wms.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wms.h; path = ../../include/wms/wms.h; sourceTree = SOURCE_ROOT; };
+ 1886E0750B1BA46D00D0E4E6 /* iso8601.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iso8601.h; path = ../../include/wms/iso8601.h; sourceTree = SOURCE_ROOT; };
+ 1886E0760B1BA46D00D0E4E6 /* wmsClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wmsClient.h; path = ../../include/wms/wmsClient.h; sourceTree = SOURCE_ROOT; };
+ 1886E0770B1BA46D00D0E4E6 /* wmsCapabilitiesState.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wmsCapabilitiesState.h; path = ../../include/wms/wmsCapabilitiesState.h; sourceTree = SOURCE_ROOT; };
+ 1886E0780B1BA46D00D0E4E6 /* wmsRefPtr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wmsRefPtr.h; path = ../../include/wms/wmsRefPtr.h; sourceTree = SOURCE_ROOT; };
+ 1886E0790B1BA46D00D0E4E6 /* wmsNotify.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wmsNotify.h; path = ../../include/wms/wmsNotify.h; sourceTree = SOURCE_ROOT; };
+ 1886E07A0B1BA46D00D0E4E6 /* wmsMemoryStream.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = wmsMemoryStream.h; path = ../../include/wms/wmsMemoryStream.h; sourceTree = SOURCE_ROOT; };
+ 1886E07B0B1BA46D00D0E4E6 /* wms.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wms.cpp; path = ../../src/wms.cpp; sourceTree = SOURCE_ROOT; };
+ 1886E07C0B1BA46D00D0E4E6 /* wmsCapabilitiesState.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wmsCapabilitiesState.cpp; path = ../../src/wmsCapabilitiesState.cpp; sourceTree = SOURCE_ROOT; };
+ 1886E07D0B1BA46D00D0E4E6 /* wmsCapabilitiesRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wmsCapabilitiesRoot.cpp; path = ../../src/wmsCapabilitiesRoot.cpp; sourceTree = SOURCE_ROOT; };
+ 1886E07E0B1BA46D00D0E4E6 /* wmsCapabilitiesParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wmsCapabilitiesParser.cpp; path = ../../src/wmsCapabilitiesParser.cpp; sourceTree = SOURCE_ROOT; };
+ 1886E07F0B1BA46D00D0E4E6 /* wmsReferenced.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wmsReferenced.cpp; path = ../../src/wmsReferenced.cpp; sourceTree = SOURCE_ROOT; };
+ 1886E0800B1BA46D00D0E4E6 /* wmsNotify.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wmsNotify.cpp; path = ../../src/wmsNotify.cpp; sourceTree = SOURCE_ROOT; };
+ 1886E0810B1BA46D00D0E4E6 /* wmsMemoryStream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wmsMemoryStream.cpp; path = ../../src/wmsMemoryStream.cpp; sourceTree = SOURCE_ROOT; };
+ 1886E0820B1BA46D00D0E4E6 /* wmsUrl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wmsUrl.cpp; path = ../../src/wmsUrl.cpp; sourceTree = SOURCE_ROOT; };
+ 1886E0830B1BA46D00D0E4E6 /* wmsStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wmsStyle.cpp; path = ../../src/wmsStyle.cpp; sourceTree = SOURCE_ROOT; };
+ 1886E0840B1BA46D00D0E4E6 /* wmsCurlMemoryStream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wmsCurlMemoryStream.cpp; path = ../../src/wmsCurlMemoryStream.cpp; sourceTree = SOURCE_ROOT; };
+ 1886E0850B1BA46D00D0E4E6 /* wmsClient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = wmsClient.cpp; path = ../../src/wmsClient.cpp; sourceTree = SOURCE_ROOT; };
+ 1886E0A00B1BA4F100D0E4E6 /* common_settings.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = common_settings.xcconfig; path = ../../../ossim/xcode/ossim/common_settings.xcconfig; sourceTree = SOURCE_ROOT; };
+ 1FD5B7BB0E75D3C200FBD730 /* GNUmakefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GNUmakefile; sourceTree = "<group>"; };
+ 1FD5B7BD0E75D3C200FBD730 /* GNUmakefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GNUmakefile; sourceTree = "<group>"; };
+ 1FD5B7BE0E75D3C200FBD730 /* wmscapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wmscapabilities.cpp; sourceTree = "<group>"; };
+ 1FD5B7C00E75D3C200FBD730 /* wmsgetmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wmsgetmap.cpp; sourceTree = "<group>"; };
+ 1FD5B7C20E75D3C200FBD730 /* GNUmakefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GNUmakefile; sourceTree = "<group>"; };
+ 1FD5B7C30E75D3C200FBD730 /* wmsurl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wmsurl.cpp; sourceTree = "<group>"; };
+ 1FD5B7C80E75D3DC00FBD730 /* wmsurl */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = wmsurl; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1FD5B7EA0E75D46700FBD730 /* wmscapabilities.cpp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = wmscapabilities.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1FD5B7FE0E75D4C500FBD730 /* wmsgetmap */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = wmsgetmap; sourceTree = BUILT_PRODUCTS_DIR; };
+ 32DBCF5E0370ADEE00C91783 /* libwms_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libwms_Prefix.pch; sourceTree = "<group>"; };
+ 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
+ 8DC2EF5B0486A6940098B216 /* wms.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = wms.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 1FD5B7C60E75D3DC00FBD730 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1FD5B7D10E75D3FE00FBD730 /* wms.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 1FD5B7E80E75D46700FBD730 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1FD5B7F10E75D47400FBD730 /* wms.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 1FD5B7FC0E75D4C500FBD730 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1FD5B8070E75D4DA00FBD730 /* wms.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 8DC2EF560486A6940098B216 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 034768DFFF38A50411DB9C8B /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8DC2EF5B0486A6940098B216 /* wms.framework */,
+ 1FD5B7C80E75D3DC00FBD730 /* wmsurl */,
+ 1FD5B7EA0E75D46700FBD730 /* wmscapabilities.cpp */,
+ 1FD5B7FE0E75D4C500FBD730 /* wmsgetmap */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 0867D691FE84028FC02AAC07 /* libwms */ = {
+ isa = PBXGroup;
+ children = (
+ 1FD5B7BA0E75D3C200FBD730 /* examples */,
+ 1886E0A00B1BA4F100D0E4E6 /* common_settings.xcconfig */,
+ 08FB77AEFE84172EC02AAC07 /* Classes */,
+ 32C88DFF0371C24200C91783 /* Other Sources */,
+ 089C1665FE841158C02AAC07 /* Resources */,
+ 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
+ 034768DFFF38A50411DB9C8B /* Products */,
+ );
+ name = libwms;
+ sourceTree = "<group>";
+ };
+ 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */,
+ 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */,
+ );
+ name = "External Frameworks and Libraries";
+ sourceTree = "<group>";
+ };
+ 089C1665FE841158C02AAC07 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 8DC2EF5A0486A6940098B216 /* Info.plist */,
+ 089C1666FE841158C02AAC07 /* InfoPlist.strings */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 08FB77AEFE84172EC02AAC07 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 1886E06B0B1BA46D00D0E4E6 /* wms */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 0867D6A5FE840307C02AAC07 /* AppKit.framework */,
+ D2F7E79907B2D74100F64583 /* CoreData.framework */,
+ 0867D69BFE84028FC02AAC07 /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 1886E06B0B1BA46D00D0E4E6 /* wms */ = {
+ isa = PBXGroup;
+ children = (
+ 1886E06C0B1BA46D00D0E4E6 /* iso8601.cpp */,
+ 1886E06D0B1BA46D00D0E4E6 /* wmsUrl.h */,
+ 1886E06E0B1BA46D00D0E4E6 /* wmsStyle.h */,
+ 1886E06F0B1BA46D00D0E4E6 /* wmsReferenced.h */,
+ 1886E0700B1BA46D00D0E4E6 /* wmsCapabilitiesRoot.h */,
+ 1886E0710B1BA46D00D0E4E6 /* wmsCapabilitiesParser.h */,
+ 1886E0720B1BA46D00D0E4E6 /* wmsExport.h */,
+ 1886E0730B1BA46D00D0E4E6 /* wmsCurlMemoryStream.h */,
+ 1886E0740B1BA46D00D0E4E6 /* wms.h */,
+ 1886E0750B1BA46D00D0E4E6 /* iso8601.h */,
+ 1886E0760B1BA46D00D0E4E6 /* wmsClient.h */,
+ 1886E0770B1BA46D00D0E4E6 /* wmsCapabilitiesState.h */,
+ 1886E0780B1BA46D00D0E4E6 /* wmsRefPtr.h */,
+ 1886E0790B1BA46D00D0E4E6 /* wmsNotify.h */,
+ 1886E07A0B1BA46D00D0E4E6 /* wmsMemoryStream.h */,
+ 1886E07B0B1BA46D00D0E4E6 /* wms.cpp */,
+ 1886E07C0B1BA46D00D0E4E6 /* wmsCapabilitiesState.cpp */,
+ 1886E07D0B1BA46D00D0E4E6 /* wmsCapabilitiesRoot.cpp */,
+ 1886E07E0B1BA46D00D0E4E6 /* wmsCapabilitiesParser.cpp */,
+ 1886E07F0B1BA46D00D0E4E6 /* wmsReferenced.cpp */,
+ 1886E0800B1BA46D00D0E4E6 /* wmsNotify.cpp */,
+ 1886E0810B1BA46D00D0E4E6 /* wmsMemoryStream.cpp */,
+ 1886E0820B1BA46D00D0E4E6 /* wmsUrl.cpp */,
+ 1886E0830B1BA46D00D0E4E6 /* wmsStyle.cpp */,
+ 1886E0840B1BA46D00D0E4E6 /* wmsCurlMemoryStream.cpp */,
+ 1886E0850B1BA46D00D0E4E6 /* wmsClient.cpp */,
+ );
+ name = wms;
+ sourceTree = "<group>";
+ };
+ 1FD5B7BA0E75D3C200FBD730 /* examples */ = {
+ isa = PBXGroup;
+ children = (
+ 1FD5B7BB0E75D3C200FBD730 /* GNUmakefile */,
+ 1FD5B7BC0E75D3C200FBD730 /* wmscapabilities */,
+ 1FD5B7BF0E75D3C200FBD730 /* wmsgetmap */,
+ 1FD5B7C10E75D3C200FBD730 /* wmsurl */,
+ );
+ name = examples;
+ path = ../../examples;
+ sourceTree = SOURCE_ROOT;
+ };
+ 1FD5B7BC0E75D3C200FBD730 /* wmscapabilities */ = {
+ isa = PBXGroup;
+ children = (
+ 1FD5B7BD0E75D3C200FBD730 /* GNUmakefile */,
+ 1FD5B7BE0E75D3C200FBD730 /* wmscapabilities.cpp */,
+ );
+ path = wmscapabilities;
+ sourceTree = "<group>";
+ };
+ 1FD5B7BF0E75D3C200FBD730 /* wmsgetmap */ = {
+ isa = PBXGroup;
+ children = (
+ 1FD5B7C00E75D3C200FBD730 /* wmsgetmap.cpp */,
+ );
+ path = wmsgetmap;
+ sourceTree = "<group>";
+ };
+ 1FD5B7C10E75D3C200FBD730 /* wmsurl */ = {
+ isa = PBXGroup;
+ children = (
+ 1FD5B7C20E75D3C200FBD730 /* GNUmakefile */,
+ 1FD5B7C30E75D3C200FBD730 /* wmsurl.cpp */,
+ );
+ path = wmsurl;
+ sourceTree = "<group>";
+ };
+ 32C88DFF0371C24200C91783 /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32DBCF5E0370ADEE00C91783 /* libwms_Prefix.pch */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 8DC2EF500486A6940098B216 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1886E0870B1BA46D00D0E4E6 /* wmsUrl.h in Headers */,
+ 1886E0880B1BA46D00D0E4E6 /* wmsStyle.h in Headers */,
+ 1886E0890B1BA46D00D0E4E6 /* wmsReferenced.h in Headers */,
+ 1886E08A0B1BA46D00D0E4E6 /* wmsCapabilitiesRoot.h in Headers */,
+ 1886E08B0B1BA46D00D0E4E6 /* wmsCapabilitiesParser.h in Headers */,
+ 1886E08C0B1BA46D00D0E4E6 /* wmsExport.h in Headers */,
+ 1886E08D0B1BA46D00D0E4E6 /* wmsCurlMemoryStream.h in Headers */,
+ 1886E08E0B1BA46D00D0E4E6 /* wms.h in Headers */,
+ 1886E08F0B1BA46D00D0E4E6 /* iso8601.h in Headers */,
+ 1886E0900B1BA46D00D0E4E6 /* wmsClient.h in Headers */,
+ 1886E0910B1BA46D00D0E4E6 /* wmsCapabilitiesState.h in Headers */,
+ 1886E0920B1BA46D00D0E4E6 /* wmsRefPtr.h in Headers */,
+ 1886E0930B1BA46D00D0E4E6 /* wmsNotify.h in Headers */,
+ 1886E0940B1BA46D00D0E4E6 /* wmsMemoryStream.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 1FD5B7C70E75D3DC00FBD730 /* wmsurl */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1FD5B7DB0E75D41200FBD730 /* Build configuration list for PBXNativeTarget "wmsurl" */;
+ buildPhases = (
+ 1FD5B7C50E75D3DC00FBD730 /* Sources */,
+ 1FD5B7C60E75D3DC00FBD730 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = wmsurl;
+ productName = wmsurl;
+ productReference = 1FD5B7C80E75D3DC00FBD730 /* wmsurl */;
+ productType = "com.apple.product-type.tool";
+ };
+ 1FD5B7E90E75D46700FBD730 /* wmscapabilities.cpp */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1FD5B7F80E75D4A400FBD730 /* Build configuration list for PBXNativeTarget "wmscapabilities.cpp" */;
+ buildPhases = (
+ 1FD5B7E70E75D46700FBD730 /* Sources */,
+ 1FD5B7E80E75D46700FBD730 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = wmscapabilities.cpp;
+ productName = wmscapabilities.cpp;
+ productReference = 1FD5B7EA0E75D46700FBD730 /* wmscapabilities.cpp */;
+ productType = "com.apple.product-type.tool";
+ };
+ 1FD5B7FD0E75D4C500FBD730 /* wmsgetmap */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1FD5B80A0E75D4E200FBD730 /* Build configuration list for PBXNativeTarget "wmsgetmap" */;
+ buildPhases = (
+ 1FD5B7FB0E75D4C500FBD730 /* Sources */,
+ 1FD5B7FC0E75D4C500FBD730 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = wmsgetmap;
+ productName = wmsgetmap;
+ productReference = 1FD5B7FE0E75D4C500FBD730 /* wmsgetmap */;
+ productType = "com.apple.product-type.tool";
+ };
+ 8DC2EF4F0486A6940098B216 /* wms */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "wms" */;
+ buildPhases = (
+ 8DC2EF500486A6940098B216 /* Headers */,
+ 8DC2EF520486A6940098B216 /* Resources */,
+ 8DC2EF540486A6940098B216 /* Sources */,
+ 8DC2EF560486A6940098B216 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = wms;
+ productInstallPath = "$(HOME)/Library/Frameworks";
+ productName = libwms;
+ productReference = 8DC2EF5B0486A6940098B216 /* wms.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 0867D690FE84028FC02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "libwms" */;
+ compatibilityVersion = "Xcode 2.4";
+ hasScannedForEncodings = 1;
+ mainGroup = 0867D691FE84028FC02AAC07 /* libwms */;
+ productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8DC2EF4F0486A6940098B216 /* wms */,
+ 1FD5B7C70E75D3DC00FBD730 /* wmsurl */,
+ 1FD5B7E90E75D46700FBD730 /* wmscapabilities.cpp */,
+ 1FD5B7FD0E75D4C500FBD730 /* wmsgetmap */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8DC2EF520486A6940098B216 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 1FD5B7C50E75D3DC00FBD730 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1FD5B7D20E75D40200FBD730 /* wmsurl.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 1FD5B7E70E75D46700FBD730 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1FD5B7F20E75D47900FBD730 /* wmscapabilities.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 1FD5B7FB0E75D4C500FBD730 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1FD5B8080E75D4DD00FBD730 /* wmsgetmap.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 8DC2EF540486A6940098B216 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1886E0860B1BA46D00D0E4E6 /* iso8601.cpp in Sources */,
+ 1886E0950B1BA46D00D0E4E6 /* wms.cpp in Sources */,
+ 1886E0960B1BA46D00D0E4E6 /* wmsCapabilitiesState.cpp in Sources */,
+ 1886E0970B1BA46D00D0E4E6 /* wmsCapabilitiesRoot.cpp in Sources */,
+ 1886E0980B1BA46D00D0E4E6 /* wmsCapabilitiesParser.cpp in Sources */,
+ 1886E0990B1BA46D00D0E4E6 /* wmsReferenced.cpp in Sources */,
+ 1886E09A0B1BA46D00D0E4E6 /* wmsNotify.cpp in Sources */,
+ 1886E09B0B1BA46D00D0E4E6 /* wmsMemoryStream.cpp in Sources */,
+ 1886E09C0B1BA46D00D0E4E6 /* wmsUrl.cpp in Sources */,
+ 1886E09D0B1BA46D00D0E4E6 /* wmsStyle.cpp in Sources */,
+ 1886E09E0B1BA46D00D0E4E6 /* wmsCurlMemoryStream.cpp in Sources */,
+ 1886E09F0B1BA46D00D0E4E6 /* wmsClient.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C1667FE841158C02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 1DEB91AE08733DA50010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(inherited)";
+ COPY_PHASE_STRIP = NO;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = libwms_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(inherited)";
+ PRODUCT_NAME = wms;
+ WRAPPER_EXTENSION = framework;
+ ZERO_LINK = YES;
+ };
+ name = Debug;
+ };
+ 1DEB91AF08733DA50010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(inherited)";
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = libwms_Prefix.pch;
+ HEADER_SEARCH_PATHS = (
+ ../../include,
+ "$(UNIV_HEADER_DEP)",
+ );
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(inherited)";
+ OTHER_LDFLAGS = (
+ "-lexpat",
+ "-lcurl",
+ );
+ PRODUCT_NAME = wms;
+ WRAPPER_EXTENSION = framework;
+ };
+ name = Release;
+ };
+ 1DEB91B208733DA50010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 1886E0A00B1BA4F100D0E4E6 /* common_settings.xcconfig */;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ GCC_MODEL_TUNING = "";
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ ../../include,
+ "$(UNIV_HEADER_DEP)",
+ );
+ INSTALL_PATH = "@executable_path/../Frameworks";
+ LIBRARY_SEARCH_PATHS = "$(LIB_EXPAT_PATH)";
+ LIB_EXPAT_NAME = libexpat.a;
+ LIB_EXPAT_PATH = "$(UNIV_STATICLIB_DEP)";
+ OTHER_LDFLAGS = (
+ "$(LIB_EXPAT_PATH)/$(LIB_EXPAT_NAME)",
+ "-lcurl",
+ );
+ PREBINDING = NO;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ USER_HEADER_SEARCH_PATHS = "";
+ };
+ name = Debug;
+ };
+ 1DEB91B308733DA50010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 1886E0A00B1BA4F100D0E4E6 /* common_settings.xcconfig */;
+ buildSettings = {
+ ARCHS = "$(inherited)";
+ GCC_MODEL_TUNING = "";
+ GCC_VERSION = "$(inherited)";
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ ../../include,
+ "$(UNIV_HEADER_DEP)",
+ );
+ INSTALL_PATH = "@executable_path/../Frameworks";
+ LIBRARY_SEARCH_PATHS = "$(LIB_EXPAT_PATH)";
+ LIB_EXPAT_NAME = libexpat.a;
+ LIB_EXPAT_PATH = "$(UNIV_STATICLIB_DEP)";
+ OTHER_LDFLAGS = (
+ "$(LIB_EXPAT_PATH)/$(LIB_EXPAT_NAME)",
+ "-lcurl",
+ );
+ PREBINDING = NO;
+ SDKROOT = "$(inherited)";
+ USER_HEADER_SEARCH_PATHS = "";
+ };
+ name = Release;
+ };
+ 1FD5B7CA0E75D3DC00FBD730 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ INSTALL_PATH = /usr/local/bin;
+ PREBINDING = NO;
+ PRODUCT_NAME = wmsurl;
+ ZERO_LINK = YES;
+ };
+ name = Debug;
+ };
+ 1FD5B7CD0E75D3DC00FBD730 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 1886E0A00B1BA4F100D0E4E6 /* common_settings.xcconfig */;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/local/bin;
+ PREBINDING = NO;
+ PRODUCT_NAME = wmsurl;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+ 1FD5B7EC0E75D46700FBD730 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ INSTALL_PATH = /usr/local/bin;
+ PREBINDING = NO;
+ PRODUCT_NAME = wmscapabilities.cpp;
+ ZERO_LINK = YES;
+ };
+ name = Debug;
+ };
+ 1FD5B7EF0E75D46700FBD730 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 1886E0A00B1BA4F100D0E4E6 /* common_settings.xcconfig */;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/local/bin;
+ PREBINDING = NO;
+ PRODUCT_NAME = wmscapabilities.cpp;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+ 1FD5B8000E75D4C500FBD730 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ INSTALL_PATH = /usr/local/bin;
+ PREBINDING = NO;
+ PRODUCT_NAME = wmsgetmap;
+ ZERO_LINK = YES;
+ };
+ name = Debug;
+ };
+ 1FD5B8030E75D4C500FBD730 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 1886E0A00B1BA4F100D0E4E6 /* common_settings.xcconfig */;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/local/bin;
+ PREBINDING = NO;
+ PRODUCT_NAME = wmsgetmap;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "wms" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB91AE08733DA50010E9CD /* Debug */,
+ 1DEB91AF08733DA50010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "libwms" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB91B208733DA50010E9CD /* Debug */,
+ 1DEB91B308733DA50010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 1FD5B7DB0E75D41200FBD730 /* Build configuration list for PBXNativeTarget "wmsurl" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1FD5B7CA0E75D3DC00FBD730 /* Debug */,
+ 1FD5B7CD0E75D3DC00FBD730 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 1FD5B7F80E75D4A400FBD730 /* Build configuration list for PBXNativeTarget "wmscapabilities.cpp" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1FD5B7EC0E75D46700FBD730 /* Debug */,
+ 1FD5B7EF0E75D46700FBD730 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 1FD5B80A0E75D4E200FBD730 /* Build configuration list for PBXNativeTarget "wmsgetmap" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1FD5B8000E75D4C500FBD730 /* Debug */,
+ 1FD5B8030E75D4C500FBD730 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
+}
diff --git a/libwms/xcode/libwms/libwms_Prefix.pch b/libwms/xcode/libwms/libwms_Prefix.pch
new file mode 100644
index 0000000..e69de29
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/ossim-wms.git
More information about the Pkg-grass-devel
mailing list