Parses an stores function metadata.
More...
#include <FieldCodeGenerator.h>
|
void | Parse (std::string meta_data) |
| Parses metadata. More...
|
|
void | ParseStart (const std::string &item, std::deque< std::string > &strs) |
| Parses a metadata item, looking for a start mark. More...
|
|
void | ParseEnd (const std::string &item, std::deque< std::string > &strs) |
| Parses a metadata item, looking for an end mark. More...
|
|
void | ParseCharId (const std::string &item, std::deque< std::string > &strs) |
| Parses a metadata item, looking for a character ID. More...
|
|
void | ParseEntity (const std::string &item, std::deque< std::string > &strs) |
| Parses a metadata item, looking for an entity name. More...
|
|
|
static const std::string | DELIMITER |
| Delimiter for metadata tokens. More...
|
|
static const std::string | START |
| Start tag for metadata. More...
|
|
static const std::string | END |
| End tag for metadata. More...
|
|
Parses an stores function metadata.
Function metadata can indicate the entity and character of a function, and if the function is the first or last in a class.
◆ FunctionMetaData()
FunctionMetaData::FunctionMetaData |
( |
std::string |
meta_data | ) |
|
Constructor.
Parses function metadata.
Meta data format can be:
- start_end_entityname
- start_entityname
- end_entity_name
- Parameters
-
[in] | meta_data | Metadata to parse. |
◆ GetCharacterId()
int FunctionMetaData::GetCharacterId |
( |
| ) |
|
Retrieves the character ID.
- Returns
- The character ID.
◆ GetEntityName()
std::string FunctionMetaData::GetEntityName |
( |
| ) |
|
Retrieves the entity name.
- Returns
- The entity name.
◆ IsEnd()
bool FunctionMetaData::IsEnd |
( |
| ) |
const |
Checks if the function is the last of a class.
- Returns
- True if the metadata is the last of a class, false otherwise.
◆ IsStart()
bool FunctionMetaData::IsStart |
( |
| ) |
const |
Checks if the function is the first of a class.
- Returns
- True if the metadata is the first of a class, false otherwise.
◆ Parse()
void FunctionMetaData::Parse |
( |
std::string |
meta_data | ) |
|
|
private |
Parses metadata.
- Parameters
-
[in] | meta_data | Metadata to parse. |
◆ ParseCharId()
void FunctionMetaData::ParseCharId |
( |
const std::string & |
item, |
|
|
std::deque< std::string > & |
strs |
|
) |
| |
|
private |
Parses a metadata item, looking for a character ID.
If it finds it, sets the character ID. It also calls {
- See also
- ParseEntity}.
- Parameters
-
[in] | item | The item to check for a start mark. |
[in] | strs | Metadata tokens, first two removed. |
◆ ParseEnd()
void FunctionMetaData::ParseEnd |
( |
const std::string & |
item, |
|
|
std::deque< std::string > & |
strs |
|
) |
| |
|
private |
Parses a metadata item, looking for an end mark.
If it finds it, marks the metadata as the last function of a class. It also calls {
- See also
- ParseCharId}.
- Parameters
-
[in] | item | The item to check for a start mark. |
[in] | strs | Metadata tokens, first removed. |
◆ ParseEntity()
void FunctionMetaData::ParseEntity |
( |
const std::string & |
item, |
|
|
std::deque< std::string > & |
strs |
|
) |
| |
|
private |
Parses a metadata item, looking for an entity name.
It sets the entity name.
- Parameters
-
[in] | item | The item to check for a start mark. |
[in] | strs | Metadata tokens, first three removed. |
◆ ParseStart()
void FunctionMetaData::ParseStart |
( |
const std::string & |
item, |
|
|
std::deque< std::string > & |
strs |
|
) |
| |
|
private |
Parses a metadata item, looking for a start mark.
If it finds it, marks the metadata as the first function of a class. It also * calls {
- See also
- ParseEnd} with the next token.
- Parameters
-
[in] | item | The item to check for a start mark. |
[in] | strs | All the metadata tokens. |
◆ character_id_
int FunctionMetaData::character_id_ = -1 |
|
private |
◆ DELIMITER
const std::string FunctionMetaData::DELIMITER |
|
staticprivate |
Delimiter for metadata tokens.
◆ END
const std::string FunctionMetaData::END |
|
staticprivate |
◆ end_
bool FunctionMetaData::end_ = false |
|
private |
Indicates if the function is the last of a class.
◆ entity_name_
std::string FunctionMetaData::entity_name_ |
|
private |
◆ START
const std::string FunctionMetaData::START |
|
staticprivate |
◆ start_
bool FunctionMetaData::start_ = false |
|
private |
Indicates if the function is the first of a class.
The documentation for this class was generated from the following files: