StarBlockList

Search for usage in LXR

StarBlockList Class Reference

#include <starblocklist.h>

Public Member Functions

 StarBlockList (const Trixel &trixel, DeepStarComponent *parent=nullptr)
 
std::shared_ptr< StarBlockblock (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

Author
Akarsh Simha
Version
0.1

Definition at line 22 of file starblocklist.h.

Constructor & Destructor Documentation

◆ StarBlockList()

StarBlockList::StarBlockList ( const Trixel & trixel,
DeepStarComponent * parent = nullptr )
explicit

Constructor for deep star catalogs.

Parameters
trixelThe trixel ID
parentPointer to the parent DeepStarComponent

Definition at line 21 of file starblocklist.cpp.

Member Function Documentation

◆ block()

std::shared_ptr< StarBlock > StarBlockList::block ( unsigned int i)
inline

Returns the i-th block in this StarBlockList.

Parameters
iIndex of the required block
Returns
The StarBlock requested for, nullptr if index out of bounds

Definition at line 64 of file starblocklist.h.

◆ contents()

const QList< std::shared_ptr< StarBlock > > & StarBlockList::contents ( ) const
inline
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
maglimMagnitude 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()

int StarBlockList::getBlockCount ( ) const
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()

float StarBlockList::getFaintMag ( ) const
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()

long StarBlockList::getStarCount ( ) const
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()

Trixel StarBlockList::getTrixel ( ) const
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
blockPointer 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
blockPointer to the StarBlock

Definition at line 157 of file starblocklist.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.