CodeSonar C++ API
[For improved navigation, enable JavaScript.]
cs_directory.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023, an unpublished work by CodeSecure, Inc.
3  * ALL RIGHTS RESERVED
4  *
5  * Copyright (c) 2013-2023, an unpublished work by GrammaTech, Inc.
6  * ALL RIGHTS RESERVED
7  *
8  * This software is furnished under a license and may be used and
9  * copied only in accordance with the terms of such license and the
10  * inclusion of the above copyright notice. This software or any
11  * other copies thereof may not be provided or otherwise made
12  * available to any other person. Title to and ownership of the
13  * software is retained by CodeSecure, Inc.
14  */
15 
16 #ifndef CS_DIRECTORY_HPP
17 #define CS_DIRECTORY_HPP
18 
19 #include "cs_directory_decl.hpp"
20 
23 namespace cs{
24 
26  {
27  cs_directory rv;
28  check(cs_directory_parent(inner, &rv));
29  return directory::;
30  }
31 
32  inline csuint32 directory::depth() const
33  {
34  csuint32 rv;
35  check(cs_directory_depth(inner, &rv));
36  return rv;
37  }
38 
39  inline directory cglue<directory>::wrap(const cs_directory &c)
40  { return directory(c); }
41 
42  inline cs_directory cglue<directory>::unwrap(const directory &c)
43  { return c.unwrap(); }
44 
45 }
46 
47 #endif /* CS_DIRECTORY_HPP */
Namespace for CodeSonar/CodeSurfer API.
Definition: cs_ast.hpp:33
A directory.
Definition: cs_directory_decl.hpp:91
csuint32 depth() const
Get the depth or distance from root of a directory.
Definition: cs_directory.hpp:32
directory parent() const
Get the parent directory of a directory.
Definition: cs_directory.hpp:25