eFinancialPlanner  V1.0 (proof of concept)
Personal Financial Planning based on Maslowian Portfolio Theory
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
html_helper Class Reference

Public Member Functions

 html_helper ()
 
void footer (string tab_name, string extraInfo="")
 
void show_home ()
 
void header (int iid=0, bool addSavingsPlan=false, bool addPlots=false)
 
string get_string (const std::string &varName)
 
void show_toolBar (string tab_name, string usrName="")
 
void next_step (int stepNbr, int subStepNbr)
 
void aside (const string &textLine)
 
void cout_box_color (string the_color)
 
string get_box_color_class (string the_color)
 
string get_glyphicon (string the_color)
 
string terms_of_use ()
 
string privacy_policy ()
 
string cookie_policy ()
 
string collapse_open (string parent_id, string title, int nbr, bool add_triangle=true, bool is_open=true, string xtra_body_class="")
 
string collapse_close (string parent_id="", int nbr=0, bool add_triangle=true)
 

Public Attributes

const string c_salt = "k35f9vfgDtjTe1"
 
const string seriesColorsGoalPlot ="[ 'rgba(160, 0, 0, 0.6)', 'rgba(0, 0, 160, 0.6)', 'rgba(0, 160, 0, 0.6)', \"#000\", \"#663\", \"#958c12\", \"#953579\", \"#4b5de4\", \"#d8b83f\", \"#ff5800\", \"#0085cc\"]"
 
const string assetClassColors ="['#999', '#0c3', '#396', '#0c9', '#3cf', '#69f', '#96f', '#f93', '#fc3', '#f63', '#33f']"
 

Private Types

typedef std::map< string, string > STRMAP
 
typedef std::map< int, STRMAPSTEPDEF
 

Private Member Functions

void header_menu_bar ()
 
void parse_date_time ()
 
void show_args (int argc, char **argv)
 
void parse_breadcrumb (int tab, int sub_tab)
 
void parse_title (int tab, int sub_tab)
 
int get_prev_step (int theStep, int theSubStep)
 
int get_prev_sub_step (int theStep, int theSubStep)
 
int get_next_step (int theStep, int theSubStep)
 
int get_next_sub_step (int theStep, int theSubStep)
 
bool sub_step_exists (int theStep, int theSubStep)
 
int get_step_nbr (string step_name)
 
int get_sub_step_nbr (string sub_step_name)
 
void show_social ()
 
void navbar_start ()
 
void navbar_item (int k, string usr_name="", string tab_name="")
 
void navbar_end ()
 
void navbar_box (int k, string usr_name="")
 

Private Attributes

const std::map< int, string > c_photos_phdb
 
const string c_photos_phdb_dir = "/img/"
 
const string c_content_header = "Content-type:text/html\r\n\r\n"
 
const string c_doc_type = "<!DOCTYPE html>"
 
std::map< int, string > scale125i2s
 a scale from 1 to 5, int to string More...
 
STEPDEF steps
 
std::map< int, STEPDEFsub_steps
 
std::map< string, int > step_nbrs
 
std::map< string, int > sub_step_nbrs
 
const string c_right_menu_names [NBR_RIGHT_MENU] = {"My Account","Disclaimers","Log Out"}
 
const string c_right_menu_urls [NBR_RIGHT_MENU]
 
const string c_arrow = "&nbsp;<img src=\"" + oConfig.css_dir + "next.gif\" border=\"0\" width=\"5\" height=\"9\" alt=\"\" class=\"noPadding\">&nbsp;"
 

Detailed Description

Definition at line 1 of file html_helper.class.cpp.

Member Typedef Documentation

typedef std::map<int, STRMAP > html_helper::STEPDEF
private

Definition at line 47 of file html_helper.class.cpp.

typedef std::map<string, string> html_helper::STRMAP
private

Definition at line 46 of file html_helper.class.cpp.

Constructor & Destructor Documentation

html_helper::html_helper ( )

CONSTRUCTOR ==> initalizations

note that these definitions cannot be done at declaration (must be in a function!)

HOME

login & registert

Personalize

Goals

Assets & cash flows

feedback

simulation

followup

Definition at line 125 of file html_helper.class.cpp.

Member Function Documentation

void html_helper::aside ( const string &  textLine)

aside

Definition at line 1119 of file html_helper.class.cpp.

