|
C12Adapter Opensource C++ Interface
|
Memory saving fast copied storage for file name and file line. More...
Public Types | |
| typedef std::vector< MFileNameAndLineNumber > | VectorType |
| Type that represents an array of files and lines, or a stack. | |
Public Member Functions | |
| MFileNameAndLineNumber () | |
| Class constructor that initializes the object with zero file name and line number. | |
| MFileNameAndLineNumber (const MFileNameAndLineNumber &other) | |
| Class constructor that initializes the object from a copy object. | |
| MFileNameAndLineNumber (Muint32 data) | |
| Class constructor that initializes the object from the internal data, as returned by GetData. | |
| MFileNameAndLineNumber (const MStdString &fileName, unsigned lineNumber) | |
| Most useful constructor that creates file name and line number information. | |
| MFileNameAndLineNumber & | operator= (const MFileNameAndLineNumber &other) |
| Assignment operator that makes this file and line as of the given argument. | |
| bool | operator== (const MFileNameAndLineNumber &other) const |
| Equality operator that tests whether the two files and line data are the same. | |
| bool | operator!= (const MFileNameAndLineNumber &other) const |
| Inequality operator that tests whether the two files and line data are the same. | |
| void | Set (const MStdString &fileName, unsigned lineNumber) |
| Setter, that initializes data for the whole class. More... | |
| bool | IsEmpty () const |
| Checks whether there is no file and line information in an object. | |
| void | Clear () |
| Clear file name and line number information. | |
| MStdString | GetFileName () const |
| Get file name associated with the object. | |
| unsigned | GetFileNameIndex () const |
| Internal service that returns file name index in the internal array. More... | |
| Muint32 | GetData () const |
| Return the internal representaion of a class. | |
| unsigned | GetFileLineNumber () const |
| Get file line, or zero if there is no information. | |
| void | operator++ () |
| Increment line information by one line. | |
| void | operator+= (unsigned i) |
| Increase line number by a given count. More... | |
| bool | IsSameFileDifferentLine (const MFileNameAndLineNumber &other) const |
| True if the given file and line information refers to a different line within the same file. More... | |
Static Public Member Functions | |
| static void | Uninitialize () |
| Clear all file and line information within a class. More... | |
Memory saving fast copied storage for file name and file line.
Since the number of file names with which the program works is limited, Internally, a table is used to store them in one place.
|
inline |
Internal service that returns file name index in the internal array.
This can be convenient for comparison of files for equality.
| bool MFileNameAndLineNumber::IsSameFileDifferentLine | ( | const MFileNameAndLineNumber & | other | ) | const |
True if the given file and line information refers to a different line within the same file.
This is a handy way of detecting if there is a duplicate definition of the same entry. Notice if the entity is defined in the same line this check will be a false positive.
| other | Another file and name information to check. |
|
inline |
Increase line number by a given count.
| i | increase |
| void MFileNameAndLineNumber::Set | ( | const MStdString & | fileName, |
| unsigned | lineNumber | ||
| ) |
Setter, that initializes data for the whole class.
|
static |
Clear all file and line information within a class.
All memory is freed, No file and line information will be available after