xref: /aoo4110/main/autodoc/inc/ary/loc/loc_root.hxx (revision b1cdbd2c)
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_PROJECT_HXX
25 #define ARY_LOC_PROJECT_HXX
26 
27 // BASE CLASSES
28 #include <ary/loc/loc_le.hxx>
29 // USED SERVICES
30 #include <cosv/ploc.hxx>
31 #include <ary/loc/loc_dir.hxx>
32 
33 
34 
35 
36 namespace ary
37 {
38 namespace loc
39 {
40 
41 
42 /** Represents a root directory for source files.
43 */
44 class Root : public LocationEntity
45 {
46   public:
47     enum E_ClassId { class_id = 7000 };
48 
49     explicit            Root(
50                             const csv::ploc::Path &
51                                                 i_rRootDirectoryPath );
52     void                Assign_Directory(
53                             Le_id               i_assignedDirectory );
54     virtual             ~Root();
55 
56     // INQUIRY
57     const csv::ploc::Path &
58                         Path() const;
59     Le_id               MyDir() const;
60 
61   private:
62     // Interface csv::ConstProcessorClient:
63     virtual void        do_Accept(
64                             csv::ProcessorIfc & io_processor ) const;
65     // Interface ary::Object:
66     virtual ClassId     get_AryClass() const;
67 
68     // Interface LocationEntity:
69     virtual const String &
70                         inq_LocalName() const;
71     virtual Le_id       inq_ParentDirectory() const;
72 
73 	// DATA
74     csv::ploc::Path     aPath;
75     String              sPathAsString;
76     Le_id               aMyDirectory;
77 };
78 
79 
80 
81 
82 // IMPLEMENTATION
83 inline void
Assign_Directory(Le_id i_assignedDirectory)84 Root::Assign_Directory(Le_id i_assignedDirectory)
85 {
86     aMyDirectory = i_assignedDirectory;
87 }
88 
89 inline const csv::ploc::Path &
Path() const90 Root::Path() const
91 {
92     return aPath;
93 }
94 
95 inline Le_id
MyDir() const96 Root::MyDir() const
97 {
98     return aMyDirectory;
99 }
100 
101 
102 
103 
104 } // namespace loc
105 } // namespace ary
106 #endif
107