summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2015-11-06 14:33:29 -0330
committerDwayne Boone <dwayne@zeroc.com>2015-11-06 14:33:29 -0330
commit41feec733aab2bb69579a9e1b0b69e8d6fbd31cb (patch)
tree9af6aa0273760fa42c619923d6f6396cb1526ecb /cpp/src
parentAdded properties to set the database map size for IceGrid/IceStorm (diff)
downloadice-41feec733aab2bb69579a9e1b0b69e8d6fbd31cb.tar.bz2
ice-41feec733aab2bb69579a9e1b0b69e8d6fbd31cb.tar.xz
ice-41feec733aab2bb69579a9e1b0b69e8d6fbd31cb.zip
A few changes to support move of Freeze
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceUtil/FileUtil.h167
-rw-r--r--cpp/src/IceXML/Parser.h177
2 files changed, 0 insertions, 344 deletions
diff --git a/cpp/src/IceUtil/FileUtil.h b/cpp/src/IceUtil/FileUtil.h
deleted file mode 100644
index a833e59e785..00000000000
--- a/cpp/src/IceUtil/FileUtil.h
+++ /dev/null
@@ -1,167 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#ifndef ICE_FILE_UTIL_H
-#define ICE_FILE_UTIL_H
-
-#include <IceUtil/Config.h>
-#include <IceUtil/Shared.h>
-#include <IceUtil/Handle.h>
-
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <fstream>
-
-namespace IceUtilInternal
-{
-
-extern const ICE_UTIL_API std::string pathsep;
-extern const ICE_UTIL_API std::string separator;
-
-//
-// Detemine if path is an absolute path.
-//
-ICE_UTIL_API bool isAbsolutePath(const std::string&);
-
-//
-// Determine if a file exists.
-//
-ICE_UTIL_API bool fileExists(const std::string&);
-
-//
-// Determine if a directory exists.
-//
-ICE_UTIL_API bool directoryExists(const std::string&);
-
-#ifdef _WIN32
-
-#if defined(__MINGW32__)
-typedef struct _stat structstat;
-#else
-typedef struct _stat64i32 structstat;
-#endif
-
-#ifdef _MSC_VER
-# define O_RDONLY _O_RDONLY
-# define O_BINARY _O_BINARY
-
-# define S_ISDIR(mode) ((mode) & _S_IFDIR)
-# define S_ISREG(mode) ((mode) & _S_IFREG)
-#endif
-
-#else
-
-typedef struct stat structstat;
-# define O_BINARY 0
-
-#endif
-
-//
-// OS stat
-//
-ICE_UTIL_API int stat(const std::string&, structstat*);
-ICE_UTIL_API int remove(const std::string&);
-ICE_UTIL_API int rename(const std::string&, const std::string&);
-ICE_UTIL_API int rmdir(const std::string&);
-
-ICE_UTIL_API int mkdir(const std::string&, int);
-ICE_UTIL_API FILE* fopen(const std::string&, const std::string&);
-ICE_UTIL_API FILE* freopen(const std::string&, const std::string&, FILE*);
-ICE_UTIL_API int open(const std::string&, int);
-
-#ifndef ICE_OS_WINRT
-ICE_UTIL_API int getcwd(std::string&);
-#endif
-
-ICE_UTIL_API int unlink(const std::string&);
-ICE_UTIL_API int close(int);
-
-//
-// This class is used to implement process file locking. This class
-// is not intended to do file locking within the same process.
-//
-class ICE_UTIL_API FileLock : public IceUtil::Shared, public IceUtil::noncopyable
-{
-public:
- //
- // The constructor opens the given file (eventually creating it)
- // and acquires a lock on the file or throws FileLockException if
- // the file couldn't be locked.
- //
- // If the lock can be acquired, the process pid is written to the
- // file.
- //
- FileLock(const std::string&);
-
- //
- // The destructor releases the lock and removes the file.
- //
- virtual ~FileLock();
-
-private:
-
-#ifdef _WIN32
- HANDLE _fd;
-#else
- int _fd;
-#endif
- std::string _path;
-};
-
-typedef IceUtil::Handle<FileLock> FileLockPtr;
-
-class ICE_UTIL_API ifstream : public std::ifstream
-{
-public:
-
- ifstream();
- ifstream(const std::string&, std::ios_base::openmode mode = std::ios_base::in);
- void open(const std::string&, std::ios_base::openmode mode = std::ios_base::in);
-
-#ifdef __SUNPRO_CC
- using std::ifstream::open;
-#endif
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1900)
- ifstream(const ifstream&) = delete;
-#endif
-
-private:
-
- // Hide const char* definitions since they shouldn't be used.
- ifstream(const char*);
- void open(const char*, std::ios_base::openmode mode = std::ios_base::in);
-};
-
-class ICE_UTIL_API ofstream : public std::ofstream
-{
-public:
-
- ofstream();
- ofstream(const std::string&, std::ios_base::openmode mode = std::ios_base::out);
- void open(const std::string&, std::ios_base::openmode mode = std::ios_base::out);
-
-#ifdef __SUNPRO_CC
- using std::ofstream::open;
-#endif
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1900)
- ofstream(const ofstream&) = delete;
-#endif
-
-private:
-
- // Hide const char* definitions since they shouldn't be used.
- ofstream(const char*);
- void open(const char*, std::ios_base::openmode mode = std::ios_base::out);
-};
-
-}
-#endif
diff --git a/cpp/src/IceXML/Parser.h b/cpp/src/IceXML/Parser.h
deleted file mode 100644
index f5de9291968..00000000000
--- a/cpp/src/IceXML/Parser.h
+++ /dev/null
@@ -1,177 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#ifndef ICE_XML_PARSER_H
-#define ICE_XML_PARSER_H
-
-#include <IceUtil/Shared.h>
-#include <IceUtil/Handle.h>
-#include <IceUtil/Exception.h>
-
-#include <vector>
-#include <map>
-
-#ifndef ICE_XML_API
-# ifdef ICE_XML_API_EXPORTS
-# define ICE_XML_API ICE_DECLSPEC_EXPORT
-# elif defined(ICE_STATIC_LIBS)
-# define ICE_XML_API /**/
-# else
-# define ICE_XML_API ICE_DECLSPEC_IMPORT
-# endif
-#endif
-
-//
-// Automatically link IceXML[D].lib with Visual C++
-//
-
-#if !defined(ICE_BUILDING_ICE_XML) && defined(ICE_XML_API_EXPORTS)
-# define ICE_BUILDING_ICE_XML
-#endif
-
-#ifdef _MSC_VER
-# if !defined(ICE_BUILDING_ICE_XML)
-# if defined(_DEBUG) && !defined(ICE_OS_WINRT)
-# pragma comment(lib, "IceXMLD.lib")
-# else
-# pragma comment(lib, "IceXML.lib")
-# endif
-# endif
-#endif
-
-namespace IceXML
-{
-
-class ICE_XML_API ParserException : public IceUtil::Exception
-{
-public:
-
- ParserException(const std::string&);
- ParserException(const char*, int, const std::string&);
- virtual ~ParserException() throw();
-
- virtual std::string ice_name() const;
- virtual void ice_print(std::ostream&) const;
- virtual ParserException* ice_clone() const;
- virtual void ice_throw() const;
-
- std::string reason() const;
-
-private:
-
- std::string _reason;
- static const char* _name;
-};
-
-class Node;
-typedef IceUtil::Handle< Node > NodePtr;
-
-typedef std::vector<NodePtr> NodeList;
-
-class Element;
-typedef IceUtil::Handle< Element > ElementPtr;
-
-class Text;
-typedef IceUtil::Handle< Text > TextPtr;
-
-class Document;
-typedef IceUtil::Handle< Document > DocumentPtr;
-
-typedef std::map<std::string, std::string> Attributes;
-
-class ICE_XML_API Node : public IceUtil::Shared
-{
-public:
- virtual ~Node();
-
- virtual NodePtr getParent() const;
- virtual std::string getName() const;
- virtual std::string getValue() const;
- virtual NodeList getChildren() const;
- virtual Attributes getAttributes() const;
- virtual std::string getAttribute(const std::string&) const;
-
- virtual bool addChild(const NodePtr&);
-
- int getLine() const;
- int getColumn() const;
-
-protected:
- Node(const NodePtr&, const std::string&, const std::string&, int, int);
-
- NodePtr _parent;
- std::string _name;
- std::string _value;
- int _line;
- int _column;
-};
-
-class ICE_XML_API Element : public Node
-{
-public:
- Element(const NodePtr&, const std::string&, const Attributes&, int, int);
- virtual ~Element();
-
- virtual NodeList getChildren() const;
- virtual Attributes getAttributes() const;
- virtual std::string getAttribute(const std::string&) const;
-
- virtual bool addChild(const NodePtr&);
-
-private:
- NodeList _children;
- Attributes _attributes;
-};
-
-class ICE_XML_API Text : public Node
-{
-public:
- Text(const NodePtr&, const std::string&, int, int);
- virtual ~Text();
-};
-
-class ICE_XML_API Document : public Node
-{
-public:
- Document();
- virtual ~Document();
-
- virtual NodeList getChildren() const;
-
- virtual bool addChild(const NodePtr&);
-
-private:
- NodeList _children;
-};
-
-class ICE_XML_API Handler
-{
-public:
- virtual ~Handler();
-
- virtual void startElement(const std::string&, const Attributes&, int, int) = 0;
- virtual void endElement(const std::string&, int, int) = 0;
- virtual void characters(const std::string&, int, int) = 0;
- virtual void error(const std::string&, int, int);
-};
-
-class ICE_XML_API Parser
-{
-public:
-
- static DocumentPtr parse(const std::string&); // The given filename must be UTF-8 encoded
- static DocumentPtr parse(std::istream&);
-
- static void parse(const std::string&, Handler&);
- static void parse(std::istream&, Handler&);
-};
-
-}
-
-#endif