/// Create an AsChain. // // Ownership of `ifcs` passes to this object. // // See `AsChainLink::create_as_chain` for rules re releasing the // created references. AsChain::AsChain(AsChainTable* as_chain_table, const SessionCase& session_case, const std::string& served_user, bool is_registered, SAS::TrailId trail, Ifcs& ifcs, ACR* acr, FIFCService* fifc_service, IFCConfiguration ifc_configuration) : _as_chain_table(as_chain_table), _refs(1), // for the initial chain link being returned _as_info(ifcs.size() + 1), _odi_tokens(), _responsive(ifcs.size() + 1), _session_case(session_case), _served_user(served_user), _is_registered(is_registered), _trail(trail), _ifcs(ifcs), _acr(acr), _fallback_ifcs({}), _ifc_configuration(ifc_configuration), _using_standard_ifcs(true), _root(NULL) { TRC_DEBUG("Creating AsChain %p with %d IFCs and adding to map", this, ifcs.size()); _as_chain_table->register_(this, _odi_tokens); TRC_DEBUG("Attached ACR (%p) to chain", _acr); // We need to initialize `_responsive` as bools are PODs which are not // initialized. for(std::vector<bool>::iterator it = _responsive.begin(); it != _responsive.end(); ++it) { *it = false; } if ((fifc_service) && (_ifc_configuration._apply_fallback_ifcs)) { _root = new rapidxml::xml_document<>; _fallback_ifcs = fifc_service->get_fallback_ifcs(_root); } }
/// Create an AsChain. // // Ownership of `ifcs` passes to this object. // // See `AsChainLink::create_as_chain` for rules re releasing the // created references. AsChain::AsChain(AsChainTable* as_chain_table, const SessionCase& session_case, const std::string& served_user, bool is_registered, SAS::TrailId trail, Ifcs& ifcs, ACR* acr) : _as_chain_table(as_chain_table), _refs(1), // for the initial chain link being returned _as_info(ifcs.size() + 1), _odi_tokens(), _session_case(session_case), _served_user(served_user), _is_registered(is_registered), _trail(trail), _ifcs(ifcs), _acr(acr) { LOG_DEBUG("Creating AsChain %p with %d IFC and adding to map", this, ifcs.size()); _as_chain_table->register_(this, _odi_tokens); LOG_DEBUG("Attached ACR (%p) to chain", _acr); }