Mercurial > octave
diff libinterp/octave-value/cdef-class.h @ 30259:03ff3f1020cf
store file name in classdef class object
* ov-classdef.h, ov-classdef.cc (octave_classdef_meta::file_name):
New function.
* pt-classdef.h, pt-classdef.cc (tree_classdef::m_file_name):
New data member.
(tree_classdef::tree_classdef): Also accept file name in constructor
argument list.
(tree_classdef::file_name): New function.
* oct-parse.yy (base_parser::make_classdef): Store full file name in
created tree_classdef object.
* cdef-class.h, cdef-class.cc (cdef_class_rep::file_name,
cdef_class::file_name): New functions.
(cdef_class:make_meta_class): Store file name in returned class object.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 30 Oct 2021 09:45:23 -0400 |
parents | 0e0cc2760540 |
children | 91c6288781ba a61e1a0f6024 |
line wrap: on
line diff
--- a/libinterp/octave-value/cdef-class.h Sat Oct 30 13:03:02 2021 +0200 +++ b/libinterp/octave-value/cdef-class.h Sat Oct 30 09:45:23 2021 -0400 @@ -161,6 +161,10 @@ std::string doc_string (void) const { return m_doc_string; } + void file_name (const std::string& nm) { m_file_name = nm; } + + std::string file_name (void) const { return m_file_name; } + private: OCTINTERP_API void load_all_methods (void); @@ -188,6 +192,8 @@ std::string m_doc_string; + std::string m_file_name; + // The methods defined by this class. std::map<std::string,cdef_method> m_method_map; @@ -393,6 +399,10 @@ std::string doc_string (void) const { return get_rep ()->doc_string (); } + void file_name (const std::string& nm) { get_rep ()->file_name (nm); } + + std::string file_name (void) const { return get_rep ()->file_name (); } + public: enum