1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef ARY_LOC_LOCA_LE_HXX 25 #define ARY_LOC_LOCA_LE_HXX 26 27 // BASE CLASSES 28 #include <ary/loc/locp_le.hxx> 29 30 namespace ary 31 { 32 namespace loc 33 { 34 class Le_Storage; 35 } 36 } 37 38 39 40 41 namespace ary 42 { 43 namespace loc 44 { 45 46 47 /** Provides access to files and directories stored in the 48 repository. 49 */ 50 class LocationAdmin : public LocationPilot 51 { 52 public: 53 LocationAdmin(); 54 virtual ~LocationAdmin(); 55 56 // INHERITED 57 // Interface LocationPilot: 58 virtual Root & CheckIn_Root( 59 const csv::ploc::Path & 60 i_rPath ); 61 virtual File & CheckIn_File( 62 const String & i_name, 63 const csv::ploc::DirectoryChain & 64 i_subPath, 65 Le_id i_root ); 66 67 virtual Root & Find_Root( 68 Le_id i_id ) const; 69 virtual Directory & Find_Directory( 70 Le_id i_id ) const; 71 virtual File & Find_File( 72 Le_id i_id ) const; 73 private: 74 // Locals 75 Le_Storage & Storage() const; 76 Directory & CheckIn_Directory( 77 Directory & io_parent, 78 const String & i_name ); 79 Directory & CheckIn_Directories( 80 Directory & io_root, 81 StringVector::const_iterator 82 i_beginSubPath, 83 StringVector::const_iterator 84 i_endSubPath ); 85 // DATA 86 Dyn<Le_Storage> pStorage; 87 }; 88 89 90 91 92 } // namespace loc 93 } // namespace ary 94 #endif 95