AJP13::net_alhem_1_0_server::Hosts::Host_t Class Reference

#include <Iconf.h>

Collaboration diagram for AJP13::net_alhem_1_0_server::Hosts::Host_t:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Host_t ()
 Host_t (const Xml::XmlNode &it)
virtual ~Host_t ()
void FromXml (const Xml::XmlNode &it)
const std::string ToString (const std::string &name="") const
bool IsSet () const
const std::string & GetDocuments () const
void SetDocuments (const std::string &documents)
const std::string & GetScripts () const
void SetScripts (const std::string &scripts)
const std::string & GetLogs () const
void SetLogs (const std::string &logs)
const std::string & GetIndexDocument () const
void SetIndexDocument (const std::string &indexDocument)
const std::list
< net_alhem_1_0_server::Log > & 
GetLog () const
std::list
< net_alhem_1_0_server::Log > & 
GetLog ()
void SetLog (const std::list< net_alhem_1_0_server::Log > &log)
const
net_alhem_1_0_server::Hosts::Host_t::Alias_t
GetAlias () const
net_alhem_1_0_server::Hosts::Host_t::Alias_tGetAlias ()
void SetAlias (const net_alhem_1_0_server::Hosts::Host_t::Alias_t &alias)
const
net_alhem_1_0_server::Hosts::Host_t::Ssl_t
GetSsl () const
net_alhem_1_0_server::Hosts::Host_t::Ssl_tGetSsl ()
void SetSsl (const net_alhem_1_0_server::Hosts::Host_t::Ssl_t &ssl)
const std::string & GetPre () const
void SetPre (const std::string &pre)
const std::list
< net_alhem_1_0_server::Hosts::Host_t::Mount_t > & 
GetMount () const
std::list
< net_alhem_1_0_server::Hosts::Host_t::Mount_t > & 
GetMount ()
void SetMount (const std::list< net_alhem_1_0_server::Hosts::Host_t::Mount_t > &mount)
const std::list
< net_alhem_1_0_server::Hosts::Host_t::Secure_t > & 
GetSecure () const
std::list
< net_alhem_1_0_server::Hosts::Host_t::Secure_t > & 
GetSecure ()
void SetSecure (const std::list< net_alhem_1_0_server::Hosts::Host_t::Secure_t > &secure)
const std::string & GetName () const
void SetName (const std::string &name)
const std::string & GetRootDir () const
void SetRootDir (const std::string &rootDir)
bool DocumentsIsSet () const
bool ScriptsIsSet () const
bool LogsIsSet () const
bool IndexDocumentIsSet () const
bool LogIsSet () const
bool AliasIsSet () const
bool SslIsSet () const
bool PreIsSet () const
bool MountIsSet () const
bool SecureIsSet () const
bool NameIsSet () const
bool RootDirIsSet () const

Private Attributes

std::string _element_documents
std::string _element_scripts
std::string _element_logs
std::string _element_indexDocument
std::list
< net_alhem_1_0_server::Log
_element_log
net_alhem_1_0_server::Hosts::Host_t::Alias_t _element_alias
net_alhem_1_0_server::Hosts::Host_t::Ssl_t _element_ssl
std::string _element_pre
std::list
< net_alhem_1_0_server::Hosts::Host_t::Mount_t
_element_mount
std::list
< net_alhem_1_0_server::Hosts::Host_t::Secure_t
_element_secure
std::string _attribute_name
std::string _attribute_rootDir
bool _element_documents_is_set
bool _element_scripts_is_set
bool _element_logs_is_set
bool _element_indexDocument_is_set
bool _element_pre_is_set
bool _attribute_name_is_set
bool _attribute_rootDir_is_set

Classes

class  Alias_t
class  Mount_t
class  Secure_t
class  Ssl_t


Detailed Description

Definition at line 296 of file Iconf.h.


Constructor & Destructor Documentation

AJP13::net_alhem_1_0_server::Hosts::Host_t::Host_t (  ) 

Definition at line 1027 of file Iconf.cpp.

