libHiRISE
|
00001 /* CCD_ID 00002 00003 PIRL CVS ID: CCD_ID.hh,v 2.4 2020/02/14 00:58:12 schaller Exp 00004 00005 Copyright (C) 2003-2020 Arizona Board of Regents on behalf of the Lunar and 00006 Planetary Laboratory at the University of Arizona. 00007 00008 Licensed under the Apache License, Version 2.0 (the "License"); you may not use 00009 this file except in compliance with the License. You may obtain a copy of the 00010 License at 00011 00012 http://www.apache.org/licenses/LICENSE-2.0 00013 00014 Unless required by applicable law or agreed to in writing, software distributed 00015 under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 00016 CONDITIONS OF ANY KIND, either express or implied. See the License for the 00017 specific language governing permissions and limitations under the License. 00018 00019 */ 00020 #ifndef _UA_HIRISE_CCD_ID_HEADER_ 00021 #define _UA_HIRISE_CCD_ID_HEADER_ 00022 00023 #include "Observation_ID.hh" 00024 00025 00026 namespace UA 00027 { 00028 namespace HiRISE 00029 { 00044 class CCD_ID 00045 : public Observation_ID 00046 { 00047 public: 00048 00049 /*============================================================================== 00050 Constants 00051 */ 00053 static const char* 00054 ID; 00055 00057 static const unsigned int 00058 DEFAULT_CPMM_NUMBER; 00059 00060 /*============================================================================== 00061 Constructors 00062 */ 00063 /*------------------------------------------------------------------------------ 00064 CCD_ID::CCD_ID (const u_int_32, const unsigned int) 00065 */ 00079 CCD_ID 00080 ( 00081 const u_int_32 observation_id_value = DEFAULT_OBSERVATION_ID, 00082 const unsigned int cpmm_value = DEFAULT_CPMM_NUMBER 00083 ); 00084 00085 /*------------------------------------------------------------------------------ 00086 CCD_ID::CCD_ID (const Mission_Phase, const int, const unsigned int) 00087 */ 00108 CCD_ID 00109 ( 00110 const Mission_Phase mission_phase_value, 00111 const int time_value = -1, 00112 const unsigned int cpmm_value = DEFAULT_CPMM_NUMBER 00113 ); 00114 00115 /*------------------------------------------------------------------------------ 00116 CCD_ID::CCD_ID (const Mission_Phase, const unsigned int, ...) 00117 */ 00137 CCD_ID 00138 ( 00139 const Mission_Phase mission_phase_value, 00140 const unsigned int orbit_number_value, 00141 const unsigned int target_value, 00142 const unsigned int cpmm_value = DEFAULT_CPMM_NUMBER 00143 ); 00144 00145 /*------------------------------------------------------------------------------ 00146 CCD_ID::CCD_ID (const std::string&) 00147 */ 00159 explicit 00160 CCD_ID 00161 ( 00162 const std::string& id_text 00163 ); 00164 00165 /*============================================================================== 00166 Accessors 00167 */ 00168 /*------------------------------------------------------------------------------ 00169 CCD_ID::cpmm_number () 00170 */ 00183 unsigned int 00184 cpmm_number () const { return CPMM_Number; } 00185 00186 /*------------------------------------------------------------------------------ 00187 CCD_ID::cpmm_number (const unsigned int) 00188 */ 00201 CCD_ID& 00202 cpmm_number 00203 ( 00204 const unsigned int cpmm_value 00205 ) 00206 throw (Out_of_Range); 00207 00208 /*------------------------------------------------------------------------------ 00209 CCD_ID::cpmm_number (const std::string&) 00210 */ 00230 CCD_ID& 00231 cpmm_number 00232 ( 00233 const std::string& cpmm_text 00234 ) 00235 throw (Invalid_Argument, Out_of_Range); 00236 00237 /*------------------------------------------------------------------------------ 00238 CCD_ID::ccd_name () 00239 */ 00246 std::string 00247 ccd_name () const; 00248 00249 /*------------------------------------------------------------------------------ 00250 CCD_ID::ccd_name (const std::string&) 00251 */ 00266 CCD_ID& 00267 ccd_name 00268 ( 00269 const std::string& ccd_text 00270 ) 00271 throw (Invalid_Argument, Out_of_Range); 00272 00273 /*============================================================================== 00274 Text representation 00275 */ 00276 /*------------------------------------------------------------------------------ 00277 CCD_ID::text () 00278 */ 00289 std::string 00290 text () const; 00291 00292 /*------------------------------------------------------------------------------ 00293 CCD_ID::text (const std::string&) 00294 */ 00301 CCD_ID& 00302 text 00303 ( 00304 const std::string& id_text 00305 ); 00306 00307 /*------------------------------------------------------------------------------ 00308 CCD_ID::parse (const std::string&) 00309 */ 00317 std::string 00318 parse 00319 ( 00320 const std::string& id_text 00321 ); 00322 00323 /*============================================================================== 00324 Utility Methods 00325 */ 00326 00327 /*------------------------------------------------------------------------------ 00328 CCD_ID::print (std::ostream&) 00329 */ 00335 std::ostream& print 00336 ( 00337 std::ostream& stream = std::cout 00338 ) const; 00339 00340 /*============================================================================== 00341 Private Members 00342 */ 00343 private: 00344 00346 unsigned int 00347 CPMM_Number; 00348 00349 }; // CCD_ID class 00350 00351 /*============================================================================== 00352 Utility Functions 00353 */ 00354 /*------------------------------------------------------------------------------ 00355 UA::HiRISE::operator<< (std::ostream&, const CCD_ID&) 00356 */ 00363 std::ostream& operator<< 00364 ( 00365 std::ostream& stream, 00366 const CCD_ID& ccd_id 00367 ); 00368 00369 } // HiRISE namespace 00370 00371 } // UA namespace 00372 00373 #endif