PCL
MetaFileFormat.h
Go to the documentation of this file.
1 // ____ ______ __
2 // / __ \ / ____// /
3 // / /_/ // / / /
4 // / ____// /___ / /___ PixInsight Class Library
5 // /_/ \____//_____/ PCL 2.6.5
6 // ----------------------------------------------------------------------------
7 // pcl/MetaFileFormat.h - Released 2024-01-13T15:47:58Z
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 
116  MetaFileFormat();
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-01-13T15:47:58Z
pcl
PCL root namespace.
Definition: AbstractImage.h:76
pcl::MetaFileFormat::CanStoreAlphaChannels
bool CanStoreAlphaChannels() const override
Definition: MetaFileFormat.h:626
pcl::MetaFileFormat::CanRead
bool CanRead() const override
Definition: MetaFileFormat.h:462
pcl::MetaFileFormat
A formal description of an image file format in PixInsight.
Definition: MetaFileFormat.h:109
pcl::Bitmap
Client-side interface to a PixInsight Bitmap object.
Definition: Bitmap.h:203
pcl::MetaFileFormat::Status
String Status() const override
Definition: MetaFileFormat.h:233
pcl::MetaFileFormat::CanReadIncrementally
bool CanReadIncrementally() const override
Definition: MetaFileFormat.h:487
pcl::MetaFileFormat::CanStoreResolution
bool CanStoreResolution() const override
Definition: MetaFileFormat.h:637
pcl::FileFormatBase
Abstract base class for image file format descriptions.
Definition: FileFormatBase.h:95
pcl::MetaFileFormat::CanStoreImageProperties
bool CanStoreImageProperties() const override
Definition: MetaFileFormat.h:702
pcl::String
Unicode (UTF-16) string.
Definition: String.h:8112
pcl::MetaFileFormat::SupportsCompression
bool SupportsCompression() const override
Definition: MetaFileFormat.h:754
pcl::MetaFileFormat::CanStoreRGBColor
bool CanStoreRGBColor() const override
Definition: MetaFileFormat.h:615
pcl::MetaFileFormat::CanEditPreferences
bool CanEditPreferences() const override
Definition: MetaFileFormat.h:810
pcl::MetaFileFormat::IconImageSVGFile
virtual String IconImageSVGFile() const
Definition: MetaFileFormat.h:330
pcl::MetaFileFormat::Implementation
String Implementation() const override
Definition: MetaFileFormat.h:212
pcl::IsoString
Eight-bit string (ISO/IEC-8859-1 or UTF-8 string)
Definition: String.h:5424
pcl::MetaFileFormat::CanWrite
bool CanWrite() const override
Definition: MetaFileFormat.h:473
pcl::uint32
unsigned int uint32
Definition: Defs.h:669
pcl::MetaFileFormat::IconImageXPM
virtual const char ** IconImageXPM() const
Definition: MetaFileFormat.h:361
pcl::MetaFileFormat::CanStore64Bit
bool CanStore64Bit() const override
Definition: MetaFileFormat.h:545
pcl::MetaFileFormat::CanWriteIncrementally
bool CanWriteIncrementally() const override
Definition: MetaFileFormat.h:501
pcl::MetaFileFormat::CanStoreColorFilterArrays
bool CanStoreColorFilterArrays() const override
Definition: MetaFileFormat.h:735
MetaObject.h
pcl::MetaFileFormat::SupportsMultipleImages
bool SupportsMultipleImages() const override
Definition: MetaFileFormat.h:770
pcl::MetaFileFormat::CanStoreICCProfiles
bool CanStoreICCProfiles() const override
Definition: MetaFileFormat.h:659
pcl::MetaFileFormat::CanStoreComplex
bool CanStoreComplex() const override
Definition: MetaFileFormat.h:581
pcl::MetaFileFormat::CanStore32Bit
bool CanStore32Bit() const override
Definition: MetaFileFormat.h:534
pcl::Version
Provides PCL version numbers.
Definition: Version.h:75
pcl::Array< String >
pcl::MetaFileFormat::CanStoreGrayscale
bool CanStoreGrayscale() const override
Definition: MetaFileFormat.h:604
pcl::MetaFileFormat::MimeTypes
IsoStringList MimeTypes() const override
Definition: MetaFileFormat.h:162
pcl::MetaFileFormat::IsDeprecated
bool IsDeprecated() const override
Definition: MetaFileFormat.h:841
pcl::MetaFileFormat::SmallIconImageFile
virtual String SmallIconImageFile() const
Definition: MetaFileFormat.h:443
pcl::MetaFileFormat::CanStoreDComplex
bool CanStoreDComplex() const override
Definition: MetaFileFormat.h:593
pcl::MetaFileFormat::IconImageSVG
virtual IsoString IconImageSVG() const
Definition: MetaFileFormat.h:263
pcl::MetaFileFormat::CanStoreRGBWS
bool CanStoreRGBWS() const override
Definition: MetaFileFormat.h:713
pcl::MetaFileFormat::IconImageFile
virtual String IconImageFile() const
Definition: MetaFileFormat.h:387
pcl::MetaFileFormat::CanStoreProperties
bool CanStoreProperties() const override
Definition: MetaFileFormat.h:689
pcl::MetaFileFormat::UsesFormatSpecificData
bool UsesFormatSpecificData() const override
Definition: MetaFileFormat.h:826
pcl::FileFormatImplementation
Implementation of a PixInsight file format instance.
Definition: FileFormatImplementation.h:97
pcl::MetaFileFormat::CanStoreThumbnails
bool CanStoreThumbnails() const override
Definition: MetaFileFormat.h:670
FileFormatBase.h
pcl::MetaObject
Root base class for all PixInsight module components.
Definition: MetaObject.h:85
pcl::MetaFileFormat::CanStoreFloat
bool CanStoreFloat() const override
Definition: MetaFileFormat.h:557
pcl::ColorSpace::Name
String Name(int colorSpace)
pcl::MetaFileFormat::SupportsViewProperties
bool SupportsViewProperties() const override
Definition: MetaFileFormat.h:796
pcl::MetaFileFormat::CanStoreDisplayFunctions
bool CanStoreDisplayFunctions() const override
Definition: MetaFileFormat.h:724
pcl::MetaFileFormat::SmallIconImageXPM
virtual const char ** SmallIconImageXPM() const
Definition: MetaFileFormat.h:420
pcl::MetaFileFormat::~MetaFileFormat
~MetaFileFormat() noexcept(false) override
Definition: MetaFileFormat.h:121
pcl::MetaFileFormat::CanStore16Bit
bool CanStore16Bit() const override
Definition: MetaFileFormat.h:523
pcl::MetaFileFormat::CanStoreKeywords
bool CanStoreKeywords() const override
Definition: MetaFileFormat.h:648
pcl::MetaFileFormat::Description
String Description() const override
Definition: MetaFileFormat.h:185
Defs.h
pcl::MetaFileFormat::CanStore8Bit
bool CanStore8Bit() const override
Definition: MetaFileFormat.h:512
pcl::MetaFileFormat::CanStoreDouble
bool CanStoreDouble() const override
Definition: MetaFileFormat.h:569