JSValue jsNotationSystemId(ExecState* exec, JSValue slotBase, const Identifier&) { JSNotation* castedThis = static_cast<JSNotation*>(asObject(slotBase)); UNUSED_PARAM(exec); Notation* imp = static_cast<Notation*>(castedThis->impl()); JSValue result = jsStringOrNull(exec, imp->systemId()); return result; }
Resistor::Resistor(float _resistance,float _tolerance) { resistance=_resistance; tolerance=_tolerance; closestStandardResistor(); calcColors(); calcTolcolors(); Notation notation; notation.toHumanNotation(resistance,modifier); }
void Resistor::calcResistance() { map<string,int> colcodeMap=constructColcodeMap(); unsigned int i; resistance=0; for (i=0;i<colors.size()-1;i++) { resistance=resistance*10+colcodeMap[colors[i]]; colcodes.push_back(colcodeMap[colors[i]]); } resistance=resistance*pow(10,colcodeMap[colors[i]]); colcodes.push_back(colcodeMap[colors[i]]); Notation notation; notation.toHumanNotation(resistance,modifier); }
/* * Runs the test case. */ void runTest() { Document doc; DocumentType docType; NamedNodeMap notations; Notation notationNode; String notationName; doc = (Document) baseT::load("staff", false); docType = doc.getDoctype(); baseT::assertNotNull(docType, __LINE__, __FILE__); notations = docType.getNotations(); baseT::assertNotNull(notations, __LINE__, __FILE__); notationNode = (Notation) notations.getNamedItem(SA::construct_from_utf8("notation1")); baseT::skipIfNull(notationNode); notationName = notationNode.getNodeName(); baseT::assertEquals("notation1", notationName, __LINE__, __FILE__); }
/* * Runs the test case. */ void runTest() { Document doc; DocumentType docType; NamedNodeMap notations; Notation notationNode; String systemId; doc = (Document) baseT::load("staff", false); docType = doc.getDoctype(); baseT::assertNotNull(docType, __LINE__, __FILE__); notations = docType.getNotations(); baseT::assertNotNull(notations, __LINE__, __FILE__); notationNode = (Notation) notations.getNamedItem(SA::construct_from_utf8("notation2")); baseT::skipIfNull(notationNode); systemId = notationNode.getSystemId(); baseT::assertURIEquals("uriEquals", "", "", "", "notation2File", "", "", "", false, systemId); }
Notation::Notation(const Notation& notation) : position_(notation.position_) , initial_position_(notation.initial_position_) , black_name_(notation.black_name_) , white_name_(notation.white_name_) , handicap_(notation.handicap_) , output_initial_position_(notation.output_initial_position_) , kifu_infos_(notation.kifu_infos_) , result_(notation.result_) , winner_(notation.winner_) , moves_(notation.moves_) { this->Jump(notation.number()); }
//-------------------------------------------------------------- void testApp::setup() { ofSetFrameRate(60); ofSetVerticalSync(true); /// ram setup // ------------------ ramInitialize(10000, true); /// scenes setup // ------------------ ramSceneManager& sceneManager = ramSceneManager::instance(); sceneManager.addScene( movingCam.getPtr() ); sceneManager.addScene( drawLines.getPtr() ); sceneManager.addScene( bigbox.getPtr() ); sceneManager.addScene( future.getPtr() ); sceneManager.addScene( donuts.getPtr() ); sceneManager.addScene( stamp.getPtr() ); sceneManager.addScene( expansion.getPtr() ); // ignore win32 #ifndef TARGET_WIN32 sceneManager.addScene( particles.getPtr() ); #endif sceneManager.addScene( abacus.getPtr() ); sceneManager.addScene( soundcube.getPtr() ); sceneManager.addScene( upsideDown.getPtr() ); sceneManager.addScene( kepler.getPtr() ); sceneManager.addScene( hastyChase.getPtr() ); sceneManager.addScene( colorGrid.getPtr() ); sceneManager.addScene( threePoints.getPtr() ); sceneManager.addScene( fourPoints.getPtr() ); sceneManager.addScene( chain.getPtr() ); sceneManager.addScene( monster.getPtr() ); sceneManager.addScene( laban.getPtr() ); sceneManager.addScene( notation.getPtr() ); }
static v8::Handle<v8::Value> systemIdAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { Notation* imp = V8Notation::toNative(info.Holder()); return v8StringOrNull(imp->systemId(), info.GetIsolate()); }