Ejemplo n.º 1
0
 void checkExtractLine(const char* wkt, double start, double end, const char* expected)
 {
     string wktstr(wkt);
     GeomPtr linearGeom(reader.read(wktstr));
     LengthIndexedLine indexedLine(linearGeom.get());
     GeomPtr result(indexedLine.extractLine(start, end));
     checkExpected(result.get(), expected);
 }
Ejemplo n.º 2
0
 void runIndicesOfThenExtract(string const& inputStr, string const& subLineStr)
 {
     GeomPtr input(reader.read(inputStr));
     GeomPtr subLine(reader.read(subLineStr));
     GeomPtr result(indicesOfThenExtract(input.get(), subLine.get()));
     
     checkExpected(result.get(), subLine.get());
 }
Ejemplo n.º 3
0
    // VISITs
    virtual void visit(AstNodeFTaskRef* nodep, AstNUser*) {
	if (!nodep->user1Inc()) {  // Process only once.
	    cleanFileline(nodep);
	    UINFO(5,"   "<<nodep<<endl);
	    checkExpected(nodep);
	    // Due to a need to get the arguments, the ParseRefs are under here,
	    // rather than the NodeFTaskRef under the ParseRef.
	    if (nodep->namep()) {
		m_exp = AstParseRefExp::PX_FUNC;
		nodep->namep()->accept(*this);  // No next, we don't want to do the edit
		m_exp = AstParseRefExp::PX_NONE;
		if (!m_baseTextp) nodep->v3fatalSrc("No TEXT found to indicate function name");
		nodep->name(m_baseTextp->text());
		nodep->dotted(m_dotText);
		nodep->namep()->unlinkFrBack()->deleteTree(); m_baseTextp=NULL;
	    }
	    nodep->iterateChildren(*this);
	}
    }
Ejemplo n.º 4
0
    virtual void visit(AstNode* nodep, AstNUser*) {
	// Default: Just iterate
	cleanFileline(nodep);
	checkExpected(nodep);  // So we detect node types we forgot to list here
	nodep->iterateChildren(*this);
    }
Ejemplo n.º 5
0
 void checkExpected(Geometry* result, string const& expected)
 {
     GeomPtr subLine(reader.read(expected));
     checkExpected(result, subLine.get());
 }
Ejemplo n.º 6
0
 virtual void processUtf8(unsigned chars, const char *value, const RtlFieldInfo * field)
 {
     checkExpected(field);
     stringResult = value;
     resultChars = chars;
 }
Ejemplo n.º 7
0
 virtual void processUnicode(unsigned chars, const UChar *value, const RtlFieldInfo * field)
 {
     checkExpected(field);
     unicodeResult = value;
     resultChars = chars;
 }
Ejemplo n.º 8
0
 virtual void processQString(unsigned len, const char *value, const RtlFieldInfo * field)
 {
     checkExpected(field);
     stringResult = value;
     resultChars = len;
 }
Ejemplo n.º 9
0
 virtual void processUDecimal(const void *value, unsigned digits, unsigned precision, const RtlFieldInfo * field)
 {
     checkExpected(field);
     decimalResult.setDecimal(digits, precision, value);
 }
Ejemplo n.º 10
0
 virtual void processReal(double value, const RtlFieldInfo * field)
 {
     checkExpected(field);
     doubleResult = value;
 }
Ejemplo n.º 11
0
 virtual void processUInt(unsigned __int64 value, const RtlFieldInfo * field)
 {
     checkExpected(field);
     uintResult = value;
 }
Ejemplo n.º 12
0
 virtual void processInt(__int64 value, const RtlFieldInfo * field)
 {
     checkExpected(field);
     intResult = value;
 }
Ejemplo n.º 13
0
 virtual void processBool(bool value, const RtlFieldInfo * field)
 {
     checkExpected(field);
     boolResult = value;
 }