1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: loc_dir.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ARY_LOC_DIR_HXX
32 #define ARY_LOC_DIR_HXX
35 #include <ary/loc/loc_le.hxx>
38 #include <ary/loc/loc_traits.hxx>
39 #include <ary/symtreenode.hxx>
58 /** Represents a directory for source code files.
60 class Directory
: public LocationEntity
63 enum E_ClassId
{ class_id
= 7030 };
65 typedef ::ary::symtree::Node
<LeNode_Traits
> node_t
;
67 /// Used for root directories.
69 Le_id i_assignedRoot
);
71 /// Used for subdirectories which have a parent directory.
73 const String
& i_localName
,
74 Le_id i_parentDirectory
);
78 const Directory
& i_dir
);
80 const File
& i_file
);
83 Le_id
AssignedRoot() const;
86 const String
& i_name
) const;
88 const String
& i_name
) const;
90 const node_t
& AsNode() const;
96 // Interface csv::ConstProcessorClient:
97 virtual void do_Accept(
98 csv::ProcessorIfc
& io_processor
) const;
99 // Interface ary::Object:
100 virtual ClassId
get_AryClass() const;
102 // Interface LocationEntity:
103 virtual const String
&
104 inq_LocalName() const;
105 virtual Le_id
inq_ParentDirectory() const;
109 Le_id nParentDirectory
;
111 node_t aAssignedNode
;
112 Dyn
<Container
> pChildren
;
120 Directory::Parent() const
122 return nParentDirectory
;
126 Directory::AssignedRoot() const
128 return nAssignedRoot
;
131 inline const Directory::node_t
&
132 Directory::AsNode() const
134 return aAssignedNode
;
137 inline Directory::node_t
&
140 return aAssignedNode
;