JezK
Edit File: page-CreateDirConfig_cpp_cxxcodebuilder.ri
U:RDoc::TopLevel[ i I":src/apache2_module/CreateDirConfig.cpp.cxxcodebuilder:ETcRDoc::Parser::Simpleo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;[I"># Phusion Passenger - https://www.phusionpassenger.com/ ;TI"5# Copyright (c) 2010-2016 Phusion Holding B.V. ;TI"# ;TI"L# "Passenger", "Phusion Passenger" and "Union Station" are registered ;TI"+# trademarks of Phusion Holding B.V. ;TI"# ;TI"U# Permission is hereby granted, free of charge, to any person obtaining a copy ;TI"V# of this software and associated documentation files (the "Software"), to deal ;TI"U# in the Software without restriction, including without limitation the rights ;TI"R# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ;TI"N# copies of the Software, and to permit persons to whom the Software is ;TI"A# furnished to do so, subject to the following conditions: ;TI"# ;TI"S# The above copyright notice and this permission notice shall be included in ;TI"<# all copies or substantial portions of the Software. ;TI"# ;TI"S# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ;TI"Q# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ;TI"T# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ;TI"O# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ;TI"V# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ;TI"R# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ;TI"# THE SOFTWARE.;To:RDoc::Markup::BlankLine o; ;[I"=# This file uses the cxxcodebuilder API. Learn more at: ;TI"0# https://github.com/phusion/cxxcodebuilder;T@$o; ;[I"7require 'phusion_passenger/apache2/config_options';T@$o; ;[I" def main;To:RDoc::Markup::Verbatim;[#I"/comment copyright_header_for(__FILE__), 1 ;TI" ;TI"separator ;TI" ;TI"comment %q{ ;TI"_ CreateDirConfig.cpp is automatically generated from CreateDirConfig.cpp.cxxcodebuilder, ;TI"_ using definitions from src/ruby_supportlib/phusion_passenger/apache2/config_options.rb. ;TI"2 Edits to CreateDirConfig.cpp will be lost. ;TI" ;TI"& To update CreateDirConfig.cpp: ;TI" rake apache2 ;TI" ;TI"5 To force regeneration of CreateDirConfig.cpp: ;TI"6 rm -f src/apache2_module/CreateDirConfig.cpp ;TI"5 rake src/apache2_module/CreateDirConfig.cpp ;TI"} ;TI" ;TI"separator ;TI" ;TI"Wfilter_eligible_options(APACHE2_DIRECTORY_CONFIGURATION_OPTIONS).each do |option| ;TI"# if option[:type] == :string ;TI"A add_code("config->#{struct_field_for(option)} = NULL;") ;TI"' elsif option[:type] == :integer ;TI"L add_code("config->#{struct_field_for(option)} = UNSET_INT_VALUE;") ;TI"$ elsif option[:type] == :flag ;TI"M add_code("config->#{struct_field_for(option)} = DirConfig::UNSET;") ;TI" else ;TI"Z raise "Unknown option type #{option[:type].inspect} for option #{option[:name]}" ;TI" end ;TI" end ;T:@format0o; ;[I"end;T@$o; ;[I")def filter_eligible_options(options);To;;[ I" options.reject do |option| ;TI" option[:alias_for] || ;TI", option.fetch(:field, true).nil? || ;TI"% option[:field].to_s =~ /\./ ;TI" end ;T;0o; ;[I"end;T@$o; ;[I"!def struct_field_for(option);To;;[I" if option.has_key?(:field) ;TI" option[:field] ;TI" else ;TI"4 result = option[:name].sub(/^Passenger/, '') ;TI") result[0] = result[0..0].downcase ;TI" result ;TI" end ;T;0o; ;[I"end;T@$o; ;[I" main;T: @file@:0@omit_headings_from_table_of_contents_below0