RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
00001 /* currency_js.h -*- C++ -*- 00002 Jeremy Barnes, 11 December 2012 00003 Copyright (c) 2012 Datacratic Inc. All rights reserved. 00004 00005 */ 00006 00007 #pragma once 00008 00009 #include "bid_request_js.h" 00010 #include "rtbkit/common/currency.h" 00011 #include "soa/js/js_value.h" 00012 #include "v8.h" 00013 00014 00015 namespace Datacratic { 00016 namespace JS { 00017 00018 00019 /******************************************************************************/ 00020 /* AMOUNT */ 00021 /******************************************************************************/ 00022 00023 RTBKIT::Amount* from_js(const JSValue& value, RTBKIT::Amount**); 00024 RTBKIT::Amount from_js(const JSValue& value, RTBKIT::Amount*); 00025 void to_js(JSValue & value, const RTBKIT::Amount & amount); 00026 00028 void initCurrencyFunctions(v8::Handle<v8::Object>& target); 00029 00030 00031 /******************************************************************************/ 00032 /* CURRENCY POOL */ 00033 /******************************************************************************/ 00034 00035 // Wrappers for CurrencyPool are not implemented. 00036 RTBKIT::CurrencyPool from_js(const JSValue & value, RTBKIT::CurrencyPool *); 00037 void to_js(JSValue & value, const RTBKIT::CurrencyPool & c); 00038 00039 00040 /******************************************************************************/ 00041 /* LINE ITEMS */ 00042 /******************************************************************************/ 00043 00044 // Wrappers for LineItems are not implemented. 00045 RTBKIT::LineItems from_js(const JSValue & value, RTBKIT::LineItems *); 00046 void to_js(JSValue & value, const RTBKIT::LineItems & l); 00047 00048 } // namespace JS 00049 } // namespace RTB