Lines Matching refs:std
63 static bool GetClassNameFromFileName(const std::string &FileName, in GetClassNameFromFileName()
64 std::string &ClassName) { in GetClassNameFromFileName()
320 static std::string GetTypeName(const RSExportType *ET) { in GetTypeName()
344 std::string ElementTypeName = GetTypeName(CAT->getElementType()); in GetTypeName()
609 const std::string &ClassName, in genScriptClass()
610 std::string &ErrorMsg) { in genScriptClass()
649 C.indent() << "// Constructor" << std::endl; in genScriptClassConstructor()
659 C.indent() << "super(rs, resources, id);" << std::endl; in genScriptClassConstructor()
691 for (std::set<std::string>::iterator I = C.mTypesToCheck.begin(), in genScriptClassConstructor()
695 C.indent() << "private Element __" << *I << ";" << std::endl; in genScriptClassConstructor()
702 const std::string &VarName, in genInitBoolExportVariable()
711 << ";" << std::endl; in genInitBoolExportVariable()
718 const std::string &VarName, in genInitPrimitiveExportVariable()
754 C.out() << ";" << std::endl; in genInitPrimitiveExportVariable()
761 const std::string &VarName, in genInitExportVariable()
778 std::cout << "Initializer which is non-NULL to pointer type variable " in genInitExportVariable()
779 "will be ignored" << std::endl; in genInitExportVariable()
789 std::string Name = VarName + "." + GetVectorAccessor(i); in genInitExportVariable()
796 << GetVectorTypeName(EVT) << "();" << std::endl; in genInitExportVariable()
799 std::min(static_cast<unsigned>(EVT->getNumElement()), in genInitExportVariable()
803 std::string Name = VarName + "." + GetVectorAccessor(i); in genInitExportVariable()
833 << "."RS_TYPE_ITEM_CLASS_NAME"();" << std::endl; in genInitExportVariable()
840 std::string FieldName = VarName + "." + F->getName(); in genInitExportVariable()
866 << std::endl; in genExportVariable()
904 << std::endl; in genExportFunction()
914 Args.push_back(std::make_pair(GetTypeName((*I)->getType()), in genExportFunction()
929 << std::endl; in genExportFunction()
932 std::string FieldPackerName = EF->getName() + "_fp"; in genExportFunction()
938 << FieldPackerName << ");" << std::endl; in genExportFunction()
948 << std::endl; in genExportForEach()
956 Args.push_back(std::make_pair("Allocation", "ain")); in genExportForEach()
958 Args.push_back(std::make_pair("Allocation", "aout")); in genExportForEach()
966 Args.push_back(std::make_pair(GetTypeName((*I)->getType()), in genExportForEach()
988 C.indent() << "// Verify dimensions" << std::endl; in genExportForEach()
989 C.indent() << "Type tIn = ain.getType();" << std::endl; in genExportForEach()
990 C.indent() << "Type tOut = aout.getType();" << std::endl; in genExportForEach()
991 C.indent() << "if ((tIn.getCount() != tOut.getCount()) ||" << std::endl; in genExportForEach()
992 C.indent() << " (tIn.getX() != tOut.getX()) ||" << std::endl; in genExportForEach()
993 C.indent() << " (tIn.getY() != tOut.getY()) ||" << std::endl; in genExportForEach()
994 C.indent() << " (tIn.getZ() != tOut.getZ()) ||" << std::endl; in genExportForEach()
995 C.indent() << " (tIn.hasFaces() != tOut.hasFaces()) ||" << std::endl; in genExportForEach()
996 C.indent() << " (tIn.hasMipmaps() != tOut.hasMipmaps())) {" << std::endl; in genExportForEach()
999 C.out() << std::endl; in genExportForEach()
1000 C.indent() << "}" << std::endl; in genExportForEach()
1003 std::string FieldPackerName = EF->getName() + "_fp"; in genExportForEach()
1026 C.out() << ");" << std::endl; in genExportForEach()
1055 std::string TypeName = GetElementJavaTypeName(EPT->getType()); in genTypeInstance()
1058 << "(rs);" << std::endl; in genTypeInstance()
1075 << "(rs);" << std::endl; in genTypeInstance()
1086 std::string ClassName = RS_TYPE_CLASS_NAME_PREFIX + ERT->getName(); in genTypeInstance()
1089 ".createElement(rs);" << std::endl; in genTypeInstance()
1104 C.indent() << "// check " << VarName << std::endl; in genTypeCheck()
1112 std::string TypeName; in genTypeCheck()
1149 << TypeName << ")) {" << std::endl; in genTypeCheck()
1151 << TypeName << "!\");" << std::endl; in genTypeCheck()
1152 C.indent() << "}" << std::endl; in genTypeCheck()
1170 << EV->getName() << ";" << std::endl; in genPrimitiveTypeExportVariable()
1180 C.indent() << RS_EXPORT_VAR_PREFIX << EV->getName() << " = v;" << std::endl; in genPrimitiveTypeExportVariable()
1183 << ", v);" << std::endl; in genPrimitiveTypeExportVariable()
1197 std::string TypeName; in genPointerTypeExportVariable()
1206 << EV->getName() << ";" << std::endl; in genPointerTypeExportVariable()
1216 C.indent() << RS_EXPORT_VAR_PREFIX << EV->getName() << " = v;" << std::endl; in genPointerTypeExportVariable()
1218 << EV->getName() << ");" << std::endl; in genPointerTypeExportVariable()
1223 << std::endl; in genPointerTypeExportVariable()
1226 << EV->getName() << ");" << std::endl; in genPointerTypeExportVariable()
1246 << EV->getName() << ";" << std::endl; in genVectorTypeExportVariable()
1256 C.indent() << RS_EXPORT_VAR_PREFIX << EV->getName() << " = v;" << std::endl; in genVectorTypeExportVariable()
1261 << FieldPackerName << ");" << std::endl; in genVectorTypeExportVariable()
1281 << EV->getName() << ";" << std::endl; in genMatrixTypeExportVariable()
1291 C.indent() << RS_EXPORT_VAR_PREFIX << EV->getName() << " = v;" << std::endl; in genMatrixTypeExportVariable()
1296 << FieldPackerName << ");" << std::endl; in genMatrixTypeExportVariable()
1314 std::string TypeName = GetTypeName(ECAT); in genConstantArrayTypeExportVariable()
1318 << EV->getName() << ";" << std::endl; in genConstantArrayTypeExportVariable()
1328 C.indent() << RS_EXPORT_VAR_PREFIX << EV->getName() << " = v;" << std::endl; in genConstantArrayTypeExportVariable()
1333 << FieldPackerName << ");" << std::endl; in genConstantArrayTypeExportVariable()
1349 std::string TypeName = in genRecordTypeExportVariable()
1354 << EV->getName() << ";" << std::endl; in genRecordTypeExportVariable()
1364 C.indent() << RS_EXPORT_VAR_PREFIX << EV->getName() << " = v;" << std::endl; in genRecordTypeExportVariable()
1369 << ", " << FieldPackerName << ");" << std::endl; in genRecordTypeExportVariable()
1379 const std::string &TypeName, in genGetExportVariable()
1380 const std::string &VarName) { in genGetExportVariable()
1387 C.indent() << "return "RS_EXPORT_VAR_PREFIX << VarName << ";" << std::endl; in genGetExportVariable()
1401 << AllocSize << ");" << std::endl; in genCreateFieldPacker()
1417 << "(" << VarName << ");" << std::endl; in genPackVarOfType()
1427 << ".getPtr());" << std::endl; in genPackVarOfType()
1430 << ".getAllocation().getPtr());" << std::endl; in genPackVarOfType()
1435 << std::endl; in genPackVarOfType()
1449 std::string ElementVarName(VarName); in genPackVarOfType()
1451 while (LastDotPos != std::string::npos) { in genPackVarOfType()
1455 std::string IndexVarName("ct"); in genPackVarOfType()
1481 std::string FieldName; in genPackVarOfType()
1493 << (FieldOffset - Pos) << ");" << std::endl; in genPackVarOfType()
1501 << ");" << std::endl; in genPackVarOfType()
1510 << std::endl; in genPackVarOfType()
1523 const std::string &VarName) { in genAllocateVarOfType()
1538 C.indent() << VarName << " = null;" << std::endl; in genAllocateVarOfType()
1547 << "[" << ECAT->getSize() << "];" << std::endl; in genAllocateVarOfType()
1555 std::string ElementVarName(VarName); in genAllocateVarOfType()
1567 << std::endl; in genAllocateVarOfType()
1580 << std::endl; in genNewItemBufferIfNull()
1584 "new "RS_TYPE_ITEM_CLASS_NAME"();" << std::endl; in genNewItemBufferIfNull()
1593 ");" << std::endl; in genNewItemBufferPackerIfNull()
1600 std::string &ErrorMsg) { in genTypeClass()
1601 std::string ClassName = RS_TYPE_CLASS_NAME_PREFIX + ERT->getName(); in genTypeClass()
1616 ";" << std::endl; in genTypeClass()
1618 << std::endl; in genTypeClass()
1644 << RSExportType::GetTypeAllocSize(ERT) << ";" << std::endl; in genTypeItemClass()
1647 C.out() << std::endl; in genTypeItemClass()
1653 << ";" << std::endl; in genTypeItemClass()
1657 C.out() << std::endl; in genTypeItemClass()
1699 C.indent() << RS_TYPE_ITEM_BUFFER_NAME" = null;" << std::endl; in genTypeClassConstructor()
1700 C.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME" = null;" << std::endl; in genTypeClassConstructor()
1702 << std::endl; in genTypeClassConstructor()
1704 C.indent() << "init(" << RenderScriptVar << ", count);" << std::endl; in genTypeClassConstructor()
1716 C.indent() << RS_TYPE_ITEM_BUFFER_NAME" = null;" << std::endl; in genTypeClassConstructor()
1717 C.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME" = null;" << std::endl; in genTypeClassConstructor()
1719 << std::endl; in genTypeClassConstructor()
1721 C.indent() << "init(" << RenderScriptVar << ", count, usages);" << std::endl; in genTypeClassConstructor()
1740 << std::endl; in genTypeClassCopyToArray()
1743 ");" << std::endl; in genTypeClassCopyToArray()
1776 C.indent() << RS_TYPE_ITEM_BUFFER_NAME"[index] = i;" << std::endl; in genTypeClassItemSetter()
1781 C.indent() << "copyToArray(i, index);" << std::endl; in genTypeClassItemSetter()
1783 ".sizeof);" << std::endl; in genTypeClassItemSetter()
1784 C.indent() << "copyToArrayLocal(i, fp);" << std::endl; in genTypeClassItemSetter()
1785 C.indent() << "mAllocation.setFromFieldPacker(index, fp);" << std::endl; in genTypeClassItemSetter()
1803 << std::endl; in genTypeClassItemGetter()
1804 C.indent() << "return "RS_TYPE_ITEM_BUFFER_NAME"[index];" << std::endl; in genTypeClassItemGetter()
1830 << " = v;" << std::endl; in genTypeClassComponentSetter()
1838 << FieldOffset << ");" << std::endl; in genTypeClassComponentSetter()
1842 << std::endl; in genTypeClassComponentSetter()
1846 << std::endl; in genTypeClassComponentSetter()
1850 << std::endl; in genTypeClassComponentSetter()
1874 << GetTypeNullValue(F->getType()) << ";" << std::endl; in genTypeClassComponentGetter()
1876 << ";" << std::endl; in genTypeClassComponentGetter()
1888 << std::endl; in genTypeClassCopyAll()
1891 << std::endl; in genTypeClassCopyAll()
1907 C.indent() << "int oldSize = mItemArray.length;" << std::endl; in genTypeClassResize()
1908 C.indent() << "int copySize = Math.min(oldSize, newSize);" << std::endl; in genTypeClassResize()
1909 C.indent() << "if (newSize == oldSize) return;" << std::endl; in genTypeClassResize()
1910 C.indent() << "Item ni[] = new Item[newSize];" << std::endl; in genTypeClassResize()
1912 << std::endl; in genTypeClassResize()
1913 C.indent() << "mItemArray = ni;" << std::endl; in genTypeClassResize()
1915 C.indent() << "mAllocation.resize(newSize);" << std::endl; in genTypeClassResize()
1921 ");" << std::endl; in genTypeClassResize()
1936 "new Element.Builder(" << RenderScriptVar << ");" << std::endl; in genBuildElement()
1947 C.indent() << "return " << ElementBuilderName << ".create();" << std::endl; in genBuildElement()
1956 C.out() << ");" << std::endl; \
1962 const std::string &VarName, in genAddElementToElementBuilder()
2032 std::string NewElementBuilderName(ElementBuilderName); in genAddElementToElementBuilder()
2057 std::string FieldName; in genAddElementToElementBuilder()
2083 std::string NewElementBuilderName(ElementBuilderName); in genAddElementToElementBuilder()
2092 const std::string &VarName = FieldName; // Hack for EB_ADD macro in genAddElementToElementBuilder()
2124 const std::string &VarName = C.createPaddingField(); in genAddPaddingToElementBuiler()
2142 bool RSReflection::reflect(const std::string &OutputPathBase, in reflect()
2143 const std::string &OutputPackageName, in reflect()
2144 const std::string &InputFileName, in reflect()
2145 const std::string &OutputBCFileName) { in reflect()
2147 std::string ResourceId = ""; in reflect()
2163 std::string ErrorMsg, ScriptClassName; in reflect()
2178 std::cerr << "Failed to generate class " << ScriptClassName << " (" in reflect()
2179 << ErrorMsg << ")" << std::endl; in reflect()
2198 std::cerr << "Failed to generate type class for struct '" in reflect()
2199 << ERT->getName() << "' (" << ErrorMsg << ")" << std::endl; in reflect()
2238 bool RSReflection::Context::openClassFile(const std::string &ClassName, in openClassFile()
2239 std::string &ErrorMsg) { in openClassFile()
2242 std::string Path = in openClassFile()
2249 std::string ClassFile = Path + OS_PATH_SEPARATOR_STR + ClassName + ".java"; in openClassFile()
2272 const std::string &ClassName, in startClass()
2274 std::string &ErrorMsg) { in startClass()
2276 std::cout << "Generating " << ClassName << ".java ..." << std::endl; in startClass()
2286 out() << "/*" << std::endl; in startClass()
2287 out() << " * This file is auto-generated. DO NOT MODIFY!" << std::endl; in startClass()
2288 out() << " * The source Renderscript file: " << mInputRSFile << std::endl; in startClass()
2289 out() << " */" << std::endl; in startClass()
2293 out() << "package " << mPackageName << ";" << std::endl; in startClass()
2294 out() << std::endl; in startClass()
2298 out() << "import " << Import[i] << ";" << std::endl; in startClass()
2299 out() << std::endl; in startClass()
2303 out() << "/**" << std::endl; in startClass()
2304 out() << " * @hide" << std::endl; in startClass()
2305 out() << " */" << std::endl; in startClass()
2329 indent() << "{" << std::endl; in startBlock()
2331 out() << " {" << std::endl; in startBlock()
2338 indent() << "}" << std::endl << std::endl; in endBlock()
2342 void RSReflection::Context::startTypeClass(const std::string &ClassName) { in startTypeClass()
2356 const std::string &FunctionName, in startFunction()
2366 Args.push_back(std::make_pair(ArgType, ArgName)); in startFunction()
2378 const std::string &FunctionName, in startFunction()