StarBlockList
#include <starblocklist.h>
Public Member Functions | |
StarBlockList (const Trixel &trixel, DeepStarComponent *parent=nullptr) | |
std::shared_ptr< StarBlock > | block (unsigned int i) |
const QList< std::shared_ptr< StarBlock > > & | contents () const |
bool | fillToMag (float maglim) |
int | getBlockCount () const |
float | getFaintMag () const |
long | getStarCount () const |
Trixel | getTrixel () const |
int | releaseBlock (StarBlock *block) |
void | setStaticBlock (std::shared_ptr< StarBlock > &block) |
Detailed Description
Maintains a list of StarBlocks that contain the stars lying in a single trixel.
Takes care of the dynamic loading of stars
- Version
- 0.1
Definition at line 22 of file starblocklist.h.
Constructor & Destructor Documentation
◆ StarBlockList()
|
explicit |
Constructor for deep star catalogs.
- Parameters
-
trixel The trixel ID parent Pointer to the parent DeepStarComponent
Definition at line 21 of file starblocklist.cpp.
Member Function Documentation
◆ block()
|
inline |
Returns the i-th block in this StarBlockList.
- Parameters
-
i Index of the required block
- Returns
- The StarBlock requested for, nullptr if index out of bounds
Definition at line 64 of file starblocklist.h.
◆ contents()
- Returns
- a const reference to the contents of this StarBlockList
Definition at line 69 of file starblocklist.h.
◆ fillToMag()
bool StarBlockList::fillToMag | ( | float | maglim | ) |
Ensures that the list is loaded with stars to given magnitude limit.
- Parameters
-
maglim Magnitude limit to load stars upto
- Returns
- true on success, false on failure (data file not found, bad seek etc)
Definition at line 62 of file starblocklist.cpp.
◆ getBlockCount()
|
inline |
Returns the total number of blocks in theis StarBlockList.
- Returns
- Number of blocks in this StarBlockList
Definition at line 81 of file starblocklist.h.
◆ getFaintMag()
|
inline |
Returns the magnitude of the faintest star currently stored.
- Returns
- Magnitude of faintest star stored in this StarBlockList
Definition at line 87 of file starblocklist.h.
◆ getStarCount()
|
inline |
Returns the total number of stars in this StarBlockList.
- Returns
- Total number of stars in this StarBlockList
Definition at line 75 of file starblocklist.h.
◆ getTrixel()
|
inline |
Returns the trixel that this SBL is meant for.
- Returns
- The value of trixel
Definition at line 93 of file starblocklist.h.
◆ releaseBlock()
int StarBlockList::releaseBlock | ( | StarBlock * | block | ) |
Drops the StarBlock with the given pointer from the list.
- Parameters
-
block Pointer to the StarBlock to remove
- Returns
- Number of entries removed from the QList
Definition at line 28 of file starblocklist.cpp.
◆ setStaticBlock()
void StarBlockList::setStaticBlock | ( | std::shared_ptr< StarBlock > & | block | ) |
Sets the first StarBlock in the list to point to the given StarBlock.
This function must ideally be used only once. Also, it does not make a copy of the StarBlock supplied, but uses the pointer directly. StarBlockList will take care of deleting the StarBlock when it is destroyed
- Parameters
-
block Pointer to the StarBlock
Definition at line 157 of file starblocklist.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.