01028 : _element_documents_is_set(false)
01029 , _element_scripts_is_set(false)
01030 , _element_logs_is_set(false)
01031 , _element_indexDocument_is_set(false)
01032 , _element_pre_is_set(false)
01033 , _attribute_name_is_set(false)
01034 , _attribute_rootDir_is_set(false)
01035 {
01036 }

AJP13::net_alhem_1_0_server::Hosts::Host_t::Host_t ( const Xml::XmlNode &  it  ) 

Definition at line 1040 of file Iconf.cpp.

References FromXml().

01041 : _element_documents_is_set(false)
01042 , _element_scripts_is_set(false)
01043 , _element_logs_is_set(false)
01044 , _element_indexDocument_is_set(false)
01045 , _element_pre_is_set(false)
01046 , _attribute_name_is_set(false)
01047 , _attribute_rootDir_is_set(false)
01048 {
01049         FromXml(it);
01050 }

virtual AJP13::net_alhem_1_0_server::Hosts::Host_t::~Host_t (  )  [inline, virtual]

Definition at line 439 of file Iconf.h.

00439 {}


Member Function Documentation

void AJP13::net_alhem_1_0_server::Hosts::Host_t::FromXml ( const Xml::XmlNode &  it  ) 

Definition at line 1054 of file Iconf.cpp.

References _element_alias, _element_log, _element_mount, _element_secure, _element_ssl, AJP13::net_alhem_1_0_server::Hosts::Host_t::Ssl_t::FromXml(), AJP13::net_alhem_1_0_server::Hosts::Host_t::Alias_t::FromXml(), SetDocuments(), SetIndexDocument(), SetLogs(), SetName(), SetPre(), SetRootDir(), and SetScripts().

Referenced by Host_t().

01055 {
01056         if (it.Exists("documents"))
01057                 SetDocuments( it["documents"] );
01058         if (it.Exists("scripts"))
01059                 SetScripts( it["scripts"] );
01060         if (it.Exists("logs"))
01061                 SetLogs( it["logs"] );
01062         if (it.Exists("indexDocument"))
01063                 SetIndexDocument( it["indexDocument"] );
01064         {
01065                 Xml::XmlNode n(it, "log");
01066                 while (n)
01067                 {
01068                         net_alhem_1_0_server::Log tmp(n);
01069                         _element_log.push_back( tmp );
01070                         ++n;
01071                 }
01072         }
01073         {
01074                 Xml::XmlNode n(it, "alias");
01075                 if (n)
01076                         _element_alias.FromXml( n );
01077         }
01078         {
01079                 Xml::XmlNode n(it, "ssl");
01080                 if (n)
01081                         _element_ssl.FromXml( n );
01082         }
01083         if (it.Exists("pre"))
01084                 SetPre( it["pre"] );
01085         {
01086                 Xml::XmlNode n(it, "mount");
01087                 while (n)
01088                 {
01089                         net_alhem_1_0_server::Hosts::Host_t::Mount_t tmp(n);
01090                         _element_mount.push_back( tmp );
01091                         ++n;
01092                 }
01093         }
01094         {
01095                 Xml::XmlNode n(it, "secure");
01096                 while (n)
01097                 {
01098                         net_alhem_1_0_server::Hosts::Host_t::Secure_t tmp(n);
01099                         _element_secure.push_back( tmp );
01100                         ++n;
01101                 }
01102         }
01103         SetName(it.GetProperty("name"));
01104         SetRootDir(it.GetProperty("rootDir"));
01105 }

const std::string AJP13::net_alhem_1_0_server::Hosts::Host_t::ToString ( const std::string &  name = ""  )  const

Definition at line 1109 of file Iconf.cpp.

