3Depict
|
#include "common/basics.h"
#include "common/constants.h"
#include "common/stringFuncs.h"
#include "common/translation.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <cstring>
#include <clocale>
Functions | |
unsigned int | getBitNum (unsigned int u) |
std::string | boolStrEnc (bool b) |
void | pushLocale (const char *newLocale, int type) |
void | popLocale () |
bool | dummyCallback (bool) |
void | setDefaultFontFile (const std::string &font) |
Return the default font file to use. Must precede (first) call to getDefaultFontFile. More... | |
std::string | getDefaultFontFile () |
Return the default font file to use. More... | |
void | tickSpacingsFromInterspace (float start, float end, float interSpacing, std::vector< float > &spacings) |
Convert a normal string to a latex one, using character replacement. More... | |
void | tickSpacingsFromFixedNum (float start, float end, unsigned int nTicks, std::vector< float > &spacings) |
string | veryFuzzyTimeSince (time_t origTime, time_t nowTime) |
Get a "human-like" version of the time elapsed between new and original time period. More... | |
std::ostream & | operator<< (std::ostream &stream, const BoundCube &b) |
bool | getFilesize (const char *fname, size_t &size) |
Get total filesize in bytes. More... | |
int | getTotalRAM () |
get total ram in MB More... | |
size_t | getAvailRAM () |
Get available ram in MB. More... | |
bool | strhas (const char *cpTest, const char *cpPossible) |
unsigned int | loadTextData (const char *cpFilename, vector< vector< float > > &dataVec, vector< string > &headerVec, const char *delim) |
A routine for loading numeric data from a text file. Returns 0 on success. More... | |
unsigned int | loadTextStringData (const char *cpFilename, vector< vector< string > > &dataVec, const char *delim) |
Load non-numeric data from a text file into ragged array, using specified delimiters. More... | |
bool | isNotDirectory (const char *filename) |
Determine if a given path is a not a directory,. More... | |
bool | rmFile (const std::string &filename) |
Variables | |
std::string | defaultFontFile |
std::string boolStrEnc | ( | bool | b | ) |
Referenced by IonClipFilter::getProperties(), IonColourFilter::getProperties(), ExternalProgramFilter::getProperties(), BoundingBoxFilter::getProperties(), SpectrumPlotFilter::getProperties(), AnnotateFilter::getProperties(), RangeFileFilter::getProperties(), ProfileFilter::getProperties(), VoxeliseFilter::getProperties(), ClusterAnalysisFilter::getProperties(), SpatialAnalysisFilter::getProperties(), CameraLookAt::getProperties(), AnalysisState::save(), ConfigFile::write(), IonColourFilter::writeState(), BoundingBoxFilter::writeState(), SpectrumPlotFilter::writeState(), RangeFileFilter::writeState(), VoxeliseFilter::writeState(), ClusterAnalysisFilter::writeState(), and SpatialAnalysisFilter::writeState().
bool dummyCallback | ( | bool | ) |
size_t getAvailRAM | ( | ) |
Get available ram in MB.
Referenced by FilterTree::refreshFilterTree(), and UniqueIDHandler::size().
unsigned int getBitNum | ( | unsigned int | u | ) |
References ASSERT.
Referenced by FilterTree::contains(), stream_cast(), and Filter::updateOutputInfo().
std::string getDefaultFontFile | ( | ) |
Return the default font file to use.
References defaultFontFile.
Referenced by DrawColourBarOverlay::DrawColourBarOverlay(), DrawPointLegendOverlay::DrawPointLegendOverlay(), BoundingBoxFilter::numBytesForCache(), AnnotateFilter::refresh(), and writeTextFile().
bool getFilesize | ( | const char * | fname, |
size_t & | size | ||
) |
Get total filesize in bytes.
Referenced by LimitLoadPosFile(), DataLoadFilter::monitorNeedsRefresh(), DataLoadFilter::numBytesForCache(), MainWindowFrame::OnFileExportPackage(), RangeFile::open(), RangeFile::openGuessFormat(), readOps(), DataLoadFilter::refresh(), and UniqueIDHandler::size().
int getTotalRAM | ( | ) |
get total ram in MB
Referenced by UniqueIDHandler::size().
bool isNotDirectory | ( | const char * | filename | ) |
Determine if a given path is a not a directory,.
Referenced by RangeFile::detectFileType(), loadTextData(), loadTextStringData(), DataLoadFilter::setProperty(), and UniqueIDHandler::size().
unsigned int loadTextData | ( | const char * | cpFilename, |
vector< vector< float > > & | dataVec, | ||
vector< string > & | headerVec, | ||
const char * | delim | ||
) |
A routine for loading numeric data from a text file. Returns 0 on success.
References ERR_FILE_FORMAT, ERR_FILE_NUM_FIELDS, ERR_FILE_OPEN, isNotDirectory(), splitStrsRef(), stream_cast(), strhas(), and stripZeroEntries().
Referenced by hasFirstInPairVec(), limitLoadTextFile(), ExternalProgramFilter::refresh(), and DataLoadFilter::refresh().
unsigned int loadTextStringData | ( | const char * | cpFilename, |
vector< vector< string > > & | dataVec, | ||
const char * | delim | ||
) |
Load non-numeric data from a text file into ragged array, using specified delimiters.
References ERR_FILE_FORMAT, ERR_FILE_OPEN, isNotDirectory(), splitStrsRef(), and stripZeroEntries().
Referenced by StringKeyFrameDialog::getStrings(), and hasFirstInPairVec().
std::ostream& operator<< | ( | std::ostream & | stream, |
const BoundCube & | b | ||
) |
void popLocale | ( | ) |
Referenced by RangeFile::open(), and MathGLPane::saveSVG().
void pushLocale | ( | const char * | newLocale, |
int | type | ||
) |
References ASSERT.
Referenced by RangeFile::open(), and MathGLPane::saveSVG().
bool rmFile | ( | const std::string & | filename | ) |
References ColourRGBA::b(), EQ_TOL, BoundCube::getPlaneIntersectVertices(), rmFile(), TEST, and WARN.
Referenced by loadTapsimBinFile(), TreeState::resetModifyLevel(), rmFile(), and UniqueIDHandler::size().
void setDefaultFontFile | ( | const std::string & | font | ) |
Return the default font file to use. Must precede (first) call to getDefaultFontFile.
References defaultFontFile.
Referenced by threeDepictApp::OnInit(), and writeTextFile().
bool strhas | ( | const char * | cpTest, |
const char * | cpPossible | ||
) |
void tickSpacingsFromFixedNum | ( | float | start, |
float | end, | ||
unsigned int | nTicks, | ||
std::vector< float > & | spacings | ||
) |
References ASSERT.
Referenced by hasFirstInPairVec(), and AnnotateFilter::refresh().
void tickSpacingsFromInterspace | ( | float | start, |
float | end, | ||
float | interSpacing, | ||
std::vector< float > & | spacings | ||
) |
Convert a normal string to a latex one, using character replacement.
References ASSERT.
Referenced by hasFirstInPairVec(), and AnnotateFilter::refresh().
string veryFuzzyTimeSince | ( | time_t | origTime, |
time_t | nowTime | ||
) |
Get a "human-like" version of the time elapsed between new and original time period.
References ASSERT, COMPILE_ASSERT, NTRANS, THREEDEP_ARRAYSIZE, and TRANS.
Referenced by MainWindowFrame::checkReloadAutosave(), and hasFirstInPairVec().
std::string defaultFontFile |
Referenced by getDefaultFontFile(), and setDefaultFontFile().