API Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
INIFactory Class Reference

Contains methods for easily reading and writing to an INI file including efficient casting, callback, and variable storage methods. More...

#include <INIReader.h>

Public Member Functions

void addINIOption (const String &label, INIOption *option)
 
bool addManagedOption (const String &option_label, const String &option, bool replace=true)
 
template<class t_type >
void addOption (const String &label, const Resource< t_type > &mem_loc)=delete
 
template<class t_type >
void addOption (const String &label, const t_type &mem_loc)=delete
 
template<class t_type , uint01 t_row_dims, uint01 t_col_dims>
void addOption (const String &label, Resource< Matrix< t_type, t_row_dims, t_col_dims > > &mem_loc)
 
template<class t_type >
void addOption (const String &label, Resource< t_type > &mem_loc)
 
template<uint01 t_dims, class t_type >
void addOption (const String &label, Resource< Vector< t_dims, t_type > > &mem_loc)
 
template<class t_type >
void addOption (const String &label, t_type &mem_loc)
 
template<uint01 t_dims, class t_type >
void addOption (const String &label, Vector< t_dims, t_type > &mem_loc)
 
void clear ()
 
Dictionary< String, StringextraOptions () const
 
Dictionary< String, String * > & extraOptionsRef ()
 
String getOption (const String &option, const String &default_value=String()) const
 
bool hasOption (const String &option) const
 
bool hasOption (uint08 hash_option) const
 
 INIFactory ()
 
 INIFactory (const INIFactory &reader)=delete
 
 INIFactory (INIFactory &&reader) noexcept
 
bool preserveOrder () const
 
void read (Scanner &file)
 
void readAsciiFile (File &file)
 
void readBinaryFile (File &file)
 
void setComment (char comment)
 
void setDelimiter (char delimiter)
 
void setPreserveOrder (bool preserve_order)
 
void setUseHashLabels (bool use_hash_labels)
 
void writeToAsciiFile (File &file, bool include_end_comment=false)
 
void writeToBinaryFile (File &file)
 
void writeToLog (const String &title, ProgressInfo *log, uint01 log_level=2)
 
virtual ~INIFactory ()
 

Static Public Member Functions

static void ConvertFromINIString (String &s)
 
static void ConvertToINIString (String &s)
 
template<class t_type >
static INIOptionToOption (Resource< t_type > &value)
 
template<class t_type >
static INIOptionToOption (t_type &mem_loc)
 

Detailed Description

Contains methods for easily reading and writing to an INI file including efficient casting, callback, and variable storage methods.


addOption functions take a REFERENCE to an object and will modify that reference

when option is read in.

Constructor & Destructor Documentation

◆ INIFactory() [1/3]

◆ INIFactory() [2/3]

INIFactory ( const INIFactory & reader)
delete

◆ INIFactory() [3/3]

INIFactory ( INIFactory && reader)
noexcept

◆ ~INIFactory()

virtual ~INIFactory ( )
virtual

Member Function Documentation

◆ addINIOption()

void addINIOption ( const String & label,
INIOption * option )

◆ addManagedOption()

bool addManagedOption ( const String & option_label,
const String & option,
bool replace = true )

◆ addOption() [1/7]

template<class t_type >
void addOption ( const String & label,
const Resource< t_type > & mem_loc )
delete

◆ addOption() [2/7]

template<class t_type >
void addOption ( const String & label,
const t_type & mem_loc )
delete

◆ addOption() [3/7]

template<class t_type , uint01 t_row_dims, uint01 t_col_dims>
void addOption ( const String & label,
Resource< Matrix< t_type, t_row_dims, t_col_dims > > & mem_loc )
inline

◆ addOption() [4/7]

template<class t_type >
void addOption ( const String & label,
Resource< t_type > & mem_loc )
inline

◆ addOption() [5/7]

template<uint01 t_dims, class t_type >
void addOption ( const String & label,
Resource< Vector< t_dims, t_type > > & mem_loc )
inline

◆ addOption() [6/7]

template<class t_type >
void addOption ( const String & label,
t_type & mem_loc )
inline

◆ addOption() [7/7]

template<uint01 t_dims, class t_type >
void addOption ( const String & label,
Vector< t_dims, t_type > & mem_loc )
inline

◆ clear()

void clear ( )

◆ ConvertFromINIString()

static void ConvertFromINIString ( String & s)
static

◆ ConvertToINIString()

static void ConvertToINIString ( String & s)
static

◆ extraOptions()

Dictionary< String, String > extraOptions ( ) const

◆ extraOptionsRef()

Dictionary< String, String * > & extraOptionsRef ( )
inline

◆ getOption()

String getOption ( const String & option,
const String & default_value = String() ) const

◆ hasOption() [1/2]

bool hasOption ( const String & option) const

◆ hasOption() [2/2]

bool hasOption ( uint08 hash_option) const

◆ preserveOrder()

bool preserveOrder ( ) const
inline

◆ read()

void read ( Scanner & file)

◆ readAsciiFile()

void readAsciiFile ( File & file)

◆ readBinaryFile()

void readBinaryFile ( File & file)

◆ setComment()

void setComment ( char comment)
inline

◆ setDelimiter()

void setDelimiter ( char delimiter)

◆ setPreserveOrder()

void setPreserveOrder ( bool preserve_order)
inline

◆ setUseHashLabels()

void setUseHashLabels ( bool use_hash_labels)

◆ ToOption() [1/2]

template<class t_type >
static INIOption * ToOption ( Resource< t_type > & value)
inlinestatic

◆ ToOption() [2/2]

template<class t_type >
static INIOption * ToOption ( t_type & mem_loc)
inlinestatic

◆ writeToAsciiFile()

void writeToAsciiFile ( File & file,
bool include_end_comment = false )

◆ writeToBinaryFile()

void writeToBinaryFile ( File & file)

◆ writeToLog()

void writeToLog ( const String & title,
ProgressInfo * log,
uint01 log_level = 2 )

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