string html_helper::collapse_close ( string  parent_id = "",
int  nbr = 0,
bool  add_triangle = true 
)
inline

collapse_close

Definition at line 401 of file html_helper.class.cpp.

string html_helper::collapse_open ( string  parent_id,
string  title,
int  nbr,
bool  add_triangle = true,
bool  is_open = true,
string  xtra_body_class = "" 
)
inline

collapse_open

< note the "in": the jqplot chart won't render in hidden div's :-(

Definition at line 375 of file html_helper.class.cpp.

string html_helper::cookie_policy ( )
inline

terms_of_use

Definition at line 1312 of file html_helper.class.cpp.

void html_helper::cout_box_color ( string  the_color)

cout_box_color

sends the appropriate class (for the div surrounding a goal)

Definition at line 1233 of file html_helper.class.cpp.

void html_helper::footer ( string  tab_name,
string  extraInfo = "" 
)

footer

Definition at line 428 of file html_helper.class.cpp.

string html_helper::get_box_color_class ( string  the_color)

get_box_color_class

Definition at line 1246 of file html_helper.class.cpp.

string html_helper::get_glyphicon ( string  the_color)

get_glyphicon

Definition at line 1261 of file html_helper.class.cpp.

int html_helper::get_next_step ( int  theStep,
int  theSubStep 
)
inlineprivate

get_next_step

Definition at line 230 of file html_helper.class.cpp.

int html_helper::get_next_sub_step ( int  theStep,
int  theSubStep 
)
inlineprivate

get_next_sub_step

Definition at line 250 of file html_helper.class.cpp.

int html_helper::get_prev_step ( int  theStep,
int  theSubStep 
)
inlineprivate

get_prev_step

Definition at line 215 of file html_helper.class.cpp.

int html_helper::get_prev_sub_step ( int  theStep,
int  theSubStep 
)
inlineprivate

get_prev_sub_step

xxxxxxxxxxxxxxxxxxxxxxxxxxxNOT OK!!!!!!!!!!! TODO: repair this function, it does not work for the step after one with sub-steps

Definition at line 284 of file html_helper.class.cpp.

int html_helper::get_step_nbr ( string  step_name)
private

get_step_nbr

Definition at line 334 of file html_helper.class.cpp.

string html_helper::get_string ( const std::string &  varName)

Definition at line 785 of file html_helper.class.cpp.

int html_helper::get_sub_step_nbr ( string  sub_step_name)
private

get_sub_step_nbr

Definition at line 354 of file html_helper.class.cpp.

void html_helper::header ( int  iid = 0,
bool  addSavingsPlan = false,
bool  addPlots = false 
)

header

addPlots –> adds the jqPlot sources to display graphs addSavingsPlan –> adds the show/hide buttons for the savings plan

=== jquery

=== jqplot

=== bespoke javascript

=== date-picker

=== the presentation (bootstrap)

=== fonts

=== body

< if it is not in an iframe, then the menu is parsed, otherwise we assume that it is done by the calling webpage

Definition at line 562 of file html_helper.class.cpp.

void html_helper::header_menu_bar ( )
private

header_menu_bar

Definition at line 539 of file html_helper.class.cpp.

void html_helper::navbar_box ( int  k,
string  usr_name = "" 
)
inlineprivate

navbar_box

parses the box in that contains the username, links to my_account, Disclaimers, etc.

Definition at line 948 of file html_helper.class.cpp.

void html_helper::navbar_end ( )
inlineprivate

navbar_end

ends the navbar environment

Definition at line 929 of file html_helper.class.cpp.

void html_helper::navbar_item ( int  k,
string  usr_name = "",
string  tab_name = "" 
)
inlineprivate

navbar_item

adds one item to the navigation bar

Definition at line 821 of file html_helper.class.cpp.

void html_helper::navbar_start ( )
inlineprivate

navbar_start

open the environment in which the navigation bar will reside

Definition at line 802 of file html_helper.class.cpp.

void html_helper::next_step ( int  stepNbr,
int  subStepNbr 
)

next_step

Definition at line 1046 of file html_helper.class.cpp.

void html_helper::parse_breadcrumb ( int  tab,
int  sub_tab 
)
private

parse_breadcrumb

parse the breadcrumb given the location as tab, subtab

< if there is a sub-tab, then show it

< if there is a sub-tab, then show it

Definition at line 1158 of file html_helper.class.cpp.

void html_helper::parse_date_time ( )
private

parse_date_time

Definition at line 529 of file html_helper.class.cpp.

void html_helper::parse_title ( int  tab,
int  sub_tab 
)
private

parse_title

parses the title section to cout, given the location as tab, subtab

Definition at line 1198 of file html_helper.class.cpp.

string html_helper::privacy_policy ( )
inline

privacy_policy

Definition at line 1303 of file html_helper.class.cpp.

void html_helper::show_args ( int  argc,
char **  argv 
)
private
void html_helper::show_home ( )

show_home

the landing page of the software

Definition at line 722 of file html_helper.class.cpp.

void html_helper::show_social ( )
private

show_social shows the badges for the social media (with underlying links to follow, etc.)

Definition at line 1138 of file html_helper.class.cpp.

void html_helper::show_toolBar ( string  tab_name,
string  usrName = "" 
)

show_toolBar

Definition at line 988 of file html_helper.class.cpp.

bool html_helper::sub_step_exists ( int  theStep,
int  theSubStep 
)
inlineprivate

sub_step_exists

Definition at line 308 of file html_helper.class.cpp.

string html_helper::terms_of_use ( )
inline

terms_of_use

Definition at line 1294 of file html_helper.class.cpp.

Member Data Documentation

const string html_helper::assetClassColors ="['#999', '#0c3', '#396', '#0c9', '#3cf', '#69f', '#96f', '#f93', '#fc3', '#f63', '#33f']"

Definition at line 23 of file html_helper.class.cpp.

const string html_helper::c_arrow = "&nbsp;<img src=\"" + oConfig.css_dir + "next.gif\" border=\"0\" width=\"5\" height=\"9\" alt=\"\" class=\"noPadding\">&nbsp;"
private

Definition at line 112 of file html_helper.class.cpp.

const string html_helper::c_content_header = "Content-type:text/html\r\n\r\n"
private

Definition at line 42 of file html_helper.class.cpp.

const string html_helper::c_doc_type = "<!DOCTYPE html>"
private

Definition at line 43 of file html_helper.class.cpp.

const std::map<int, string> html_helper::c_photos_phdb
private
Initial value:
= {{1,"phdb/ZM5K1325_01.jpg"}, {2,"phdb/ZM5K1312_01b.jpg"},
{3,"phdb/ZM5K1302_01c.jpg"},{4,"phdb/ZM5K1313_01c.jpg"}, {5, "fvdspieg1.jpg"}, {6, "fvdspieg2.jpg"}}

Definition at line 39 of file html_helper.class.cpp.

const string html_helper::c_photos_phdb_dir = "/img/"
private

Definition at line 41 of file html_helper.class.cpp.

const string html_helper::c_right_menu_names[NBR_RIGHT_MENU] = {"My Account","Disclaimers","Log Out"}
private

Definition at line 106 of file html_helper.class.cpp.

const string html_helper::c_right_menu_urls[NBR_RIGHT_MENU]
private
Initial value:
= {
oConfig.soft_url + "?a=ie",
oConfig.soft_url + "?a=d",
oConfig.soft_url + "?a=io"
}

Definition at line 107 of file html_helper.class.cpp.

const string html_helper::c_salt = "k35f9vfgDtjTe1"

Definition at line 9 of file html_helper.class.cpp.

std::map<int, string> html_helper::scale125i2s
private

a scale from 1 to 5, int to string

Definition at line 45 of file html_helper.class.cpp.

const string html_helper::seriesColorsGoalPlot ="[ 'rgba(160, 0, 0, 0.6)', 'rgba(0, 0, 160, 0.6)', 'rgba(0, 160, 0, 0.6)', \"#000\", \"#663\", \"#958c12\", \"#953579\", \"#4b5de4\", \"#d8b83f\", \"#ff5800\", \"#0085cc\"]"

Definition at line 19 of file html_helper.class.cpp.

std::map<string, int> html_helper::step_nbrs
private

Definition at line 55 of file html_helper.class.cpp.

STEPDEF html_helper::steps
private

Definition at line 48 of file html_helper.class.cpp.

std::map<string, int> html_helper::sub_step_nbrs
private

Definition at line 56 of file html_helper.class.cpp.

std::map<int, STEPDEF> html_helper::sub_steps
private

Definition at line 49 of file html_helper.class.cpp.


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