lsst.afw  17.0.1-26-ga1fda76f0
Public Member Functions | Protected Types | Protected Member Functions | Related Functions | List of all members
lsst.afw.typehandling.testUtils.GenericMapTestBaseClass.SimpleStorable Class Reference
Inheritance diagram for lsst.afw.typehandling.testUtils.GenericMapTestBaseClass.SimpleStorable:
lsst::afw::typehandling::Storable lsst::afw::table::io::Persistable lsst.afw.typehandling.testUtils.GenericMapTestBaseClass.ComplexStorable

Public Member Functions

def __repr__ (self)
 
def __hash__ (self)
 
def __eq__ (self, other)
 
virtual std::unique_ptr< Storable > clone () const
 Create a new object that is a copy of this one (optional operation). More...
 
virtual std::string toString () const
 Create a string representation of this object (optional operation). More...
 
virtual std::size_t hash_value () const
 Return a hash of this object (optional operation). More...
 
virtual bool equals (Storable const &other) const noexcept
 Compare this object to another Storable. More...
 
void writeFits (std::string const &fileName, std::string const &mode="w") const
 Write the object to a regular FITS file. More...
 
void writeFits (fits::MemFileManager &manager, std::string const &mode="w") const
 Write the object to a FITS image in memory. More...
 
void writeFits (fits::Fits &fitsfile) const
 Write the object to an already-open FITS object. More...
 
virtual bool isPersistable () const noexcept
 Return true if this particular object can be persisted using afw::table::io. More...
 

Protected Types

typedef io::OutputArchiveHandle OutputArchiveHandle
 

Protected Member Functions

virtual std::string getPersistenceName () const
 Return the unique name used to persist this object and look up its factory. More...
 
virtual std::string getPythonModule () const
 Return the fully-qualified Python module that should be imported to guarantee that its factory is registered. More...
 
virtual void write (OutputArchiveHandle &handle) const
 Write the object to one or more catalogs. More...
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &os, Storable const &storable)
 Output operator for Storable. More...
 

Detailed Description

A subclass of Storable for testing purposes.

Definition at line 43 of file testUtils.py.

Member Typedef Documentation

◆ OutputArchiveHandle

typedef io::OutputArchiveHandle lsst::afw::table::io::Persistable::OutputArchiveHandle
protectedinherited

Definition at line 108 of file Persistable.h.

Member Function Documentation

◆ __eq__()

def lsst.afw.typehandling.testUtils.GenericMapTestBaseClass.SimpleStorable.__eq__ (   self,
  other 
)
Warning: violates both  substitution and equality symmetry!

Definition at line 52 of file testUtils.py.

◆ __hash__()

def lsst.afw.typehandling.testUtils.GenericMapTestBaseClass.SimpleStorable.__hash__ (   self)

Definition at line 49 of file testUtils.py.

◆ __repr__()

def lsst.afw.typehandling.testUtils.GenericMapTestBaseClass.SimpleStorable.__repr__ (   self)

Definition at line 46 of file testUtils.py.

◆ clone()

virtual std::unique_ptr<Storable> lsst::afw::typehandling::Storable::clone ( void  ) const
inlinevirtualinherited

Create a new object that is a copy of this one (optional operation).

Exceptions
UnsupportedOperationExceptionThrown if this object is not cloneable.

Definition at line 70 of file Storable.h.

◆ equals()

virtual bool lsst::afw::typehandling::Storable::equals ( Storable const &  other) const
inlinevirtualnoexceptinherited

Compare this object to another Storable.

Subclasses that implement equality comparison must override this method to give results consistent with operator== for all inputs that are accepted by both.

Returns
This implementation always returns false.
Warning
This method compares an object to any type of Storable, although cross-class comparisons should usually return false. If cross-class comparisons are valid, implementers should take care that they are symmetric and will give the same result no matter what the compile-time types of the left- and right-hand sides are.

Definition at line 109 of file Storable.h.

◆ getPersistenceName()

std::string lsst::afw::table::io::Persistable::getPersistenceName ( ) const
protectedvirtualinherited

◆ getPythonModule()

std::string lsst::afw::table::io::Persistable::getPythonModule ( ) const
protectedvirtualinherited

◆ hash_value()

virtual std::size_t lsst::afw::typehandling::Storable::hash_value ( ) const
inlinevirtualinherited

Return a hash of this object (optional operation).

Exceptions
UnsupportedOperationExceptionThrown if this object is not hashable.
Note
Subclass authors are responsible for any associated specializations of std::hash.

Definition at line 90 of file Storable.h.

◆ isPersistable()

virtual bool lsst::afw::table::io::Persistable::isPersistable ( ) const
inlinevirtualnoexceptinherited

◆ toString()

virtual std::string lsst::afw::typehandling::Storable::toString ( ) const
inlinevirtualinherited

Create a string representation of this object (optional operation).

Exceptions
UnsupportedOperationExceptionThrown if this object does not have a string representation.

Definition at line 79 of file Storable.h.

◆ write()

void lsst::afw::table::io::Persistable::write ( OutputArchiveHandle &  handle) const
protectedvirtualinherited

◆ writeFits() [1/3]

void lsst::afw::table::io::Persistable::writeFits ( std::string const &  fileName,
std::string const &  mode = "w" 
) const
inherited

Write the object to a regular FITS file.

Parameters
[in]fileNameName of the file to write to.
[in]modeIf "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file.

Definition at line 24 of file Persistable.cc.

◆ writeFits() [2/3]

void lsst::afw::table::io::Persistable::writeFits ( fits::MemFileManager &  manager,
std::string const &  mode = "w" 
) const
inherited

Write the object to a FITS image in memory.

Parameters
[in]managerName of the file to write to.
[in]modeIf "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file.

Definition at line 29 of file Persistable.cc.

◆ writeFits() [3/3]

void lsst::afw::table::io::Persistable::writeFits ( fits::Fits &  fitsfile) const
inherited

Write the object to an already-open FITS object.

Parameters
[in]fitsfileOpen FITS object to write to.

Definition at line 18 of file Persistable.cc.

Friends And Related Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
Storable const &  storable 
)
related

Output operator for Storable.

Parameters
osthe desired output stream
storablethe object to print
Returns
a reference to os
Exceptions
UnsupportedOperationExceptionThrown if storable does not have an implementation of Storable::toString.

Definition at line 129 of file Storable.h.


The documentation for this class was generated from the following file: