diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..5b4cc61 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,140 @@ +CMAKE_MINIMUM_REQUIRED (VERSION 2.8.2) + +PROJECT(uc) + +OPTION(BUILD_EXAMPLES "Build example programs" OFF) +set(INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files") +set(INSTALL_CMAKE_DIR lib/CMake/${PROJECT_NAME} CACHE PATH "Installation directory for CMake files") + +INCLUDE(version.cmake) + +LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules") + +FIND_PACKAGE(MySQL) +FIND_PACKAGE(Sqlite3) +FIND_PACKAGE(FLEX) +FIND_PACKAGE(CURL) + +SET(${PROJECT_NAME}_SRCS + src/buffer.cpp + src/buffer_util.cpp + src/string_util.cpp + src/uccontract.cpp + src/ucdb.cpp + src/ucio.cpp + src/ucoder_bin.cpp + src/ucoder_ini.cpp + src/ucontainer.cpp + src/uc_web.cpp + flex/json_parser.lex + ${CMAKE_BINARY_DIR}/ucoder_json.cpp # This file is generated by the build +) + +# Flex +# If we found the flex command, generate ucoder_json.cpp from json_parser.lex +# otherwise, use the fallback (which has (perhaps incorrectly) been under revision control +# throughout project history) +IF (FLEX_FOUND) + MESSAGE(STATUS "Flex found: ucoder_json will be generated") + FLEX_TARGET(flex_json flex/json_parser.lex ${CMAKE_BINARY_DIR}/ucoder_json.cpp) +ELSE (FLEX_FOUND) + MESSAGE(WARNING "Flex not found: will use fallback 'flex/ucoder_json.cpp.fallback'") + CONFIGURE_FILE(flex/ucoder_json.cpp.fallback ${CMAKE_BINARY_DIR}/ucoder_json.cpp COPY_ONLY) +ENDIF (FLEX_FOUND) + +# MySql integration +IF (MYSQL_FOUND) + MESSAGE(STATUS "Found MySQL: ${MYSQL_LIBRARY}") + + SET(${PROJECT_NAME}_SRCS ${${PROJECT_NAME}_SRCS} src/ucmysql.cpp) + + INCLUDE_DIRECTORIES(${MYSQL_INCLUDE_DIR}) + SET(${PROJECT_NAME}_LIBS ${${PROJECT_NAME}_LIBS} ${MYSQL_LIBRARIES}) +ELSE () + MESSAGE(STATUS "MySql not found - skipping support.") +ENDIF () + +# SqLite integration +IF (SQLITE3_FOUND) +# MESSAGE(STATUS "Found Sqlite3: ${SQLITE3_LIBRARY}") # For some reason the FIND_PACKAGE SQLITE3_FIND_QUIETLY switch doesn't seem to work and this message will already have been displayed + + SET(${PROJECT_NAME}_SRCS ${${PROJECT_NAME}_SRCS} src/ucsqlite.cpp) + + INCLUDE_DIRECTORIES(${SQLITE3_INCLUDE_DIR}) + SET(${PROJECT_NAME}_LIBS ${${PROJECT_NAME}_LIBS} ${SQLITE3_LIBRARY}) +ELSE () + MESSAGE(STATUS "SqLite not found - skipping support.") +ENDIF () + +# Curl integration +IF (CURL_FOUND) + SET(${PROJECT_NAME}_SRCS ${${PROJECT_NAME}_SRCS} src/buffer_curl.cpp src/uc_curl.cpp) + + INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR}) + SET(${PROJECT_NAME}_LIBS ${${PROJECT_NAME}_LIBS} ${CURL_LIBRARIES}) +ELSE () + MESSAGE(STATUS "Curl not found - skipping support.") +ENDIF () + +INCLUDE_DIRECTORIES(include) + +ADD_LIBRARY(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SRCS}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME}) +SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES + VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}" + OUTPUT_NAME ${PROJECT_NAME} + CLEAN_DIRECT_OUTPUT 1) +INSTALL(TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}Targets + DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) +INSTALL(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*.h") + +IF (BUILD_EXAMPLES) + SET(EXAMPLE_SRCS examples/example.cpp) + ADD_EXECUTABLE(example ${EXAMPLE_SRCS}) + TARGET_LINK_LIBRARIES(example ${PROJECT_NAME} ${CURL_LIBRARIES}) + + SET(CONTRACT_EXAMPLE_SRCS examples/contract_example.cpp) + ADD_EXECUTABLE(contract_example ${CONTRACT_EXAMPLE_SRCS}) + TARGET_LINK_LIBRARIES(contract_example ${PROJECT_NAME} ${CURL_LIBRARIES}) + + CONFIGURE_FILE(examples/contract.json ${CMAKE_BINARY_DIR}/contract.json COPY_ONLY) + CONFIGURE_FILE(examples/data.json ${CMAKE_BINARY_DIR}/data.json COPY_ONLY) +ENDIF() + +# Make relative paths absolute +foreach(p LIB BIN INCLUDE CMAKE) + set(var INSTALL_${p}_DIR) + if(NOT IS_ABSOLUTE "${${var}}") + set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") + endif() +endforeach() + +# Add all targets to the build-tree export set +export(TARGETS ${PROJECT_NAME} FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake") + +# Export the package for use from the build-tree +# (this registers the build-tree with a global CMake-registry) +export(PACKAGE ${PROJECT_NAME}) + +# Create the UcConfig.cmake and UcConfigVersion files +file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${INSTALL_INCLUDE_DIR}") +# ... for the build tree +set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}") +configure_file(cmake/UcConfig.cmake.in "${PROJECT_BINARY_DIR}/UcConfig.cmake" @ONLY) + +# ... for the install tree +set(CONF_INCLUDE_DIRS "\${UC_CMAKE_DIR}/${REL_INCLUDE_DIR}") +configure_file(cmake/UcConfig.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/UcConfig.cmake" @ONLY) + +# ... for both +configure_file(cmake/UcConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/UcConfigVersion.cmake" @ONLY) + +# Install the UcConfig.cmake and UcConfigVersion.cmake +install(FILES + "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/UcConfig.cmake" + "${PROJECT_BINARY_DIR}/UcConfigVersion.cmake" + DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev) + +# Install the export set for use with the install-tree +install(EXPORT ${PROJECT_NAME}Targets DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev) diff --git a/Make_Setup.inc b/Make_Setup.inc deleted file mode 100644 index c05777a..0000000 --- a/Make_Setup.inc +++ /dev/null @@ -1,64 +0,0 @@ -# Contents of this file are not meant to be changed by the user. -# Instead, change the variables defined in config.inc, -# Or run the provided configure script to set the appropriate -# variables in the environment. - -include config.inc - -ifeq ($(CPU),CORE2) -CPUFLAGS= -mtune=core2 -march=core2 -msse3 -mfpmath=sse -m64 -endif - -ifeq ($(CPU),PRESCOTT) -CPUFLAGS= -mtune=prescott -march=prescott -msse3 -mfpmath=sse -m32 -endif - -ifeq ($(CPU),PENTIUMPRO) -CPUFLAGS= -mtune=pentiumpro -march=pentiumpro -m32 -endif - -ifeq ($(CPU),G5) -CPUGLAGS= -march=G5 -mtune=G5 -mpowerpc64 -mpowerpc-gpopt -faltivec -endif - -ifeq ($(CPU),G4) -CPUFLAGS= -march=G4 -mtune=G4 -faltivec -endif - -#Debugging/Optimization -ifeq ($(DEBUG),YES) -DFLAGS=-g -else -DFLAGS=-O3 -endif - -#Platform defines -ifeq ($(OPSYS),Darwin) -OSFLAGS = -fast -endif - -#Optional Library Defines -ifeq ($(MYSQL),YES) -COPTFLAGS += $(MYSQL_CFLAGS) -LOPTFLAGS += $(MYSQL_LIBS) -endif - -#Optional Library Defines -ifeq ($(CURL),YES) -COPTFLAGS += $(CURL_CFLAGS) -LOPTFLAGS += $(CURL_LIBS) -endif - -#Optional Library Defines -ifeq ($(SQLITE),YES) -COPTFLAGS += $(SQLITE_CFLAGS) -LOPTFLAGS += $(SQLITE_LIBS) -endif - -#Compilier defines -CC = gcc -CXX = g++ -CFLAGS = -Wall $(CPUFLAGS) $(OSFLAGS) $(DFLAGS) $(COPTFLAGS) -LINKXX = $(CXX) $(CPUFLAGS) $(OSFLAGS) $(DFLAGS) $(LOPTFLAGS) -CXXFLAGS = $(CFLAGS) -STATICLIB=ar -r diff --git a/Makefile b/Makefile index 8ad3de2..dd54890 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ ifeq ($(MYSQL),YES) OPT_FILES += ucsqlite.o endif -example : libuc.a example.o +example : example.o libuc.a $(LINKXX) -o $@ $^ diff --git a/README b/README index 3368c98..2ca2f1c 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ the general purpose dictionaries of many popular scripting languages. Included are variety of routines for REST style web programming, and for database manipulation. This library is covered by the new BSD license, see the LICENSE file for details. To build the library, run -the configure script then make. The file doc/index.html is the +cmake then make. The file doc/index.html is the starting point for the documentation. Jason Denton diff --git a/cmake/Modules/FindMySQL.cmake b/cmake/Modules/FindMySQL.cmake new file mode 100644 index 0000000..608a930 --- /dev/null +++ b/cmake/Modules/FindMySQL.cmake @@ -0,0 +1,46 @@ +# - Find mysqlclient +# Find the native MySQL includes and library +# +# MYSQL_INCLUDE_DIR - where to find mysql.h, etc. +# MYSQL_LIBRARIES - List of libraries when using MySQL. +# MYSQL_FOUND - True if MySQL found. + +IF (MYSQL_INCLUDE_DIR) + # Already in cache, be silent + SET(MYSQL_FIND_QUIETLY TRUE) +ENDIF (MYSQL_INCLUDE_DIR) + +FIND_PATH(MYSQL_INCLUDE_DIR mysql.h + /usr/local/include/mysql + /usr/include/mysql +) + +SET(MYSQL_NAMES mysqlclient mysqlclient_r) +FIND_LIBRARY(MYSQL_LIBRARY + NAMES ${MYSQL_NAMES} + PATHS /usr/lib /usr/local/lib + PATH_SUFFIXES mysql +) + +IF (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY) + SET(MYSQL_FOUND TRUE) + SET( MYSQL_LIBRARIES ${MYSQL_LIBRARY} ) +ELSE (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY) + SET(MYSQL_FOUND FALSE) + SET( MYSQL_LIBRARIES ) +ENDIF (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY) + +IF (MYSQL_FOUND) + IF (NOT MYSQL_FIND_QUIETLY) + MESSAGE(STATUS "Found MySQL: ${MYSQL_LIBRARY}") + ENDIF (NOT MYSQL_FIND_QUIETLY) +ELSE (MYSQL_FOUND) + IF (MYSQL_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find MySQL library") + ENDIF (MYSQL_FIND_REQUIRED) +ENDIF (MYSQL_FOUND) + +MARK_AS_ADVANCED( + MYSQL_LIBRARY + MYSQL_INCLUDE_DIR + ) diff --git a/cmake/Modules/FindSqlite3.cmake b/cmake/Modules/FindSqlite3.cmake new file mode 100644 index 0000000..6572748 --- /dev/null +++ b/cmake/Modules/FindSqlite3.cmake @@ -0,0 +1,76 @@ +# Find Sqlite3 +# ~~~~~~~~~~~~ +# Copyright (c) 2007, Martin Dobias +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# +# CMake module to search for Sqlite3 library +# +# If it's found it sets SQLITE3_FOUND to TRUE +# and following variables are set: +# SQLITE3_INCLUDE_DIR +# SQLITE3_LIBRARY + + +# FIND_PATH and FIND_LIBRARY normally search standard locations +# before the specified paths. To search non-standard paths first, +# FIND_* is invoked first with specified paths and NO_DEFAULT_PATH +# and then again with no specified paths to search the default +# locations. When an earlier FIND_* succeeds, subsequent FIND_*s +# searching for the same item do nothing. + +# try to use framework on mac +# want clean framework path, not unix compatibility path +IF (APPLE) + IF (CMAKE_FIND_FRAMEWORK MATCHES "FIRST" + OR CMAKE_FRAMEWORK_PATH MATCHES "ONLY" + OR NOT CMAKE_FIND_FRAMEWORK) + SET (CMAKE_FIND_FRAMEWORK_save ${CMAKE_FIND_FRAMEWORK} CACHE STRING "" FORCE) + SET (CMAKE_FIND_FRAMEWORK "ONLY" CACHE STRING "" FORCE) + #FIND_PATH(SQLITE3_INCLUDE_DIR SQLite3/sqlite3.h) + FIND_LIBRARY(SQLITE3_LIBRARY SQLite3) + IF (SQLITE3_LIBRARY) + # FIND_PATH doesn't add "Headers" for a framework + SET (SQLITE3_INCLUDE_DIR ${SQLITE3_LIBRARY}/Headers CACHE PATH "Path to a file.") + ENDIF (SQLITE3_LIBRARY) + SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE) + ENDIF () +ENDIF (APPLE) + +FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h + "$ENV{LIB_DIR}/include" + "$ENV{LIB_DIR}/include/sqlite" + #mingw + c:/msys/local/include + NO_DEFAULT_PATH + ) +FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h) + +FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3_i PATHS + $ENV{LIB} + /usr/lib + "$ENV{LIB_DIR}/lib" + #mingw + c:/msys/local/lib + NO_DEFAULT_PATH + ) +FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3) + +IF (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY) + SET(SQLITE3_FOUND TRUE) +ENDIF (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY) + + +IF (SQLITE3_FOUND) + + IF (NOT SQLITE3_FIND_QUIETLY) + MESSAGE(STATUS "Found Sqlite3: ${SQLITE3_LIBRARY}") + ENDIF (NOT SQLITE3_FIND_QUIETLY) + +ELSE (SQLITE3_FOUND) + + IF (SQLITE3_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Sqlite3") + ENDIF (SQLITE3_FIND_REQUIRED) + +ENDIF (SQLITE3_FOUND) diff --git a/cmake/UcConfig.cmake.in b/cmake/UcConfig.cmake.in new file mode 100644 index 0000000..82168a8 --- /dev/null +++ b/cmake/UcConfig.cmake.in @@ -0,0 +1,16 @@ +# - Config file for the UniversalContainer package +# - defines the following variables +# UC_INCLUDE_DIRS - include directories +# UC_LIBRARIES - libraries to link against + +# Compute paths +get_filename_component(UC_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +set(UC_INCLUDE_DIRS @CONF_INCLUDE_DIRS@) + +# Our library dependencies (contains definitions for IMPORTED targets) +if(NOT TARGET uc AND NOT UC_BINARY_DIR) + include("${UC_CMAKE_DIR}/UcTargets.cmake") +endif() + +# These are IMPORTED targets created by UcTargets.cmake +set(UC_LIBRARIES @PROJECT_NAME@) diff --git a/cmake/UcConfigVersion.cmake.in b/cmake/UcConfigVersion.cmake.in new file mode 100644 index 0000000..ac97aa9 --- /dev/null +++ b/cmake/UcConfigVersion.cmake.in @@ -0,0 +1,11 @@ +set(PACKAGE_VERSION "@APPLICATION_VERSION_STRING@") + +# Check whether the requested PACKAGE_FIND_VERSION is compatible +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/configure b/configure deleted file mode 100755 index 2f2553e..0000000 --- a/configure +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash - -cpu_spec[5]=G4 -cpu_spec[4]=G5 -cpu_spec[3]=PENTIUMPRO -cpu_spec[2]=PRESCOTT -cpu_spec[1]=CORE2 -cpu_len=${#cpu_spec[@]} - -debug_spec[2]="YES" -debug_spec[1]="NO" - -cpu_name[5]="G4" -cpu_name[4]="G5" -cpu_name[3]="PentiumPro Family" -cpu_name[2]="Pentium 4" -cpu_name[1]="Core2" - -os_name=`uname -s` - -echo "Select CPU Family" -for (( i=1; i <= $cpu_len; i++)); do - echo "$i) ${cpu_name[${i}]}" -done -echo - -read -p ">" cpu_choice -echo -echo "Debugging Build" -echo "1) No" -echo "2) Yes" -echo -read -p ">" debug_choice - -echo "Install Directory" -read -p "[default: /opt]>" tmp -if [ "$tmp" = "" ]; then - install_dir="/opt" -else - install_dir=$tmp -fi - -echo "Build with MySQL Support" -echo "1) No" -echo "2) Yes" -echo -read -p ">" mysql_choice - -if [ "$mysql_choice" = "2" ]; then - mysql=YES - mysql_cflags=`mysql_config --include` - mysql_libs=`mysql_config --libs` -else - mysql=NO -fi - -echo "Build with SQLite Support" -echo "1) No" -echo "2) Yes" -echo -read -p ">" sqlite_choice - -if [ "$sqlite_choice" = "2" ]; then - sqlite=YES -else - sqlite=NO -fi - -echo "Build with CURL Support" -echo "1) No" -echo "2) Yes" -echo -read -p ">" curl_choice - -if [ "$curl_choice" = "2" ]; then - curl=YES - curl_cflags=`curl-config --cflags` - curl_libs=`curl-config --libs` -else - curl=NO -fi - -printf "CPU=${cpu_spec[${cpu_choice}]}\nDEBUG=${debug_spec[${debug_choice}]}\nOPSYS=${os_name}\nINSTALLDIR=${install_dir}\nSQLITE=${sqlite}\nMYSQL=${mysql}\nMYSQL_CFLAGS=${mysql_cflags}\nMYSQL_LIBS=${mysql_libs}\nCURL=${curl}\nCURL_CFLAGS=${curl_cflags}\nCURL_LIBS=${curl_libs}\n\n">config.inc diff --git a/contract.json b/examples/contract.json similarity index 100% rename from contract.json rename to examples/contract.json diff --git a/contract_example.cpp b/examples/contract_example.cpp similarity index 75% rename from contract_example.cpp rename to examples/contract_example.cpp index c80ac03..fb992ff 100644 --- a/contract_example.cpp +++ b/examples/contract_example.cpp @@ -1,6 +1,9 @@ #include #include -#include "univcont.h" +#include "uccontract.h" +#include "ucontainer.h" +#include "ucio.h" + using namespace JAD; int main(int argc, char** argv) @@ -9,10 +12,10 @@ int main(int argc, char** argv) UniversalContainer cspec = uc_from_json_file("contract.json"); UCContract contract(cspec); UniversalContainer uc = uc_from_json_file("data.json"); - + contract.compare_and_throw(uc); - cout << "Data matches contract." << endl; - + std::cout << "Data matches contract." << std::endl; + return 0; } catch(UniversalContainer uce) { print(uce); diff --git a/data.json b/examples/data.json similarity index 100% rename from data.json rename to examples/data.json diff --git a/example.cpp b/examples/example.cpp similarity index 100% rename from example.cpp rename to examples/example.cpp diff --git a/json_parser.lex b/flex/json_parser.lex similarity index 99% rename from json_parser.lex rename to flex/json_parser.lex index c7f2ab1..d0582c1 100644 --- a/json_parser.lex +++ b/flex/json_parser.lex @@ -1,4 +1,3 @@ -%option outfile="ucoder_json.cpp" %option c++ %option noyywrap diff --git a/ucoder_json.cpp b/flex/ucoder_json.cpp.fallback similarity index 100% rename from ucoder_json.cpp rename to flex/ucoder_json.cpp.fallback diff --git a/buffer.h b/include/buffer.h similarity index 100% rename from buffer.h rename to include/buffer.h diff --git a/stl_util.h b/include/stl_util.h similarity index 100% rename from stl_util.h rename to include/stl_util.h diff --git a/string_util.h b/include/string_util.h similarity index 100% rename from string_util.h rename to include/string_util.h diff --git a/uc_web.h b/include/uc_web.h similarity index 100% rename from uc_web.h rename to include/uc_web.h diff --git a/uccontract.h b/include/uccontract.h similarity index 100% rename from uccontract.h rename to include/uccontract.h diff --git a/ucdb.h b/include/ucdb.h similarity index 100% rename from ucdb.h rename to include/ucdb.h diff --git a/ucio.h b/include/ucio.h similarity index 100% rename from ucio.h rename to include/ucio.h diff --git a/ucmysql.h b/include/ucmysql.h similarity index 100% rename from ucmysql.h rename to include/ucmysql.h diff --git a/ucontainer.h b/include/ucontainer.h similarity index 100% rename from ucontainer.h rename to include/ucontainer.h diff --git a/ucsqlite.h b/include/ucsqlite.h similarity index 100% rename from ucsqlite.h rename to include/ucsqlite.h diff --git a/univcont.h b/include/univcont.h similarity index 100% rename from univcont.h rename to include/univcont.h diff --git a/libuc.xcodeproj/project.pbxproj b/libuc.xcodeproj/project.pbxproj deleted file mode 100644 index 5c75cf8..0000000 --- a/libuc.xcodeproj/project.pbxproj +++ /dev/null @@ -1,447 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - DB427CCB1597CA63001BD886 /* buffer_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB427C9B1597CA63001BD886 /* buffer_util.cpp */; }; - DB427CCC1597CA63001BD886 /* buffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB427C9C1597CA63001BD886 /* buffer.cpp */; }; - DB427CCD1597CA63001BD886 /* buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = DB427C9D1597CA63001BD886 /* buffer.h */; }; - DB427CD21597CA63001BD886 /* stl_util.h in Headers */ = {isa = PBXBuildFile; fileRef = DB427CB31597CA63001BD886 /* stl_util.h */; }; - DB427CD81597CA63001BD886 /* uccontract.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB427CB91597CA63001BD886 /* uccontract.cpp */; }; - DB427CD91597CA63001BD886 /* uccontract.h in Headers */ = {isa = PBXBuildFile; fileRef = DB427CBA1597CA63001BD886 /* uccontract.h */; }; - DB427CDA1597CA63001BD886 /* ucdb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB427CBB1597CA63001BD886 /* ucdb.cpp */; }; - DB427CDB1597CA63001BD886 /* ucdb.h in Headers */ = {isa = PBXBuildFile; fileRef = DB427CBC1597CA63001BD886 /* ucdb.h */; }; - DB427CDC1597CA63001BD886 /* ucio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB427CBD1597CA63001BD886 /* ucio.cpp */; }; - DB427CDD1597CA63001BD886 /* ucio.h in Headers */ = {isa = PBXBuildFile; fileRef = DB427CBE1597CA63001BD886 /* ucio.h */; }; - DB427CE01597CA63001BD886 /* ucoder_bin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB427CC11597CA63001BD886 /* ucoder_bin.cpp */; }; - DB427CE11597CA63001BD886 /* ucoder_ini.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB427CC21597CA63001BD886 /* ucoder_ini.cpp */; }; - DB427CE21597CA63001BD886 /* ucoder_json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB427CC31597CA63001BD886 /* ucoder_json.cpp */; }; - DB427CE31597CA63001BD886 /* ucontainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB427CC41597CA63001BD886 /* ucontainer.cpp */; }; - DB427CE41597CA63001BD886 /* ucontainer.h in Headers */ = {isa = PBXBuildFile; fileRef = DB427CC51597CA63001BD886 /* ucontainer.h */; }; - DB427CE71597CA63001BD886 /* univcont.h in Headers */ = {isa = PBXBuildFile; fileRef = DB427CC81597CA63001BD886 /* univcont.h */; }; - DBD43B5B1597CDCF00CD4D0F /* example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB427CAD1597CA63001BD886 /* example.cpp */; }; - DBD43B5C1597CDE100CD4D0F /* libuc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DBAABD861597C98600DBD4C8 /* libuc.a */; }; - DBD43B621597CEA600CD4D0F /* string_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB427CB41597CA63001BD886 /* string_util.cpp */; }; - DBD43B631597CEA900CD4D0F /* string_util.h in Headers */ = {isa = PBXBuildFile; fileRef = DB427CB51597CA63001BD886 /* string_util.h */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - DBD43B4F1597CDC000CD4D0F /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - DB427C9A1597CA63001BD886 /* buffer_curl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = buffer_curl.cpp; sourceTree = ""; }; - DB427C9B1597CA63001BD886 /* buffer_util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = buffer_util.cpp; sourceTree = ""; }; - DB427C9C1597CA63001BD886 /* buffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = buffer.cpp; sourceTree = ""; }; - DB427C9D1597CA63001BD886 /* buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffer.h; sourceTree = ""; }; - DB427C9F1597CA63001BD886 /* contract_example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = contract_example.cpp; sourceTree = ""; }; - DB427CA01597CA63001BD886 /* contract.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = contract.json; sourceTree = ""; }; - DB427CA11597CA63001BD886 /* data.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = data.json; sourceTree = ""; }; - DB427CA31597CA63001BD886 /* Buffer.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = Buffer.html; sourceTree = ""; }; - DB427CA41597CA63001BD886 /* DatabaseInterface.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = DatabaseInterface.html; sourceTree = ""; }; - DB427CA51597CA63001BD886 /* example.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = example.html; sourceTree = ""; }; - DB427CA61597CA63001BD886 /* GenericRoutines.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = GenericRoutines.html; sourceTree = ""; }; - DB427CA71597CA63001BD886 /* libuc.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = libuc.html; sourceTree = ""; }; - DB427CA81597CA63001BD886 /* proglib.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = proglib.css; sourceTree = ""; }; - DB427CA91597CA63001BD886 /* UCContract.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = UCContract.html; sourceTree = ""; }; - DB427CAA1597CA63001BD886 /* UCIO.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = UCIO.html; sourceTree = ""; }; - DB427CAB1597CA63001BD886 /* UniversalContainer.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = UniversalContainer.html; sourceTree = ""; }; - DB427CAC1597CA63001BD886 /* WebRoutines.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = WebRoutines.html; sourceTree = ""; }; - DB427CAD1597CA63001BD886 /* example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = example.cpp; sourceTree = ""; }; - DB427CAE1597CA63001BD886 /* json_parser.lex */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = json_parser.lex; sourceTree = ""; }; - DB427CAF1597CA63001BD886 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - DB427CB21597CA63001BD886 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; - DB427CB31597CA63001BD886 /* stl_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stl_util.h; sourceTree = ""; }; - DB427CB41597CA63001BD886 /* string_util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = string_util.cpp; sourceTree = ""; }; - DB427CB51597CA63001BD886 /* string_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = string_util.h; sourceTree = ""; }; - DB427CB61597CA63001BD886 /* uc_curl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = uc_curl.cpp; sourceTree = ""; }; - DB427CB71597CA63001BD886 /* uc_web.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = uc_web.cpp; sourceTree = ""; }; - DB427CB81597CA63001BD886 /* uc_web.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uc_web.h; sourceTree = ""; }; - DB427CB91597CA63001BD886 /* uccontract.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = uccontract.cpp; sourceTree = ""; }; - DB427CBA1597CA63001BD886 /* uccontract.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uccontract.h; sourceTree = ""; }; - DB427CBB1597CA63001BD886 /* ucdb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ucdb.cpp; sourceTree = ""; }; - DB427CBC1597CA63001BD886 /* ucdb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucdb.h; sourceTree = ""; }; - DB427CBD1597CA63001BD886 /* ucio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ucio.cpp; sourceTree = ""; }; - DB427CBE1597CA63001BD886 /* ucio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucio.h; sourceTree = ""; }; - DB427CBF1597CA63001BD886 /* ucmysql.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ucmysql.cpp; sourceTree = ""; }; - DB427CC01597CA63001BD886 /* ucmysql.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucmysql.h; sourceTree = ""; }; - DB427CC11597CA63001BD886 /* ucoder_bin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ucoder_bin.cpp; sourceTree = ""; }; - DB427CC21597CA63001BD886 /* ucoder_ini.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ucoder_ini.cpp; sourceTree = ""; }; - DB427CC31597CA63001BD886 /* ucoder_json.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ucoder_json.cpp; sourceTree = ""; }; - DB427CC41597CA63001BD886 /* ucontainer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ucontainer.cpp; sourceTree = ""; }; - DB427CC51597CA63001BD886 /* ucontainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucontainer.h; sourceTree = ""; }; - DB427CC61597CA63001BD886 /* ucsqlite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ucsqlite.cpp; sourceTree = ""; }; - DB427CC71597CA63001BD886 /* ucsqlite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucsqlite.h; sourceTree = ""; }; - DB427CC81597CA63001BD886 /* univcont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = univcont.h; sourceTree = ""; }; - DB427CC91597CA63001BD886 /* version */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = version; sourceTree = ""; }; - DBAABD861597C98600DBD4C8 /* libuc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libuc.a; sourceTree = BUILT_PRODUCTS_DIR; }; - DBD43B511597CDC000CD4D0F /* example */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = example; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - DBAABD831597C98600DBD4C8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DBD43B4E1597CDC000CD4D0F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - DBD43B5C1597CDE100CD4D0F /* libuc.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - DB427CA21597CA63001BD886 /* doc */ = { - isa = PBXGroup; - children = ( - DB427CA31597CA63001BD886 /* Buffer.html */, - DB427CA41597CA63001BD886 /* DatabaseInterface.html */, - DB427CA51597CA63001BD886 /* example.html */, - DB427CA61597CA63001BD886 /* GenericRoutines.html */, - DB427CA71597CA63001BD886 /* libuc.html */, - DB427CA81597CA63001BD886 /* proglib.css */, - DB427CA91597CA63001BD886 /* UCContract.html */, - DB427CAA1597CA63001BD886 /* UCIO.html */, - DB427CAB1597CA63001BD886 /* UniversalContainer.html */, - DB427CAC1597CA63001BD886 /* WebRoutines.html */, - ); - path = doc; - sourceTree = ""; - }; - DB427CE91597CA83001BD886 /* examples */ = { - isa = PBXGroup; - children = ( - DB427C9F1597CA63001BD886 /* contract_example.cpp */, - DB427CA01597CA63001BD886 /* contract.json */, - DB427CA11597CA63001BD886 /* data.json */, - DB427CAD1597CA63001BD886 /* example.cpp */, - ); - name = examples; - sourceTree = ""; - }; - DB427CEB1597CA92001BD886 /* libuc */ = { - isa = PBXGroup; - children = ( - DBD43B491597CB8C00CD4D0F /* mysql */, - DBD43B4A1597CBAC00CD4D0F /* sqlite */, - DBD43B4B1597CC3C00CD4D0F /* curl */, - DBD43B4C1597CD2F00CD4D0F /* web */, - DB427C9B1597CA63001BD886 /* buffer_util.cpp */, - DB427C9C1597CA63001BD886 /* buffer.cpp */, - DB427C9D1597CA63001BD886 /* buffer.h */, - DB427CAE1597CA63001BD886 /* json_parser.lex */, - DB427CB31597CA63001BD886 /* stl_util.h */, - DB427CB41597CA63001BD886 /* string_util.cpp */, - DB427CB51597CA63001BD886 /* string_util.h */, - DB427CB91597CA63001BD886 /* uccontract.cpp */, - DB427CBA1597CA63001BD886 /* uccontract.h */, - DB427CBB1597CA63001BD886 /* ucdb.cpp */, - DB427CBC1597CA63001BD886 /* ucdb.h */, - DB427CBD1597CA63001BD886 /* ucio.cpp */, - DB427CBE1597CA63001BD886 /* ucio.h */, - DB427CC11597CA63001BD886 /* ucoder_bin.cpp */, - DB427CC21597CA63001BD886 /* ucoder_ini.cpp */, - DB427CC31597CA63001BD886 /* ucoder_json.cpp */, - DB427CC41597CA63001BD886 /* ucontainer.cpp */, - DB427CC51597CA63001BD886 /* ucontainer.h */, - DB427CC81597CA63001BD886 /* univcont.h */, - ); - name = libuc; - sourceTree = ""; - }; - DBAABD7B1597C98600DBD4C8 = { - isa = PBXGroup; - children = ( - DB427CEB1597CA92001BD886 /* libuc */, - DB427CE91597CA83001BD886 /* examples */, - DB427CA21597CA63001BD886 /* doc */, - DB427CAF1597CA63001BD886 /* LICENSE */, - DB427CB21597CA63001BD886 /* README */, - DB427CC91597CA63001BD886 /* version */, - DBAABD871597C98600DBD4C8 /* Products */, - ); - sourceTree = ""; - }; - DBAABD871597C98600DBD4C8 /* Products */ = { - isa = PBXGroup; - children = ( - DBAABD861597C98600DBD4C8 /* libuc.a */, - DBD43B511597CDC000CD4D0F /* example */, - ); - name = Products; - sourceTree = ""; - }; - DBD43B491597CB8C00CD4D0F /* mysql */ = { - isa = PBXGroup; - children = ( - DB427CBF1597CA63001BD886 /* ucmysql.cpp */, - DB427CC01597CA63001BD886 /* ucmysql.h */, - ); - name = mysql; - sourceTree = ""; - }; - DBD43B4A1597CBAC00CD4D0F /* sqlite */ = { - isa = PBXGroup; - children = ( - DB427CC61597CA63001BD886 /* ucsqlite.cpp */, - DB427CC71597CA63001BD886 /* ucsqlite.h */, - ); - name = sqlite; - sourceTree = ""; - }; - DBD43B4B1597CC3C00CD4D0F /* curl */ = { - isa = PBXGroup; - children = ( - DB427C9A1597CA63001BD886 /* buffer_curl.cpp */, - DB427CB61597CA63001BD886 /* uc_curl.cpp */, - ); - name = curl; - sourceTree = ""; - }; - DBD43B4C1597CD2F00CD4D0F /* web */ = { - isa = PBXGroup; - children = ( - DB427CB71597CA63001BD886 /* uc_web.cpp */, - DB427CB81597CA63001BD886 /* uc_web.h */, - ); - name = web; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - DBAABD841597C98600DBD4C8 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - DB427CCD1597CA63001BD886 /* buffer.h in Headers */, - DB427CD21597CA63001BD886 /* stl_util.h in Headers */, - DB427CD91597CA63001BD886 /* uccontract.h in Headers */, - DB427CDB1597CA63001BD886 /* ucdb.h in Headers */, - DB427CDD1597CA63001BD886 /* ucio.h in Headers */, - DB427CE41597CA63001BD886 /* ucontainer.h in Headers */, - DB427CE71597CA63001BD886 /* univcont.h in Headers */, - DBD43B631597CEA900CD4D0F /* string_util.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - DBAABD851597C98600DBD4C8 /* uc */ = { - isa = PBXNativeTarget; - buildConfigurationList = DBAABD8A1597C98600DBD4C8 /* Build configuration list for PBXNativeTarget "uc" */; - buildPhases = ( - DBAABD821597C98600DBD4C8 /* Sources */, - DBAABD831597C98600DBD4C8 /* Frameworks */, - DBAABD841597C98600DBD4C8 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = uc; - productName = libuc; - productReference = DBAABD861597C98600DBD4C8 /* libuc.a */; - productType = "com.apple.product-type.library.static"; - }; - DBD43B501597CDC000CD4D0F /* example */ = { - isa = PBXNativeTarget; - buildConfigurationList = DBD43B581597CDC000CD4D0F /* Build configuration list for PBXNativeTarget "example" */; - buildPhases = ( - DBD43B4D1597CDC000CD4D0F /* Sources */, - DBD43B4E1597CDC000CD4D0F /* Frameworks */, - DBD43B4F1597CDC000CD4D0F /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = example; - productName = example; - productReference = DBD43B511597CDC000CD4D0F /* example */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - DBAABD7D1597C98600DBD4C8 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0420; - ORGANIZATIONNAME = OutOfOrder.cc; - }; - buildConfigurationList = DBAABD801597C98600DBD4C8 /* Build configuration list for PBXProject "libuc" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = DBAABD7B1597C98600DBD4C8; - productRefGroup = DBAABD871597C98600DBD4C8 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - DBAABD851597C98600DBD4C8 /* uc */, - DBD43B501597CDC000CD4D0F /* example */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - DBAABD821597C98600DBD4C8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DB427CCB1597CA63001BD886 /* buffer_util.cpp in Sources */, - DB427CCC1597CA63001BD886 /* buffer.cpp in Sources */, - DB427CD81597CA63001BD886 /* uccontract.cpp in Sources */, - DB427CDA1597CA63001BD886 /* ucdb.cpp in Sources */, - DB427CDC1597CA63001BD886 /* ucio.cpp in Sources */, - DB427CE01597CA63001BD886 /* ucoder_bin.cpp in Sources */, - DB427CE11597CA63001BD886 /* ucoder_ini.cpp in Sources */, - DB427CE21597CA63001BD886 /* ucoder_json.cpp in Sources */, - DB427CE31597CA63001BD886 /* ucontainer.cpp in Sources */, - DBD43B621597CEA600CD4D0F /* string_util.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DBD43B4D1597CDC000CD4D0F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DBD43B5B1597CDCF00CD4D0F /* example.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - DBAABD881597C98600DBD4C8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - DBAABD891597C98600DBD4C8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; - SDKROOT = macosx; - }; - name = Release; - }; - DBAABD8B1597C98600DBD4C8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - EXECUTABLE_PREFIX = lib; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - DBAABD8C1597C98600DBD4C8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - EXECUTABLE_PREFIX = lib; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - DBD43B591597CDC000CD4D0F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - DBD43B5A1597CDC000CD4D0F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - DBAABD801597C98600DBD4C8 /* Build configuration list for PBXProject "libuc" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DBAABD881597C98600DBD4C8 /* Debug */, - DBAABD891597C98600DBD4C8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - DBAABD8A1597C98600DBD4C8 /* Build configuration list for PBXNativeTarget "uc" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DBAABD8B1597C98600DBD4C8 /* Debug */, - DBAABD8C1597C98600DBD4C8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - DBD43B581597CDC000CD4D0F /* Build configuration list for PBXNativeTarget "example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DBD43B591597CDC000CD4D0F /* Debug */, - DBD43B5A1597CDC000CD4D0F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = DBAABD7D1597C98600DBD4C8 /* Project object */; -} diff --git a/buffer.cpp b/src/buffer.cpp similarity index 98% rename from buffer.cpp rename to src/buffer.cpp index ff393a8..34d3a74 100644 --- a/buffer.cpp +++ b/src/buffer.cpp @@ -16,7 +16,7 @@ /* This file contains member definitions for the buffer - class. buffer_util.cpp contains definitons for routines to interface + class. buffer_util.cpp contains definitions for routines to interface buffers to actual streams and files. buffer_curl.cpp contains routines for sending buffers over curl handles. */ diff --git a/buffer_curl.cpp b/src/buffer_curl.cpp similarity index 99% rename from buffer_curl.cpp rename to src/buffer_curl.cpp index 925ac59..43e79a8 100644 --- a/buffer_curl.cpp +++ b/src/buffer_curl.cpp @@ -9,8 +9,9 @@ /* Routines to use Buffers with curl. */ -#include #include "buffer.h" +#include +#include namespace JAD { diff --git a/buffer_util.cpp b/src/buffer_util.cpp similarity index 99% rename from buffer_util.cpp rename to src/buffer_util.cpp index f7cf0fa..8b29eeb 100644 --- a/buffer_util.cpp +++ b/src/buffer_util.cpp @@ -9,7 +9,7 @@ /* Routines to match buffers with FILE*, system handles (sockets), iostreams. - Also includes facilites for base64 encoding. + Also includes facilities for base64 encoding. */ #include diff --git a/string_util.cpp b/src/string_util.cpp similarity index 100% rename from string_util.cpp rename to src/string_util.cpp diff --git a/uc_curl.cpp b/src/uc_curl.cpp similarity index 100% rename from uc_curl.cpp rename to src/uc_curl.cpp diff --git a/uc_web.cpp b/src/uc_web.cpp similarity index 100% rename from uc_web.cpp rename to src/uc_web.cpp diff --git a/uccontract.cpp b/src/uccontract.cpp similarity index 100% rename from uccontract.cpp rename to src/uccontract.cpp diff --git a/ucdb.cpp b/src/ucdb.cpp similarity index 100% rename from ucdb.cpp rename to src/ucdb.cpp diff --git a/ucio.cpp b/src/ucio.cpp similarity index 100% rename from ucio.cpp rename to src/ucio.cpp diff --git a/ucmysql.cpp b/src/ucmysql.cpp similarity index 100% rename from ucmysql.cpp rename to src/ucmysql.cpp diff --git a/ucoder_bin.cpp b/src/ucoder_bin.cpp similarity index 100% rename from ucoder_bin.cpp rename to src/ucoder_bin.cpp diff --git a/ucoder_ini.cpp b/src/ucoder_ini.cpp similarity index 100% rename from ucoder_ini.cpp rename to src/ucoder_ini.cpp diff --git a/ucontainer.cpp b/src/ucontainer.cpp similarity index 90% rename from ucontainer.cpp rename to src/ucontainer.cpp index fbcd7f3..05b2dc0 100644 --- a/ucontainer.cpp +++ b/src/ucontainer.cpp @@ -7,6 +7,8 @@ * http://www.greatpanic.com/code.html */ +#include +#include #include #include #include @@ -21,9 +23,9 @@ Limitations : All maps, vectors, and strings are references, and copies copy the reference. - The array behavior is strange. If an index has not been previously + The array behaviour is strange. If an index has not been previously used, it must be equal to the current size of the array. That is, it must - be one past the previously used indicies. + be one past the previously used indices. */ @@ -34,8 +36,6 @@ #define internal_ucexception(C) construct_exception(C,NULL,NULL,0,this) #endif -using namespace std; - namespace JAD { static const char* BOOL_VAL_STR = "#boolean_value"; @@ -78,7 +78,7 @@ namespace JAD { dirty = true; } - void UniversalContainer::set_value_string(const string& s) + void UniversalContainer::set_value_string(const std::string& s) { //if we already have a string reference if (refcount) { @@ -98,10 +98,10 @@ namespace JAD { type = uc_String; dirty = true; - data.str = new string(s); + data.str = new std::string(s); } - void UniversalContainer::set_value_wstring(const wstring& s) + void UniversalContainer::set_value_wstring(const std::wstring& s) { //if we already have a string reference if (refcount) { @@ -121,15 +121,15 @@ namespace JAD { type = uc_WString; dirty = true; - data.wstr = new wstring(s); + data.wstr = new std::wstring(s); } void UniversalContainer::set_value_cstr(const char* s) { if (s) - set_value_string(string(s)); + set_value_string(std::string(s)); else { - string tmp; + std::string tmp; set_value_string(tmp); } } @@ -198,14 +198,14 @@ namespace JAD { set_value_double(d); } - UniversalContainer::UniversalContainer(const string s) + UniversalContainer::UniversalContainer(const std::string s) { refcount = NULL; set_value_string(s); return; } - UniversalContainer::UniversalContainer(const wstring s) + UniversalContainer::UniversalContainer(const std::wstring s) { refcount = NULL; set_value_wstring(s); @@ -293,7 +293,7 @@ namespace JAD { //map brackets does the actual work of operator[string] //it understand . notation to reach nested maps - UniversalContainer& UniversalContainer::map_brackets(const string s) + UniversalContainer& UniversalContainer::map_brackets(const std::string s) { unsigned long pos; bool ismap; @@ -304,19 +304,29 @@ namespace JAD { //split input into first argument and rest pos = s.find('.'); piece1 = s.substr(0,pos); - if (pos != string::npos) piece2 = s.substr(pos+1); + if (pos != std::string::npos) piece2 = s.substr(pos+1); //double check that this isn't really supposed to be a string if (type == uc_Map) ismap = true; else { errno = 0; - idx = strtol(piece1.c_str(),NULL,10); - if (errno) ismap = true; - else ismap = false; + char* ptr = NULL; + idx = strtol(piece1.c_str(), &ptr, 10); + if (errno == 0 && idx == 0) { + // This could have been a completely non-numeric string, or could have been a string representation of zero + // Find first non-whitespace char of piece1 + std::string::iterator it_first_nonspace = std::find_if(piece1.begin(), piece1.end(), std::not1(std::ptr_fun(std::isspace))); + // e.g. number of blank characters to skip + size_t chars_to_skip = it_first_nonspace - piece1.begin(); + + // If the start of the numeric string is the start of non-whitespace, there wasn't an array index at all (which means this is a map) + ismap = ptr == piece1.c_str() + chars_to_skip; + } else + ismap = false; } if (ismap) { - if (type == uc_Null) init_map(); //if this is my first apparence, setup + if (type == uc_Null) init_map(); //if this is my first appearance, setup if (type != uc_Map) throw internal_ucexception(uce_Scalar_as_Collection); if (piece2 == "") return (*(data.map))[piece1]; @@ -331,26 +341,26 @@ namespace JAD { } } - UniversalContainer& UniversalContainer::operator[](const string s) + UniversalContainer& UniversalContainer::operator[](const std::string s) { return map_brackets(s); } - UniversalContainer& UniversalContainer::operator[](const wstring w) + UniversalContainer& UniversalContainer::operator[](const std::wstring w) { return map_brackets(convert_wstring_to_string(&w)); } UniversalContainer& UniversalContainer::operator[](char* s) { - string str(s); + std::string str(s); return map_brackets(str); } UniversalContainer& UniversalContainer::operator[](const char* s) { - string str(s); + std::string str(s); return map_brackets(str); } @@ -413,7 +423,7 @@ namespace JAD { return *this; } - UniversalContainer& UniversalContainer::operator=(const string& s) + UniversalContainer& UniversalContainer::operator=(const std::string& s) { if (!(type == uc_String || type == uc_Null)) throw internal_ucexception(uce_TypeMismatch_Write); @@ -422,7 +432,7 @@ namespace JAD { return *this; } - UniversalContainer& UniversalContainer::operator=(const wstring& s) + UniversalContainer& UniversalContainer::operator=(const std::wstring& s) { if (!(type == uc_WString || type == uc_Null)) throw internal_ucexception(uce_TypeMismatch_Write); @@ -456,7 +466,7 @@ namespace JAD { } //utilities for casting strings to longs - long UniversalContainer::convert_string_to_long(const string* s) + long UniversalContainer::convert_string_to_long(const std::string* s) { errno = 0; long l = strtol(s->c_str(),NULL,10); @@ -464,9 +474,9 @@ namespace JAD { return l; } - long UniversalContainer::convert_wstring_to_long(const wstring* s) + long UniversalContainer::convert_wstring_to_long(const std::wstring* s) { - string tmp = convert_wstring_to_string(s); + std::string tmp = convert_wstring_to_string(s); return convert_string_to_long(&tmp); } @@ -553,21 +563,21 @@ namespace JAD { return convert_wstring_to_string(data.wstr); case uc_Integer : snprintf(buf,32,"%ld",data.num); - return string(buf); + return std::string(buf); break; case uc_Real : snprintf(buf,32,"%g",data.real); - return string(buf); + return std::string(buf); break; case uc_Boolean : - if (data.tf) return string(true_str); - else return string(false_str); + if (data.tf) return std::string(true_str); + else return std::string(false_str); case uc_Character : snprintf(buf,32,"%c",data.chr); return(buf); break; case uc_Null : - return string("null"); + return std::string("null"); break; case uc_Map : case uc_Array : @@ -576,14 +586,14 @@ namespace JAD { throw internal_ucexception(uce_Unknown); } - return string("error"); + return std::string("error"); } std::wstring UniversalContainer::convert_wstring(void) const { - wstring retval; + std::wstring retval; char buf[32]; - string tmp; + std::string tmp; switch (type) { case uc_WString : @@ -703,7 +713,7 @@ namespace JAD { return false; } - double UniversalContainer::convert_string_to_double(const string* s) + double UniversalContainer::convert_string_to_double(const std::string* s) { double retval; char* ptr; @@ -716,9 +726,9 @@ namespace JAD { return retval; } - double UniversalContainer::convert_wstring_to_double(const wstring* s) + double UniversalContainer::convert_wstring_to_double(const std::wstring* s) { - string tmp = convert_wstring_to_string(s); + std::string tmp = convert_wstring_to_string(s); return convert_string_to_double(&tmp); } @@ -794,7 +804,7 @@ namespace JAD { //kind of a string constructor. Callable only on a null container. //works through various options to figure out if the string //is an integer, number, boolean, or character. - void UniversalContainer::string_interpret(const string s) + void UniversalContainer::string_interpret(const std::string s) { const char* str = s.c_str(); char* end; @@ -967,7 +977,7 @@ namespace JAD { } //true if this is a map, and it contains the given key - bool UniversalContainer::exists(const string key) const + bool UniversalContainer::exists(const std::string key) const { if (type == uc_Map) return (data.map->count(key) > 0); else return false; @@ -1003,7 +1013,7 @@ namespace JAD { } //delete a key from a map - bool UniversalContainer::remove(const string key) + bool UniversalContainer::remove(const std::string key) { if (type != uc_Map) throw internal_ucexception(uce_TypeMismatch_Read); UniversalMap::iterator pos = data.map->find(key); @@ -1143,9 +1153,9 @@ namespace JAD { //sizeof(wchar_t) differs for windows/unix, so we go through some //gyrations in an attempt to make this work everywhere - string UniversalContainer::convert_wstring_to_string(const wstring* wstr) + std::string UniversalContainer::convert_wstring_to_string(const std::wstring* wstr) { - string s; + std::string s; wchar_t w,t; wchar_t mask = -1; @@ -1163,12 +1173,12 @@ namespace JAD { return s; } - wstring UniversalContainer::convert_string_to_wstring(const string* s) + std::wstring UniversalContainer::convert_string_to_wstring(const std::string* s) { wchar_t* ws = new wchar_t[s->length()]; for (unsigned i = 0; i < s->length(); i++) ws[i] = static_cast((*s)[i]); - wstring wstr(ws); + std::wstring wstr(ws); return wstr; } diff --git a/ucsqlite.cpp b/src/ucsqlite.cpp similarity index 100% rename from ucsqlite.cpp rename to src/ucsqlite.cpp diff --git a/version b/version deleted file mode 100644 index 9c4aa24..0000000 --- a/version +++ /dev/null @@ -1 +0,0 @@ -042312 diff --git a/version.cmake b/version.cmake new file mode 100644 index 0000000..bedfc5c --- /dev/null +++ b/version.cmake @@ -0,0 +1,3 @@ +SET(APPLICATION_VERSION_MAJOR 0) +SET(APPLICATION_VERSION_MINOR 1) +SET(APPLICATION_VERSION_PATCH 0)