summaryrefslogtreecommitdiff
path: root/cpp/demo/Manual/simple_filesystem/FilesystemI.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2015-03-18 12:58:16 -0230
committerMatthew Newhook <matthew@zeroc.com>2015-03-18 12:58:16 -0230
commit9b7668c7c92cf9cb311fe444cdddb489cd2a219d (patch)
tree5016567c58c81f5654e9d01935e199c6bf4761d2 /cpp/demo/Manual/simple_filesystem/FilesystemI.cpp
parentVS add-in & build updates: (diff)
downloadice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.bz2
ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.xz
ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.zip
Removed demos.
Moved demoscript to distribution.
Diffstat (limited to 'cpp/demo/Manual/simple_filesystem/FilesystemI.cpp')
-rw-r--r--cpp/demo/Manual/simple_filesystem/FilesystemI.cpp97
1 files changed, 0 insertions, 97 deletions
diff --git a/cpp/demo/Manual/simple_filesystem/FilesystemI.cpp b/cpp/demo/Manual/simple_filesystem/FilesystemI.cpp
deleted file mode 100644
index b4b8a461cad..00000000000
--- a/cpp/demo/Manual/simple_filesystem/FilesystemI.cpp
+++ /dev/null
@@ -1,97 +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.
-//
-// **********************************************************************
-
-#include <IceUtil/IceUtil.h>
-#include <FilesystemI.h>
-
-using namespace std;
-
-// Slice Node::name() operation
-
-std::string
-Filesystem::NodeI::name(const Ice::Current&)
-{
- return _name;
-}
-
-// NodeI constructor
-
-Filesystem::NodeI::NodeI(const Ice::CommunicatorPtr&, const string& nm, const DirectoryIPtr& parent) :
- _name(nm), _parent(parent)
-{
- // Create an identity. The root directory has the fixed identity "RootDir"
- if(parent)
- {
- _id.name = IceUtil::generateUUID();
- }
- else
- {
- _id.name = "RootDir";
- }
-}
-
-// NodeI activate() member function
-
-void
-Filesystem::NodeI::activate(const Ice::ObjectAdapterPtr& a)
-{
- NodePrx thisNode = NodePrx::uncheckedCast(a->add(this, _id));
- if(_parent)
- {
- _parent->addChild(thisNode);
- }
-}
-
-// Slice File::read() operation
-
-Filesystem::Lines
-Filesystem::FileI::read(const Ice::Current&)
-{
- return _lines;
-}
-
-// Slice File::write() operation
-
-void
-Filesystem::FileI::write(const Filesystem::Lines& text, const Ice::Current&)
-{
- _lines = text;
-}
-
-// FileI constructor
-
-Filesystem::FileI::FileI(const Ice::CommunicatorPtr& communicator, const string& nm, const DirectoryIPtr& parent) :
- NodeI(communicator, nm, parent)
-{
-}
-
-// Slice Directory::list() operation
-
-Filesystem::NodeSeq
-Filesystem::DirectoryI::list(const Ice::Current&)
-{
- return _contents;
-}
-
-// DirectoryI constructor
-
-Filesystem::DirectoryI::DirectoryI(const Ice::CommunicatorPtr& communicator, const string& nm,
- const DirectoryIPtr& parent) :
- NodeI(communicator, nm, parent)
-{
-}
-
-// addChild is called by the child in order to add
-// itself to the _contents member of the parent
-
-void
-Filesystem::DirectoryI::addChild(const NodePrx& child)
-{
- _contents.push_back(child);
-}