comparison libinterp/corefcn/load-path.h @ 30151:1955fc6e2128

maint: use "m_" prefix for member variables in class load_path. * load-path.cc, load-path.h: Use "m_" prefix for member variables in class load_path.
author Rik <rik@octave.org>
date Thu, 09 Sep 2021 13:04:56 -0700
parents 45c45295a84a
children 4f039927308b
comparison
equal deleted inserted replaced
30150:cd6f7957c889 30151:1955fc6e2128
100 100
101 std::list<std::string> overloads (const std::string& meth) const; 101 std::list<std::string> overloads (const std::string& meth) const;
102 102
103 bool find_package (const std::string& package_name) const 103 bool find_package (const std::string& package_name) const
104 { 104 {
105 return (package_map.find (package_name) != package_map.end ()); 105 return (m_package_map.find (package_name) != m_package_map.end ());
106 } 106 }
107 107
108 std::list<std::string> 108 std::list<std::string>
109 get_all_package_names (bool only_top_level = true) const; 109 get_all_package_names (bool only_top_level = true) const;
110 110
512 typedef std::map<std::string, package_info> package_map_type; 512 typedef std::map<std::string, package_info> package_map_type;
513 513
514 typedef package_map_type::const_iterator const_package_map_iterator; 514 typedef package_map_type::const_iterator const_package_map_iterator;
515 typedef package_map_type::iterator package_map_iterator; 515 typedef package_map_type::iterator package_map_iterator;
516 516
517 interpreter& m_interpreter;
518
519 mutable package_map_type package_map;
520
521 mutable package_info top_level_package;
522
523 mutable dir_info_list_type dir_info_list;
524
525 mutable std::set<std::string> init_dirs;
526
527 std::string m_command_line_path;
528
529 static std::string sys_path;
530
531 static abs_dir_cache_type abs_dir_cache;
532
533 std::function<void (const std::string&)> add_hook; 517 std::function<void (const std::string&)> add_hook;
534 518
535 std::function<void (const std::string&)> remove_hook; 519 std::function<void (const std::string&)> remove_hook;
536 520
537 void execute_pkg_add_or_del (const std::string& dir, 521 void execute_pkg_add_or_del (const std::string& dir,
557 541
558 package_info& get_package (const std::string& name) const 542 package_info& get_package (const std::string& name) const
559 { 543 {
560 if (! name.empty () && is_package (name)) 544 if (! name.empty () && is_package (name))
561 { 545 {
562 package_map_iterator l = package_map.find (name); 546 package_map_iterator l = m_package_map.find (name);
563 547
564 if (l == package_map.end ()) 548 if (l == m_package_map.end ())
565 l = package_map.insert (package_map.end (), 549 l = m_package_map.insert (m_package_map.end (),
566 package_map_type::value_type (name, package_info (name))); 550 package_map_type::value_type (name, package_info (name)));
567 551
568 return l->second; 552 return l->second;
569 } 553 }
570 554
571 return top_level_package; 555 return m_top_level_package;
572 } 556 }
573 557
574 string_vector get_file_list (const dir_info::fcn_file_map_type& lst) const; 558 string_vector get_file_list (const dir_info::fcn_file_map_type& lst) const;
575 559
576 friend dir_info::fcn_file_map_type get_fcn_files (const std::string& d); 560 friend dir_info::fcn_file_map_type get_fcn_files (const std::string& d);
561
562 //--------
563
564 static std::string sys_path;
565
566 static abs_dir_cache_type abs_dir_cache;
567
568 interpreter& m_interpreter;
569
570 mutable package_map_type m_package_map;
571
572 mutable package_info m_top_level_package;
573
574 mutable dir_info_list_type m_dir_info_list;
575
576 mutable std::set<std::string> m_init_dirs;
577
578 std::string m_command_line_path;
579
577 }; 580 };
578 581
579 extern std::string 582 extern std::string
580 genpath (const std::string& dir, const string_vector& skip = "private"); 583 genpath (const std::string& dir, const string_vector& skip = "private");
581 584