References _element_alias, _element_documents, _element_documents_is_set, _element_indexDocument, _element_indexDocument_is_set, _element_log, _element_logs, _element_logs_is_set, _element_mount, _element_pre, _element_pre_is_set, _element_scripts, _element_scripts_is_set, _element_secure, _element_ssl, GetName(), GetRootDir(), AJP13::net_alhem_1_0_server::Hosts::Host_t::Secure_t::ToString(), AJP13::net_alhem_1_0_server::Hosts::Host_t::Mount_t::ToString(), AJP13::net_alhem_1_0_server::Hosts::Host_t::Ssl_t::ToString(), AJP13::net_alhem_1_0_server::Hosts::Host_t::Alias_t::ToString(), and AJP13::net_alhem_1_0_server::Log::ToString().

Referenced by AJP13::net_alhem_1_0_server::Hosts::ToString().

01110 {
01111         std::string r;
01112         if (!name.empty())
01113                 r += "<" + name;
01114         r += " name='" + GetName() + "'";
01115         r += " rootDir='" + GetRootDir() + "'";
01116         r += ">";
01117         if (_element_documents_is_set)
01118                 r += "<documents>" + _element_documents + "</documents>";
01119         if (_element_scripts_is_set)
01120                 r += "<scripts>" + _element_scripts + "</scripts>";
01121         if (_element_logs_is_set)
01122                 r += "<logs>" + _element_logs + "</logs>";
01123         if (_element_indexDocument_is_set)
01124                 r += "<indexDocument>" + _element_indexDocument + "</indexDocument>";
01125         for (std::list<net_alhem_1_0_server::Log>::const_iterator it = _element_log.begin(); it != _element_log.end(); it++)
01126         {
01127                 const net_alhem_1_0_server::Log& ref = *it;
01128                 r += ref.ToString("log");
01129         }
01130         r += _element_alias.ToString("alias");
01131         r += _element_ssl.ToString("ssl");
01132         if (_element_pre_is_set)
01133                 r += "<pre>" + _element_pre + "</pre>";
01134         for (std::list<net_alhem_1_0_server::Hosts::Host_t::Mount_t>::const_iterator it = _element_mount.begin(); it != _element_mount.end(); it++)
01135         {
01136                 const net_alhem_1_0_server::Hosts::Host_t::Mount_t& ref = *it;
01137                 r += ref.ToString("mount");
01138         }
01139         for (std::list<net_alhem_1_0_server::Hosts::Host_t::Secure_t>::const_iterator it = _element_secure.begin(); it != _element_secure.end(); it++)
01140         {
01141                 const net_alhem_1_0_server::Hosts::Host_t::Secure_t& ref = *it;
01142                 r += ref.ToString("secure");
01143         }
01144         if (!name.empty())
01145                 r += "</" + name + ">";
01146         return r;
01147 }

bool AJP13::net_alhem_1_0_server::Hosts::Host_t::IsSet (  )  const

const std::string & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetDocuments (  )  const

Definition at line 1158 of file Iconf.cpp.

References _element_documents.

01159 {
01160         return _element_documents;
01161 }

void AJP13::net_alhem_1_0_server::Hosts::Host_t::SetDocuments ( const std::string &  documents  ) 

Definition at line 1164 of file Iconf.cpp.

References _element_documents, and _element_documents_is_set.

Referenced by FromXml().

01165 {
01166         _element_documents = documents;
01167         _element_documents_is_set = true;
01168 }

const std::string & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetScripts (  )  const

Definition at line 1172 of file Iconf.cpp.

References _element_scripts.

01173 {
01174         return _element_scripts;
01175 }

void AJP13::net_alhem_1_0_server::Hosts::Host_t::SetScripts ( const std::string &  scripts  ) 

Definition at line 1178 of file Iconf.cpp.

References _element_scripts, and _element_scripts_is_set.

Referenced by FromXml().

01179 {
01180         _element_scripts = scripts;
01181         _element_scripts_is_set = true;
01182 }

const std::string & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetLogs (  )  const

Definition at line 1186 of file Iconf.cpp.

References _element_logs.

01187 {
01188         return _element_logs;
01189 }

void AJP13::net_alhem_1_0_server::Hosts::Host_t::SetLogs ( const std::string &  logs  ) 

Definition at line 1192 of file Iconf.cpp.

References _element_logs, and _element_logs_is_set.

