Commits
Ville Suoranta authored 41fbe828553 Merge
71 71 | // * should contain viewer colormap tables |
72 72 | // * should contain IERS tables |
73 73 | virtual std::string distroDataPath( ) const { |
74 74 | return distro_data_path; |
75 75 | } |
76 76 | |
77 77 | virtual std::string logPath( ) const { |
78 78 | return log_path; |
79 79 | } |
80 80 | |
81 + | virtual bool noGui( ) const { |
82 + | return no_gui; |
83 + | } |
84 + | |
85 + | virtual bool agg( ) const { |
86 + | return do_agg; |
87 + | } |
88 + | |
89 + | virtual bool pipeline( ) const { |
90 + | return do_pipeline; |
91 + | } |
92 + | |
81 93 | void clearDataPath( ) { |
82 94 | // protect critical section... |
83 95 | std::lock_guard<std::mutex> guard(data_path_mutex); |
84 96 | data_path.clear( ); |
85 97 | } |
86 98 | |
87 99 | void setDataPath(const std::vector<std::string> &new_list) { |
88 100 | std::list<std::string> existing_paths; |
89 101 | struct stat s; |
90 102 | |
122 134 | std::lock_guard<std::mutex> guard(data_path_mutex); |
123 135 | distro_data_path = path; |
124 136 | } |
125 137 | |
126 138 | void setLogPath(const std::string &logpath) { |
127 139 | // protect critical section... |
128 140 | std::lock_guard<std::mutex> guard(data_path_mutex); |
129 141 | log_path = logpath; |
130 142 | } |
131 143 | |
144 + | void setNoGui(bool nogui) { |
145 + | // protect critical section... |
146 + | std::lock_guard<std::mutex> guard(data_path_mutex); |
147 + | no_gui = nogui; |
148 + | } |
149 + | |
150 + | void setAgg(bool agg) { |
151 + | // protect critical section... |
152 + | std::lock_guard<std::mutex> guard(data_path_mutex); |
153 + | do_agg = agg; |
154 + | } |
155 + | |
156 + | void setPipeline(bool pipeline) { |
157 + | // protect critical section... |
158 + | std::lock_guard<std::mutex> guard(data_path_mutex); |
159 + | do_pipeline = pipeline; |
160 + | } |
161 + | |
132 162 | // get map of registrations |
133 163 | std::list<ServiceId> services( ) { return registrar.services( ); } |
134 164 | // returns true if a registration for 'id' was found |
135 165 | bool removeService( std::string id ) { return registrar.remove(id); } |
136 166 | // returns assigned identifier (likely based upon the proposed_id) |
137 167 | ServiceId addService( std::string proposed_id, std::string uri, const std::list<std::string> &types ) { |
138 168 | return registrar.add(ServiceId(proposed_id, uri, types)); |
139 169 | } |
140 170 | ServiceId addService( const ServiceId &new_service ) { |
141 171 | return registrar.add(new_service); |
149 179 | // do any necessary shutdown functions, |
150 180 | void shutdown( ); |
151 181 | |
152 182 | private: |
153 183 | std::mutex data_path_mutex; |
154 184 | std::list<std::string> data_path; |
155 185 | std::string python_path; |
156 186 | std::string log_path; |
157 187 | std::string distro_data_path; // path to data as provide by casadata pkg |
158 188 | std::string measures_dir; |
189 + | bool no_gui, do_agg, do_pipeline; |
159 190 | Registrar registrar; |
160 191 | }; |
161 192 | |
162 193 | extern State &get_state( ); |
163 194 | |
164 195 | } |
165 196 | |
166 197 | |
167 198 |