RMF
names.h
Go to the documentation of this file.
1 /**
2  * \file RMF/names.h
3  * \brief Functions to check if names are valid.
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef RMF_NAMES_H
10 #define RMF_NAMES_H
11 
12 #include <sstream>
13 #include <string>
14 
15 #include "RMF/config.h"
16 #include "types.h"
17 
18 RMF_ENABLE_WARNINGS
19 namespace RMF {
20 
21 /** \name Names
22  @{ */
23 /** Node and key names have to obey certain rules, such as no quotes
24  in the name. */
25 
26 //! Return a node name string that has been modified to obey the rules.
27 RMFEXPORT std::string get_as_node_name(std::string input);
28 
29 //! Return true iff the string is a valid key name.
30 RMFEXPORT bool get_is_valid_key_name(std::string name);
31 
32 //! Return true iff the string is a valid node name.
33 RMFEXPORT bool get_is_valid_node_name(std::string name);
34 
35 /** @} */
36 } /* namespace RMF */
37 
38 RMF_DISABLE_WARNINGS
39 
40 #endif /* RMF_NAMES_H */
Default implementation for types.h.
bool get_is_valid_node_name(std::string name)
Return true iff the string is a valid node name.
std::string get_as_node_name(std::string input)
Return a node name string that has been modified to obey the rules.
bool get_is_valid_key_name(std::string name)
Return true iff the string is a valid key name.