Referenced by FromXml().

01193 {
01194         _element_logs = logs;
01195         _element_logs_is_set = true;
01196 }

const std::string & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetIndexDocument (  )  const

Definition at line 1200 of file Iconf.cpp.

References _element_indexDocument.

01201 {
01202         return _element_indexDocument;
01203 }

void AJP13::net_alhem_1_0_server::Hosts::Host_t::SetIndexDocument ( const std::string &  indexDocument  ) 

Definition at line 1206 of file Iconf.cpp.

References _element_indexDocument, and _element_indexDocument_is_set.

Referenced by FromXml().

01207 {
01208         _element_indexDocument = indexDocument;
01209         _element_indexDocument_is_set = true;
01210 }

const std::list< net_alhem_1_0_server::Log > & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetLog (  )  const

Definition at line 1214 of file Iconf.cpp.

References _element_log.

01215 {
01216         return _element_log;
01217 }

std::list< net_alhem_1_0_server::Log > & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetLog (  ) 

Definition at line 1220 of file Iconf.cpp.

References _element_log.

01221 {
01222         return _element_log;
01223 }

void AJP13::net_alhem_1_0_server::Hosts::Host_t::SetLog ( const std::list< net_alhem_1_0_server::Log > &  log  ) 

Definition at line 1226 of file Iconf.cpp.

References _element_log.

01227 {
01228         _element_log = log;
01229 }

const net_alhem_1_0_server::Hosts::Host_t::Alias_t & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetAlias (  )  const

Definition at line 1233 of file Iconf.cpp.

References _element_alias.

01234 {
01235         return _element_alias;
01236 }

net_alhem_1_0_server::Hosts::Host_t::Alias_t & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetAlias (  ) 

Definition at line 1239 of file Iconf.cpp.

References _element_alias.

01240 {
01241         return _element_alias;
01242 }

void AJP13::net_alhem_1_0_server::Hosts::Host_t::SetAlias ( const net_alhem_1_0_server::Hosts::Host_t::Alias_t alias  ) 

Definition at line 1245 of file Iconf.cpp.

References _element_alias.

01246 {
01247         _element_alias = alias;
01248 }

const net_alhem_1_0_server::Hosts::Host_t::Ssl_t & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetSsl (  )  const

Definition at line 1252 of file Iconf.cpp.

References _element_ssl.

01253 {
01254         return _element_ssl;
01255 }

net_alhem_1_0_server::Hosts::Host_t::Ssl_t & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetSsl (  ) 

Definition at line 1258 of file Iconf.cpp.

References _element_ssl.

01259 {
01260         return _element_ssl;
01261 }

void AJP13::net_alhem_1_0_server::Hosts::Host_t::SetSsl ( const net_alhem_1_0_server::Hosts::Host_t::Ssl_t ssl  ) 

Definition at line 1264 of file Iconf.cpp.

References _element_ssl.

01265 {
01266         _element_ssl = ssl;
01267 }

const std::string & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetPre (  )  const

Definition at line 1271 of file Iconf.cpp.

References _element_pre.

01272 {
01273         return _element_pre;
01274 }

void AJP13::net_alhem_1_0_server::Hosts::Host_t::SetPre ( const std::string &  pre  ) 

Definition at line 1277 of file Iconf.cpp.

References _element_pre, and _element_pre_is_set.

Referenced by FromXml().

01278 {
01279         _element_pre = pre;
01280         _element_pre_is_set = true;
01281 }

const std::list< net_alhem_1_0_server::Hosts::Host_t::Mount_t > & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetMount (  )  const

Definition at line 1285 of file Iconf.cpp.

References _element_mount.

01286 {
01287         return _element_mount;
01288 }

std::list< net_alhem_1_0_server::Hosts::Host_t::Mount_t > & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetMount (  ) 

Definition at line 1291 of file Iconf.cpp.

References _element_mount.

01292 {
01293         return _element_mount;
01294 }

void AJP13::net_alhem_1_0_server::Hosts::Host_t::SetMount ( const std::list< net_alhem_1_0_server::Hosts::Host_t::Mount_t > &  mount  ) 

Definition at line 1297 of file Iconf.cpp.

References _element_mount.

01298 {
01299         _element_mount = mount;
01300 }

const std::list< net_alhem_1_0_server::Hosts::Host_t::Secure_t > & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetSecure (  )  const

Definition at line 1304 of file Iconf.cpp.

References _element_secure.

01305 {
01306         return _element_secure;
01307 }

std::list< net_alhem_1_0_server::Hosts::Host_t::Secure_t > & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetSecure (  ) 

Definition at line 1310 of file Iconf.cpp.

References _element_secure.

01311 {
01312         return _element_secure;
01313 }

void AJP13::net_alhem_1_0_server::Hosts::Host_t::SetSecure ( const std::list< net_alhem_1_0_server::Hosts::Host_t::Secure_t > &  secure  ) 

Definition at line 1316 of file Iconf.cpp.

References _element_secure.

01317 {
01318         _element_secure = secure;
01319 }

const std::string & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetName (  )  const

Definition at line 1358 of file Iconf.cpp.

References _attribute_name.

Referenced by ToString().

01359 {
01360         return _attribute_name;
01361 }

void AJP13::net_alhem_1_0_server::Hosts::Host_t::SetName ( const std::string &  name  ) 

Definition at line 1364 of file Iconf.cpp.

References _attribute_name, and _attribute_name_is_set.

Referenced by FromXml().

01365 {
01366         _attribute_name = name;
01367         _attribute_name_is_set = true;
01368 }

const std::string & AJP13::net_alhem_1_0_server::Hosts::Host_t::GetRootDir (  )  const

Definition at line 1372 of file Iconf.cpp.

References _attribute_rootDir.

Referenced by ToString().

01373 {
01374         return _attribute_rootDir;
01375 }

void AJP13::net_alhem_1_0_server::Hosts::Host_t::SetRootDir ( const std::string &  rootDir  ) 

Definition at line 1378 of file Iconf.cpp.

References _attribute_rootDir, and _attribute_rootDir_is_set.

Referenced by FromXml().

01379 {
01380         _attribute_rootDir = rootDir;
01381         _attribute_rootDir_is_set = true;
01382 }

bool AJP13::net_alhem_1_0_server::Hosts::Host_t::DocumentsIsSet (  )  const [inline]

Definition at line 487 of file Iconf.h.

References _element_documents_is_set.

Referenced by IsSet().

00487 { return _element_documents_is_set; }

bool AJP13::net_alhem_1_0_server::Hosts::Host_t::ScriptsIsSet (  )  const [inline]

Definition at line 488 of file Iconf.h.

References _element_scripts_is_set.

Referenced by IsSet().

00488 { return _element_scripts_is_set; }

bool AJP13::net_alhem_1_0_server::Hosts::Host_t::LogsIsSet (  )  const [inline]

Definition at line 489 of file Iconf.h.

References _element_logs_is_set.

Referenced by IsSet().

00489 { return _element_logs_is_set; }

bool AJP13::net_alhem_1_0_server::Hosts::Host_t::IndexDocumentIsSet (  )  const [inline]

Definition at line 490 of file Iconf.h.

References _element_indexDocument_is_set.

Referenced by IsSet().

bool AJP13::net_alhem_1_0_server::Hosts::Host_t::LogIsSet (  )  const

Definition at line 1323 of file Iconf.cpp.

References _element_log.

Referenced by IsSet().

01324 {
01325         return !_element_log.empty();
01326 }

bool AJP13::net_alhem_1_0_server::Hosts::Host_t::AliasIsSet (  )  const

Definition at line 1330 of file Iconf.cpp.

References _element_alias, and AJP13::net_alhem_1_0_server::Hosts::Host_t::Alias_t::IsSet().

Referenced by IsSet().

01331 {
01332         return _element_alias.IsSet();
01333 }

bool AJP13::net_alhem_1_0_server::Hosts::Host_t::SslIsSet (  )  const

Definition at line 1337 of file Iconf.cpp.

References _element_ssl, and AJP13::net_alhem_1_0_server::Hosts::Host_t::Ssl_t::IsSet().

Referenced by IsSet().

01338 {
01339         return _element_ssl.IsSet();
01340 }

bool AJP13::net_alhem_1_0_server::Hosts::Host_t::PreIsSet (  )  const [inline]

Definition at line 494 of file Iconf.h.

References _element_pre_is_set.

Referenced by IsSet().

00494 { return _element_pre_is_set; }

bool AJP13::net_alhem_1_0_server::Hosts::Host_t::MountIsSet (  )  const

Definition at line 1344 of file Iconf.cpp.

References _element_mount.

Referenced by IsSet().

01345 {
01346         return !_element_mount.empty();
01347 }

bool AJP13::net_alhem_1_0_server::Hosts::Host_t::SecureIsSet (  )  const

Definition at line 1351 of file Iconf.cpp.

References _element_secure.

Referenced by IsSet().

01352 {
01353         return !_element_secure.empty();
01354 }

bool AJP13::net_alhem_1_0_server::Hosts::Host_t::NameIsSet (  )  const [inline]

Definition at line 498 of file Iconf.h.

References _attribute_name_is_set.

Referenced by IsSet().

00498 { return _attribute_name_is_set; }

bool AJP13::net_alhem_1_0_server::Hosts::Host_t::RootDirIsSet (  )  const [inline]

Definition at line 499 of file Iconf.h.

References _attribute_rootDir_is_set.

Referenced by IsSet().

00499 { return _attribute_rootDir_is_set; }


Member Data Documentation

Definition at line 502 of file Iconf.h.

Referenced by GetDocuments(), SetDocuments(), and ToString().

Definition at line 503 of file Iconf.h.

Referenced by GetScripts(), SetScripts(), and ToString().

Definition at line 504 of file Iconf.h.

Referenced by GetLogs(), SetLogs(), and ToString().

Definition at line 505 of file Iconf.h.

Referenced by GetIndexDocument(), SetIndexDocument(), and ToString().

Definition at line 506 of file Iconf.h.

Referenced by FromXml(), GetLog(), LogIsSet(), SetLog(), and ToString().

Definition at line 507 of file Iconf.h.

Referenced by AliasIsSet(), FromXml(), GetAlias(), SetAlias(), and ToString().

Definition at line 508 of file Iconf.h.

Referenced by FromXml(), GetSsl(), SetSsl(), SslIsSet(), and ToString().

Definition at line 509 of file Iconf.h.

Referenced by GetPre(), SetPre(), and ToString().

Definition at line 510 of file Iconf.h.

Referenced by FromXml(), GetMount(), MountIsSet(), SetMount(), and ToString().

Definition at line 511 of file Iconf.h.

Referenced by FromXml(), GetSecure(), SecureIsSet(), SetSecure(), and ToString().

Definition at line 512 of file Iconf.h.

Referenced by GetName(), and SetName().

Definition at line 513 of file Iconf.h.

Referenced by GetRootDir(), and SetRootDir().

Definition at line 514 of file Iconf.h.

Referenced by DocumentsIsSet(), SetDocuments(), and ToString().

Definition at line 515 of file Iconf.h.

Referenced by ScriptsIsSet(), SetScripts(), and ToString().

Definition at line 516 of file Iconf.h.

Referenced by LogsIsSet(), SetLogs(), and ToString().

Definition at line 517 of file Iconf.h.

Referenced by IndexDocumentIsSet(), SetIndexDocument(), and ToString().

Definition at line 518 of file Iconf.h.

Referenced by PreIsSet(), SetPre(), and ToString().

Definition at line 519 of file Iconf.h.

Referenced by NameIsSet(), and SetName().

Definition at line 520 of file Iconf.h.

Referenced by RootDirIsSet(), and SetRootDir().


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

Generated on Sun Oct 11 10:59:06 2009 for Xml Schema class generator by  doxygen 1.5.5