summaryrefslogtreecommitdiff
path: root/autodoc/source/ary/loc
diff options
context:
space:
mode:
Diffstat (limited to 'autodoc/source/ary/loc')
-rw-r--r--autodoc/source/ary/loc/loc_dir.cxx137
-rw-r--r--autodoc/source/ary/loc/loc_file.cxx69
-rw-r--r--autodoc/source/ary/loc/loc_filebase.cxx66
-rw-r--r--autodoc/source/ary/loc/loc_root.cxx86
-rw-r--r--autodoc/source/ary/loc/loc_traits.cxx94
-rw-r--r--autodoc/source/ary/loc/loca_le.cxx184
-rw-r--r--autodoc/source/ary/loc/loca_le.hxx101
-rw-r--r--autodoc/source/ary/loc/locs_le.cxx70
-rw-r--r--autodoc/source/ary/loc/locs_le.hxx91
-rw-r--r--autodoc/source/ary/loc/makefile.mk61
10 files changed, 959 insertions, 0 deletions
diff --git a/autodoc/source/ary/loc/loc_dir.cxx b/autodoc/source/ary/loc/loc_dir.cxx
new file mode 100644
index 000000000000..220f47486332
--- /dev/null
+++ b/autodoc/source/ary/loc/loc_dir.cxx
@@ -0,0 +1,137 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include <ary/loc/loc_dir.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+#include <ary/loc/loc_file.hxx>
+#include <sortedids.hxx>
+#include "locs_le.hxx"
+
+
+namespace ary
+{
+namespace loc
+{
+
+struct Directory::Container
+{
+ typedef SortedIds<Le_Compare> SortedChildList;
+
+ SortedChildList aSubDirectories;
+ SortedChildList aFiles;
+
+ Container()
+ : aSubDirectories(),
+ aFiles()
+ {}
+};
+
+
+
+
+Directory::Directory(Le_id i_assignedRoot)
+ : sLocalName(),
+ nParentDirectory(0),
+ nAssignedRoot(i_assignedRoot),
+ aAssignedNode(),
+ pChildren(new Container)
+{
+ aAssignedNode.Assign_Entity(*this);
+}
+
+Directory::Directory( const String & i_localName,
+ Le_id i_parentDirectory )
+ : sLocalName(i_localName),
+ nParentDirectory(i_parentDirectory),
+ nAssignedRoot(0),
+ aAssignedNode(),
+ pChildren(new Container)
+{
+ aAssignedNode.Assign_Entity(*this);
+}
+
+Directory::~Directory()
+{
+}
+
+void
+Directory::Add_Dir(const Directory & i_dir)
+{
+ pChildren->aSubDirectories.Add(i_dir.LeId());
+}
+
+void
+Directory::Add_File(const File & i_file)
+{
+ pChildren->aFiles.Add(i_file.LeId());
+}
+
+Le_id
+Directory::Search_Dir(const String & i_name) const
+{
+ return pChildren->aSubDirectories.Search(i_name);
+}
+
+Le_id
+Directory::Search_File(const String & i_name) const
+{
+ return pChildren->aFiles.Search(i_name);
+}
+
+void
+Directory::do_Accept(csv::ProcessorIfc & io_processor) const
+{
+ csv::CheckedCall(io_processor,*this);
+}
+
+ClassId
+Directory::get_AryClass() const
+{
+ return class_id;
+}
+
+const String &
+Directory::inq_LocalName() const
+{
+ return sLocalName;
+}
+
+Le_id
+Directory::inq_ParentDirectory() const
+{
+ return nParentDirectory;
+}
+
+
+} // namespace loc
+} // namespace ary
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/loc_file.cxx b/autodoc/source/ary/loc/loc_file.cxx
new file mode 100644
index 000000000000..5de548219842
--- /dev/null
+++ b/autodoc/source/ary/loc/loc_file.cxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include <ary/loc/loc_file.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+
+
+
+namespace ary
+{
+namespace loc
+{
+
+File::File( const String & i_sLocalName,
+ Le_id i_nParentDirectory )
+ : FileBase(i_sLocalName, i_nParentDirectory)
+{
+}
+
+File::~File()
+{
+}
+
+void
+File::do_Accept(csv::ProcessorIfc & io_processor) const
+{
+ csv::CheckedCall(io_processor, *this);
+}
+
+ClassId
+File::get_AryClass() const
+{
+ return class_id;
+}
+
+
+
+} // namespace loc
+} // namespace ary
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/loc_filebase.cxx b/autodoc/source/ary/loc/loc_filebase.cxx
new file mode 100644
index 000000000000..f9297084c552
--- /dev/null
+++ b/autodoc/source/ary/loc/loc_filebase.cxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include <ary/loc/loc_filebase.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+
+
+
+namespace ary
+{
+namespace loc
+{
+
+FileBase::FileBase( const String & i_localName,
+ Le_id i_parentDirectory )
+ : sLocalName(i_localName),
+ nParentDirectory(i_parentDirectory)
+{
+}
+
+const String &
+FileBase::inq_LocalName() const
+{
+ return sLocalName;
+}
+
+Le_id
+FileBase::inq_ParentDirectory() const
+{
+ return nParentDirectory;
+}
+
+
+
+} // namespace loc
+} // namespace ary
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/loc_root.cxx b/autodoc/source/ary/loc/loc_root.cxx
new file mode 100644
index 000000000000..198b6ee7f784
--- /dev/null
+++ b/autodoc/source/ary/loc/loc_root.cxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include <ary/loc/loc_root.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+
+
+namespace ary
+{
+namespace loc
+{
+
+
+Root::Root(const csv::ploc::Path & i_path)
+ : aPath(i_path),
+ sPathAsString(),
+ aMyDirectory(0)
+{
+ StreamLock
+ path_string(700);
+ path_string() << i_path;
+ sPathAsString = path_string().c_str();
+}
+
+Root::~Root()
+{
+}
+
+void
+Root::do_Accept(csv::ProcessorIfc & io_processor) const
+{
+ csv::CheckedCall(io_processor,*this);
+}
+
+ClassId
+Root::get_AryClass() const
+{
+ return class_id;
+}
+
+const String &
+Root::inq_LocalName() const
+{
+ return sPathAsString;
+}
+
+Le_id
+Root::inq_ParentDirectory() const
+{
+ return Le_id::Null_();
+}
+
+
+
+} // namespace loc
+} // namespace ary
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/loc_traits.cxx b/autodoc/source/ary/loc/loc_traits.cxx
new file mode 100644
index 000000000000..8e010beef263
--- /dev/null
+++ b/autodoc/source/ary/loc/loc_traits.cxx
@@ -0,0 +1,94 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include <ary/loc/loc_traits.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+#include <ary/namesort.hxx>
+#include <ary/getncast.hxx>
+#include "locs_le.hxx"
+
+
+
+namespace ary
+{
+namespace loc
+{
+
+
+//******************** Le_Traits ************************//
+Le_Traits::entity_base_type &
+Le_Traits::EntityOf_(id_type i_id)
+{
+ csv_assert(i_id.IsValid());
+ return Le_Storage::Instance_()[i_id];
+}
+
+//******************** LeNode_Traits ************************//
+symtree::Node<LeNode_Traits> *
+LeNode_Traits::NodeOf_(entity_base_type & io_entity)
+{
+ if (is_type<Directory>(io_entity))
+ return & ary_cast<Directory>(io_entity).AsNode();
+ return 0;
+}
+
+Le_Traits::entity_base_type *
+LeNode_Traits::ParentOf_(const entity_base_type & i_entity)
+{
+ Le_Traits::id_type
+ ret = i_entity.ParentDirectory();
+ if (ret.IsValid())
+ return &EntityOf_(ret);
+ return 0;
+}
+
+//******************** Le_Compare ************************//
+const Le_Compare::key_type &
+Le_Compare::KeyOf_(const entity_base_type & i_entity)
+{
+ return i_entity.LocalName();
+}
+
+bool
+Le_Compare::Lesser_( const key_type & i_1,
+ const key_type & i_2 )
+{
+ static ::ary::LesserName less_;
+ return less_(i_1,i_2);
+}
+
+
+
+
+} // namespace loc
+} // namespace ary
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/loca_le.cxx b/autodoc/source/ary/loc/loca_le.cxx
new file mode 100644
index 000000000000..428ca5849ccb
--- /dev/null
+++ b/autodoc/source/ary/loc/loca_le.cxx
@@ -0,0 +1,184 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include "loca_le.hxx"
+
+
+// NOT FULLY DEFINED SERVICES
+#include <ary/loc/loc_dir.hxx>
+#include <ary/loc/loc_file.hxx>
+#include <ary/loc/loc_root.hxx>
+#include <loc_internalgate.hxx>
+#include "locs_le.hxx"
+
+
+
+
+namespace ary
+{
+namespace loc
+{
+
+DYN LocationPilot &
+InternalGate::Create_Locations_()
+{
+ return *new LocationAdmin;
+}
+
+
+
+
+inline Le_Storage &
+LocationAdmin::Storage() const
+{
+ csv_assert(pStorage);
+ return *pStorage.MutablePtr();
+}
+
+
+LocationAdmin::LocationAdmin()
+ : pStorage(new Le_Storage)
+{
+}
+
+LocationAdmin::~LocationAdmin()
+{
+}
+
+Root &
+LocationAdmin::CheckIn_Root(const csv::ploc::Path & i_path)
+{
+ Dyn<Root>
+ p_new( new Root(i_path) );
+
+ Le_id
+ id = Storage().RootIndex().Search(p_new->LocalName());
+ if ( id.IsValid() )
+ {
+ return ary_cast<Root>(Storage()[id]);
+ }
+
+ Root *
+ ret = p_new.Ptr();
+ Storage().Store_Entity(*p_new.Release());
+ Storage().RootIndex().Add(ret->LeId());
+
+ Directory *
+ p_rootdir = new Directory(ret->LeId());
+ Storage().Store_Entity(*p_rootdir);
+ ret->Assign_Directory(p_rootdir->LeId());
+
+ return *ret;
+}
+
+File &
+LocationAdmin::CheckIn_File( const String & i_name,
+ const csv::ploc::DirectoryChain & i_subPath,
+ Le_id i_root )
+{
+ Root &
+ root = Find_Root(i_root);
+ Directory &
+ parent_dir = CheckIn_Directories(
+ Find_Directory(root.MyDir()),
+ i_subPath.Begin(),
+ i_subPath.End() );
+ Le_id
+ fid = parent_dir.Search_File(i_name);
+ if (NOT fid.IsValid())
+ {
+ File *
+ ret = new File(i_name, parent_dir.LeId());
+ Storage().Store_Entity(*ret);
+ parent_dir.Add_File(*ret);
+ return *ret;
+ }
+ else
+ {
+ return Find_File(fid);
+ }
+}
+
+Root &
+LocationAdmin::Find_Root(Le_id i_id) const
+{
+ return ary_cast<Root>(Storage()[i_id]);
+}
+
+Directory &
+LocationAdmin::Find_Directory(Le_id i_id) const
+{
+ return ary_cast<Directory>(Storage()[i_id]);
+}
+
+File &
+LocationAdmin::Find_File(Le_id i_id) const
+{
+ return ary_cast<File>(Storage()[i_id]);
+}
+
+Directory &
+LocationAdmin::CheckIn_Directory( Directory & io_parent,
+ const String & i_name )
+{
+ Le_id
+ did = io_parent.Search_Dir(i_name);
+ if (NOT did.IsValid())
+ {
+ Directory *
+ ret = new Directory(i_name, io_parent.LeId());
+ Storage().Store_Entity(*ret);
+ io_parent.Add_Dir(*ret);
+ return *ret;
+ }
+ else
+ {
+ return Find_Directory(did);
+ }
+}
+
+Directory &
+LocationAdmin::CheckIn_Directories(
+ Directory & io_root,
+ StringVector::const_iterator i_beginSubPath,
+ StringVector::const_iterator i_endSubPath )
+{
+ if (i_beginSubPath == i_endSubPath)
+ return io_root;
+
+ Directory &
+ next = CheckIn_Directory(io_root, *i_beginSubPath);
+ return CheckIn_Directories(next, i_beginSubPath+1, i_endSubPath);
+}
+
+
+} // namespace loc
+} // namespace ary
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/loca_le.hxx b/autodoc/source/ary/loc/loca_le.hxx
new file mode 100644
index 000000000000..8f206f7c1c98
--- /dev/null
+++ b/autodoc/source/ary/loc/loca_le.hxx
@@ -0,0 +1,101 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef ARY_LOC_LOCA_LE_HXX
+#define ARY_LOC_LOCA_LE_HXX
+
+// BASE CLASSES
+#include <ary/loc/locp_le.hxx>
+
+namespace ary
+{
+namespace loc
+{
+ class Le_Storage;
+}
+}
+
+
+
+
+namespace ary
+{
+namespace loc
+{
+
+
+/** Provides access to files and directories stored in the
+ repository.
+*/
+class LocationAdmin : public LocationPilot
+{
+ public:
+ LocationAdmin();
+ virtual ~LocationAdmin();
+
+ // INHERITED
+ // Interface LocationPilot:
+ virtual Root & CheckIn_Root(
+ const csv::ploc::Path &
+ i_rPath );
+ virtual File & CheckIn_File(
+ const String & i_name,
+ const csv::ploc::DirectoryChain &
+ i_subPath,
+ Le_id i_root );
+
+ virtual Root & Find_Root(
+ Le_id i_id ) const;
+ virtual Directory & Find_Directory(
+ Le_id i_id ) const;
+ virtual File & Find_File(
+ Le_id i_id ) const;
+ private:
+ // Locals
+ Le_Storage & Storage() const;
+ Directory & CheckIn_Directory(
+ Directory & io_parent,
+ const String & i_name );
+ Directory & CheckIn_Directories(
+ Directory & io_root,
+ StringVector::const_iterator
+ i_beginSubPath,
+ StringVector::const_iterator
+ i_endSubPath );
+ // DATA
+ Dyn<Le_Storage> pStorage;
+};
+
+
+
+
+} // namespace loc
+} // namespace ary
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/locs_le.cxx b/autodoc/source/ary/loc/locs_le.cxx
new file mode 100644
index 000000000000..1f2df4430173
--- /dev/null
+++ b/autodoc/source/ary/loc/locs_le.cxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include "locs_le.hxx"
+
+// NOT FULLY DEFINED SERVICES
+
+
+namespace
+{
+ const uintt
+ C_nReservedElements = ary::loc::predefined::le_MAX; // Skipping "0"
+}
+
+
+
+namespace ary
+{
+namespace loc
+{
+
+Le_Storage * Le_Storage::pInstance_ = 0;
+
+
+
+
+Le_Storage::Le_Storage()
+ : stg::Storage<LocationEntity>(C_nReservedElements)
+{
+ csv_assert(pInstance_ == 0);
+ pInstance_ = this;
+}
+
+Le_Storage::~Le_Storage()
+{
+ csv_assert(pInstance_ != 0);
+ pInstance_ = 0;
+}
+
+
+} // namespace loc
+} // namespace ary
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/locs_le.hxx b/autodoc/source/ary/loc/locs_le.hxx
new file mode 100644
index 000000000000..1d1494ccbc5f
--- /dev/null
+++ b/autodoc/source/ary/loc/locs_le.hxx
@@ -0,0 +1,91 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef ARY_LOC_LOCS_LE_HXX
+#define ARY_LOC_LOCS_LE_HXX
+
+// BASE CLASSES
+#include <store/s_storage.hxx>
+// USED SERVICES
+#include <cosv/tpl/tpltools.hxx>
+#include <ary/loc/loc_le.hxx>
+#include <ary/loc/loc_root.hxx>
+#include <sortedids.hxx>
+
+
+
+
+namespace ary
+{
+namespace loc
+{
+
+
+/** The data base for all ->ary::cpp::CodeEntity objects.
+*/
+class Le_Storage : public ::ary::stg::Storage<LocationEntity>
+{
+ public:
+ typedef SortedIds<Le_Compare> Index;
+
+ Le_Storage();
+ virtual ~Le_Storage();
+
+ const Index & RootIndex() const { return aRoots; }
+ Index & RootIndex() { return aRoots; }
+
+ static Le_Storage & Instance_() { csv_assert(pInstance_ != 0);
+ return *pInstance_; }
+ private:
+ // DATA
+ Index aRoots;
+
+ static Le_Storage * pInstance_;
+};
+
+
+
+
+namespace predefined
+{
+
+enum E_LocationEntity
+{
+ le_MAX = 1
+};
+
+} // namespace predefined
+
+
+
+
+} // namespace cpp
+} // namespace ary
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/makefile.mk b/autodoc/source/ary/loc/makefile.mk
new file mode 100644
index 000000000000..e4aa0e9b43f5
--- /dev/null
+++ b/autodoc/source/ary/loc/makefile.mk
@@ -0,0 +1,61 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org 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 Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..$/..
+
+PRJNAME=autodoc
+TARGET=ary_loc
+
+
+
+# --- Settings -----------------------------------------------------
+
+ENABLE_EXCEPTIONS=true
+PRJINC=$(PRJ)$/source
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
+
+
+
+# --- Files --------------------------------------------------------
+
+
+OBJFILES= \
+ $(OBJ)$/loc_dir.obj \
+ $(OBJ)$/loc_file.obj \
+ $(OBJ)$/loc_filebase.obj \
+ $(OBJ)$/loc_root.obj \
+ $(OBJ)$/loc_traits.obj \
+ $(OBJ)$/loca_le.obj \
+ $(OBJ)$/locs_le.obj
+
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk