2#ifndef STORMM_SEARCH_DOX_H
3#define STORMM_SEARCH_DOX_H
12using parse::TextFileReader;
49 const std::string file_name;
51 std::vector<std::string> return_types;
59enum class ObjectReportType {
66enum class PreProcessorScopeModifier {
90 CppScope(
const std::string &filename_in);
102bool lineIsPreProcessor(
const char* line,
int nchar);
109PreProcessorScopeModifier testScopeModifier(
const char* line,
int nchar);
114std::vector<int3> findPreProcessorScopes(
const TextFileReader &tfr);
125ObjectIdentifier searchFileForObject(
const std::string &object_name,
const std::string &filename);
132void searchObject(
const std::string &object_name,
const std::string &member_name = std::string(),
133 ObjectReportType report_format = ObjectReportType::FULL);
Stores data on instances of an object (i.e. a function or struct found in a given file.
Definition code_dox.h:15
const std::string getReturnType(const int nt=0) const
Report the return type found for an object, as recorded in some ObjectIdentifier.
Definition code_dox.cpp:44
void addInstance(const int n_add=1)
Tally one more instance of an object in an ObjectIdentifier.
Definition code_dox.cpp:49
const std::string getFileName() const
Return the name of the file searched to produce an ObjectIdentifier.
Definition code_dox.cpp:34
void addReturnType(const std::string rtype)
Set the return type of an object in an ObjectIdentifier.
Definition code_dox.cpp:54
~ObjectIdentifier()=default
Default destructor.
ObjectIdentifier(const std::string &filename_in)
Constructor for the ObjectIdentifier struct.
Definition code_dox.cpp:22
int getReturnTypeCount() const
Report the number of return types for an object from some ObjectIdentifier.
Definition code_dox.cpp:39
int getInstanceCount() const
Return the number of instances for an object, as recorded in some ObjectIdentifier.
Definition code_dox.cpp:29
std::vector< std::string > namespaces
Definition code_dox.h:84
int start_pos
Position on the line at which this scope starts.
Definition code_dox.h:78
CppScope(const std::string &filename_in)
Constructor for a C++ scope struct.
Definition code_dox.cpp:59
std::string file_name
File name in which this scope is found.
Definition code_dox.h:83
int start_line
Line at which this scope starts.
Definition code_dox.h:77
~CppScope()=default
Default destructor.
int end_pos
Position on the line at which this scope ends.
Definition code_dox.h:80
std::string scope_name
Definition code_dox.h:81
int end_line
Line at which this scope ends.
Definition code_dox.h:79
Abstract for the TextFile object, providing read-only access.
Definition textfile.h:20