PCL
MetaFileFormat.h
Go to the documentation of this file.
1 // ____ ______ __
2 // / __ \ / ____// /
3 // / /_/ // / / /
4 // / ____// /___ / /___ PixInsight Class Library
5 // /_/ \____//_____/ PCL 2.6.11
6 // ----------------------------------------------------------------------------
7 // pcl/MetaFileFormat.h - Released 2024-05-07T15:27:32Z
8 // ----------------------------------------------------------------------------
9 // This file is part of the PixInsight Class Library (PCL).
10 // PCL is a multiplatform C++ framework for development of PixInsight modules.
11 //
12 // Copyright (c) 2003-2024 Pleiades Astrophoto S.L. All Rights Reserved.
13 //
14 // Redistribution and use in both source and binary forms, with or without
15 // modification, is permitted provided that the following conditions are met:
16 //
17 // 1. All redistributions of source code must retain the above copyright
18 // notice, this list of conditions and the following disclaimer.
19 //
20 // 2. All redistributions in binary form must reproduce the above copyright
21 // notice, this list of conditions and the following disclaimer in the
22 // documentation and/or other materials provided with the distribution.
23 //
24 // 3. Neither the names "PixInsight" and "Pleiades Astrophoto", nor the names
25 // of their contributors, may be used to endorse or promote products derived
26 // from this software without specific prior written permission. For written
27 // permission, please contact info@pixinsight.com.
28 //
29 // 4. All products derived from this software, in any form whatsoever, must
30 // reproduce the following acknowledgment in the end-user documentation
31 // and/or other materials provided with the product:
32 //
33 // "This product is based on software from the PixInsight project, developed
34 // by Pleiades Astrophoto and its contributors (https://pixinsight.com/)."
35 //
36 // Alternatively, if that is where third-party acknowledgments normally
37 // appear, this acknowledgment must be reproduced in the product itself.
38 //
39 // THIS SOFTWARE IS PROVIDED BY PLEIADES ASTROPHOTO AND ITS CONTRIBUTORS
40 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
41 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
42 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PLEIADES ASTROPHOTO OR ITS
43 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
44 // EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, BUSINESS
45 // INTERRUPTION; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; AND LOSS OF USE,
46 // DATA OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
49 // POSSIBILITY OF SUCH DAMAGE.
50 // ----------------------------------------------------------------------------
51 
52 #ifndef __PCL_MetaFileFormat_h
53 #define __PCL_MetaFileFormat_h
54 
56 
57 #ifndef __PCL_BUILDING_PIXINSIGHT_APPLICATION
58 
59 #include <pcl/Defs.h>
60 #include <pcl/Diagnostics.h>
61 
62 #include <pcl/FileFormatBase.h>
63 #include <pcl/MetaObject.h>
64 
65 namespace pcl
66 {
67 
68 // ----------------------------------------------------------------------------
69 
70 class PCL_CLASS FileFormatImplementation;
71 
72 // ----------------------------------------------------------------------------
73 
109 class PCL_CLASS MetaFileFormat : public MetaObject, public FileFormatBase
110 {
111 public:
112 
117 
121  ~MetaFileFormat() noexcept( false ) override
122  {
123  }
124 
129  MetaFileFormat( const MetaFileFormat& ) = delete;
130 
135  MetaFileFormat& operator =( const MetaFileFormat& ) = delete;
136 
139  virtual IsoString Name() const override = 0;
140 
143  virtual StringList FileExtensions() const override = 0;
144 
162  IsoStringList MimeTypes() const override
163  {
164  return IsoStringList();
165  }
166 
169  uint32 Version() const override;
170 
185  String Description() const override
186  {
187  return String();
188  }
189 
212  String Implementation() const override
213  {
214  return String();
215  }
216 
233  String Status() const override
234  {
235  return String();
236  }
237 
263  virtual IsoString IconImageSVG() const
264  {
265  return IsoString();
266  }
267 
330  virtual String IconImageSVGFile() const
331  {
332  return String();
333  }
334 
361  virtual const char** IconImageXPM() const
362  {
363  return nullptr;
364  }
365 
387  virtual String IconImageFile() const
388  {
389  return String();
390  }
391 
420  virtual const char** SmallIconImageXPM() const
421  {
422  return 0;
423  }
424 
443  virtual String SmallIconImageFile() const
444  {
445  return String();
446  }
447 
450  Bitmap Icon() const override;
451 
454  Bitmap SmallIcon() const override;
455 
462  bool CanRead() const override
463  {
464  return true;
465  }
466 
473  bool CanWrite() const override
474  {
475  return true;
476  }
477 
487  bool CanReadIncrementally() const override
488  {
489  return false;
490  }
491 
501  bool CanWriteIncrementally() const override
502  {
503  return false;
504  }
505 
512  bool CanStore8Bit() const override
513  {
514  return true;
515  }
516 
523  bool CanStore16Bit() const override
524  {
525  return true;
526  }
527 
534  bool CanStore32Bit() const override
535  {
536  return false;
537  }
538 
545  bool CanStore64Bit() const override
546  {
547  return false;
548  }
549 
557  bool CanStoreFloat() const override
558  {
559  return false;
560  }
561 
569  bool CanStoreDouble() const override
570  {
571  return false;
572  }
573 
581  bool CanStoreComplex() const override
582  {
583  return false;
584  }
585 
593  bool CanStoreDComplex() const override
594  {
595  return false;
596  }
597 
604  bool CanStoreGrayscale() const override
605  {
606  return true;
607  }
608 
615  bool CanStoreRGBColor() const override
616  {
617  return true;
618  }
619 
626  bool CanStoreAlphaChannels() const override
627  {
628  return true;
629  }
630 
637  bool CanStoreResolution() const override
638  {
639  return false;
640  }
641 
648  bool CanStoreKeywords() const override
649  {
650  return false;
651  }
652 
659  bool CanStoreICCProfiles() const override
660  {
661  return false;
662  }
663 
670  bool CanStoreThumbnails() const override
671  {
672  return false;
673  }
674 
689  bool CanStoreProperties() const override
690  {
691  return false;
692  }
693 
702  bool CanStoreImageProperties() const override
703  {
704  return false;
705  }
706 
713  bool CanStoreRGBWS() const override
714  {
715  return false;
716  }
717 
724  bool CanStoreDisplayFunctions() const override
725  {
726  return false;
727  }
728 
735  bool CanStoreColorFilterArrays() const override
736  {
737  return false;
738  }
739 
754  bool SupportsCompression() const override
755  {
756  return false;
757  }
758 
770  bool SupportsMultipleImages() const override
771  {
772  return false;
773  }
774 
796  bool SupportsViewProperties() const override
797  {
798  return false;
799  }
800 
810  bool CanEditPreferences() const override
811  {
812  return false;
813  }
814 
826  bool UsesFormatSpecificData() const override
827  {
828  return false;
829  }
830 
841  bool IsDeprecated() const override
842  {
843  return false;
844  }
845 
848  bool ValidateFormatSpecificData( const void* data ) const override;
849 
852  void DisposeFormatSpecificData( void* data ) const override;
853 
866  bool EditPreferences() const override;
867 
879  virtual FileFormatImplementation* Create() const = 0;
880 
881 private:
882 
883  void PerformAPIDefinitions() const override;
884 };
885 
886 // ----------------------------------------------------------------------------
887 
888 } // pcl
889 
890 #endif // __PCL_BUILDING_PIXINSIGHT_APPLICATION
891 
892 #endif // __PCL_MetaFileFormat_h
893 
894 // ----------------------------------------------------------------------------
895 // EOF pcl/MetaFileFormat.h - Released 2024-05-07T15:27:32Z
Client-side interface to a PixInsight Bitmap object.
Definition: Bitmap.h:204
Abstract base class for image file format descriptions.
Implementation of a PixInsight file format instance.
Eight-bit string (ISO/IEC-8859-1 or UTF-8 string)
Definition: String.h:5425
A formal description of an image file format in PixInsight.
virtual FileFormatImplementation * Create() const =0
bool CanStoreDouble() const override
virtual const char ** SmallIconImageXPM() const
bool CanEditPreferences() const override
bool CanRead() const override
bool CanStoreResolution() const override
bool SupportsViewProperties() const override
bool CanStoreAlphaChannels() const override
MetaFileFormat(const MetaFileFormat &)=delete
bool CanStoreImageProperties() const override
bool CanStoreComplex() const override
virtual StringList FileExtensions() const override=0
bool CanReadIncrementally() const override
bool CanStore16Bit() const override
bool IsDeprecated() const override
bool CanStoreICCProfiles() const override
bool SupportsMultipleImages() const override
bool CanWrite() const override
bool CanWriteIncrementally() const override
bool EditPreferences() const override
Bitmap Icon() const override
String Implementation() const override
bool ValidateFormatSpecificData(const void *data) const override
uint32 Version() const override
bool CanStoreDComplex() const override
virtual IsoString IconImageSVG() const
bool CanStore8Bit() const override
IsoStringList MimeTypes() const override
virtual String SmallIconImageFile() const
bool CanStore32Bit() const override
Bitmap SmallIcon() const override
virtual const char ** IconImageXPM() const
bool CanStoreGrayscale() const override
void DisposeFormatSpecificData(void *data) const override
bool CanStoreRGBColor() const override
String Status() const override
virtual String IconImageFile() const
bool CanStoreDisplayFunctions() const override
bool SupportsCompression() const override
String Description() const override
~MetaFileFormat() noexcept(false) override
virtual String IconImageSVGFile() const
bool CanStoreFloat() const override
bool CanStoreRGBWS() const override
bool CanStoreKeywords() const override
bool CanStoreThumbnails() const override
virtual IsoString Name() const override=0
bool CanStoreColorFilterArrays() const override
bool CanStoreProperties() const override
bool UsesFormatSpecificData() const override
bool CanStore64Bit() const override
Root base class for all PixInsight module components.
Definition: MetaObject.h:86
Unicode (UTF-16) string.
Definition: String.h:8113
unsigned int uint32
Definition: Defs.h:666
PCL root namespace.
Definition: AbstractImage.h:77