// File: /workspace/github_cpp_makefile_star2_O1/errantlinguist[P]Forecast/src/forecast_io/parsers/NotifyingForecastParser.cpp
// Function: forecast_io::parsers::NotifyingForecastParser::parseAttribute(forecast_io::parsers::ForecastAttribute const&, json_object* const&)
void NotifyingForecastParser::parseAttribute(const ForecastAttribute& attribute,
		json_object* const & pValue)
{
	switch (attribute)
	{
	case ForecastAttribute::ALERTS:
	{
		alertsParser.parse(pValue);
		break;
	}
	case ForecastAttribute::CURRENTLY:
	{
		synchronicDataPointParser.parse(pValue);
		break;
	}
	case ForecastAttribute::DAILY:
	{
		// TODO: Implement parsing of "daily" data points
		break;
	}
	case ForecastAttribute::FLAGS:
	{
		flagParser.parse(pValue);
		break;
	}
	case ForecastAttribute::HOURLY:
	{
		// TODO: Implement parsing of "hourly" data points
		break;
	}
	case ForecastAttribute::LATITUDE:
	{
		const double latitude(json_object_get_double(pValue));
		for (listeners::ForecastDetailsListener* const & pListener : getListeners())
		{
			pListener->notifyLatitude(latitude);
		}
		break;
	}
	case ForecastAttribute::LONGITUDE:
	{
		const double longitude(json_object_get_double(pValue));
		for (listeners::ForecastDetailsListener* const & pListener : getListeners())
		{
			pListener->notifyLongitude(longitude);
		}
		break;
	}
	case ForecastAttribute::MINUTELY:
	{
		// TODO: Implement parsing of "minutely" data points
		break;
	}
	case ForecastAttribute::OFFSET:
	{
		const signed char offset(
				static_cast<signed char>(json_object_get_int64(pValue)));
		for (listeners::ForecastDetailsListener* const & pListener : getListeners())
		{
			pListener->notifyOffset(offset);
		}
		break;
	}
	case ForecastAttribute::TIMEZONE:
	{
		const std::string timezone(json_object_get_string(pValue));
		for (listeners::ForecastDetailsListener* const & pListener : getListeners())
		{
			pListener->notifyTimezone(timezone);
		}
		break;
	}
	default:
	{
		throw std::logic_error(
				createUndefinedAttributeErrorMessage(ForecastAttribute_NAME,
						attribute));
		break;
	}
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl (%rsi), %eax
cmpq $0x9, %rax
ja 0x26c77
movq %rdi, %rbx
leaq 0x5826(%rip), %rcx      # 0x2c368
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x58(%rbx), %rdi
jmp 0x26ba2
movq (%rdx), %rdi
callq 0x96c0
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rax, %rsi
callq 0xc420
addq $0x28, %rbx
leaq 0x10(%rsp), %r14
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x26c53
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x20(%rax)
jmp 0x26b7d
movq 0x50(%rbx), %rdi
jmp 0x26ba2
movq 0x60(%rbx), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq %rdx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
movq (%rdx), %rdi
callq 0x9410
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
je 0x26b4b
movsd %xmm0, 0x8(%rsp)
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
movsd 0x8(%rsp), %xmm0
callq *0x18(%rax)
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x26bcd
jmp 0x26b4b
movq (%rdx), %rdi
callq 0x9410
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
je 0x26b4b
movsd %xmm0, 0x8(%rsp)
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
movsd 0x8(%rsp), %xmm0
callq *0x10(%rax)
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x26c05
jmp 0x26b4b
movq (%rdx), %rdi
callq 0x9430
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x26b4b
movsbl %al, %ebx
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movl %ebx, %esi
callq *0x28(%rax)
movq (%r14), %r14
testq %r14, %r14
jne 0x26c3a
jmp 0x26b4b
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26b4b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x90a0
jmp 0x26b4b
movq %rsi, %r14
movl $0x10, %edi
callq 0x91c0
movq %rax, %rbx
leaq 0x19242(%rip), %rsi     # 0x3fed0
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0x26dd6
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x90d0
xorl %ebp, %ebp
movq 0x18334(%rip), %rsi     # 0x3efe8
movq 0x1830d(%rip), %rdx     # 0x3efc8
movq %rbx, %rdi
callq 0x9370
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26ce9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x90a0
jmp 0x26ce9
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x26d1b
movq %rbx, %rdi
callq 0x9510
jmp 0x26d1b
movq %rax, %r14
jmp 0x26d1b
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26d1b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x90a0
movq %r14, %rdi
callq 0x9390
nop