当前位置: 首页>>代码示例>>C++>>正文


C++ Get_Count函数代码示例

本文整理汇总了C++中Get_Count函数的典型用法代码示例。如果您正苦于以下问题:C++ Get_Count函数的具体用法?C++ Get_Count怎么用?C++ Get_Count使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Get_Count函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: _TL

//---------------------------------------------------------
wxString CWKSP_Module_Group::Get_Description(void)
{
	wxString	s;

	s	+= wxString::Format("<h4>%s</h4>", _TL("Tool Libraries"));

	s	+= "<table border=\"0\">";

	s	+= SUMMARY_ADD_STR(_TL("Category" ), Get_Name().c_str());
	s	+= SUMMARY_ADD_INT(_TL("Libraries"), Get_Count());

	s	+= "</table>";

	//-----------------------------------------------------
	s	+= wxString::Format("<hr><h4>%s</h4><table border=\"0\">", _TL("Tool Libraries"));

	s	+= wxString::Format("<tr align=\"left\"><th>%s</th><th>%s</th><th>%s</th></tr>",
			_TL("Library"),
			_TL("Name"   ),
			_TL("Tools"  )
		);

	for(int i=0; i<Get_Count(); i++)
	{
		s	+= wxString::Format("<tr><td valign=\"top\"><i>%s</i></td><td valign=\"top\">%s</td><td valign=\"top\" align=\"right\">%d</td></tr>",
				Get_Library(i)->Get_Library()->Get_Library_Name().c_str(),
				Get_Library(i)->Get_Name().c_str(),
				Get_Library(i)->Get_Count()
			);
	}

	s	+= "</table>";

	return( s );
}
开发者ID:Fooway,项目名称:SAGA-GIS-git-mirror,代码行数:36,代码来源:wksp_module_manager.cpp

示例2: Select

//---------------------------------------------------------
bool CSG_PointCloud::Del_Point(int iPoint)
{
    if( iPoint >= 0 && iPoint < Get_Count() )
    {
        if( is_Selected(iPoint) )
        {
            Select(iPoint, true);
        }

        m_Cursor	= m_Points[iPoint];

        for(int i=iPoint, j=iPoint+1; j<Get_Count(); i++, j++)
        {
            m_Points[i]	= m_Points[j];
        }

        m_Points[Get_Count() - 1]	= m_Cursor;

        m_Cursor	= NULL;

        _Dec_Array();

        Set_Modified();
        Set_Update_Flag();
        _Stats_Invalidate();

        return( true );
    }

    return( false );
}
开发者ID:johanvdw,项目名称:SAGA-GIS-git-mirror,代码行数:32,代码来源:pointcloud.cpp

示例3: _TL

//---------------------------------------------------------
wxString CWKSP_Grid_Manager::Get_Description(void)
{
	wxString	s;

	s.Printf(wxT("<b>%s</b><br>%d %s"), _TL("Grids"), Get_Count(), Get_Count() == 1 ? _TL("grid system") : _TL("grid systems"));

	return( s );
}
开发者ID:sinozope,项目名称:SAGA-GIS-git-mirror,代码行数:9,代码来源:wksp_grid_manager.cpp

示例4: Get_Count

//---------------------------------------------------------
wxString CWKSP_Map_Manager::Get_Description(void)
{
	wxString	s;

	s.Printf(wxT("%d %s"), Get_Count(), Get_Count() == 1 ? _TL("Map") : _TL("Maps"));

	return( s );
}
开发者ID:sinozope,项目名称:SAGA-GIS-git-mirror,代码行数:9,代码来源:wksp_map_manager.cpp

示例5: Destroy

//---------------------------------------------------------
bool CSG_Module_Library::Create(const CSG_String &File_Name)
{
	Destroy();

	TSG_PFNC_MLB_Initialize		MLB_Initialize;
	TSG_PFNC_MLB_Get_Interface	MLB_Get_Interface;

	wxString	sPath;
	wxFileName	fName(File_Name.c_str());

	fName.MakeAbsolute();
	m_File_Name		= fName.GetFullPath();

	//-----------------------------------------------------
	if( wxGetEnv(ENV_LIB_PATH, &sPath) && sPath.Length() > 0 )
	{
		wxSetEnv(ENV_LIB_PATH, CSG_String::Format(SG_T("%s%c%s"), sPath.c_str(), ENV_LIB_SEPA, SG_File_Get_Path(m_File_Name).c_str()));
	}
	else
	{
		wxSetEnv(ENV_LIB_PATH, SG_File_Get_Path(m_File_Name).c_str());
	}

	//-----------------------------------------------------
	if(	m_pLibrary->Load(m_File_Name.c_str())
	&&	(MLB_Get_Interface	= (TSG_PFNC_MLB_Get_Interface)	m_pLibrary->GetSymbol(SYMBOL_MLB_Get_Interface)) != NULL
	&&	(MLB_Initialize		= (TSG_PFNC_MLB_Initialize)		m_pLibrary->GetSymbol(SYMBOL_MLB_Initialize)   ) != NULL
	&&	 MLB_Initialize(m_File_Name) )
	{
		m_pInterface	= MLB_Get_Interface();
	}

	//-----------------------------------------------------
	if( sPath.Length() > 0 )
	{
		wxSetEnv(ENV_LIB_PATH, sPath);
	}
	else
	{
		wxUnsetEnv(ENV_LIB_PATH);
	}

	//-----------------------------------------------------
	if( Get_Count() > 0 )
	{
		for(int i=0; i<Get_Count(); i++)
			Get_Module(i)->Set_Managed(false);

		return( true );
	}

	Destroy();

	return( false );
}
开发者ID:am2222,项目名称:SAGA-GIS,代码行数:56,代码来源:module_library.cpp

示例6: SG_UI_Msg_Add

//---------------------------------------------------------
bool CSG_PointCloud::_Save(const CSG_String &File_Name)
{
    CSG_File	Stream;

    SG_UI_Msg_Add(CSG_String::Format(SG_T("%s: %s..."), _TL("Save point cloud"), File_Name.c_str()), true);

    CSG_String	sFile_Name = SG_File_Make_Path(NULL, File_Name, SG_T("spc"));

    if( Stream.Open(sFile_Name, SG_FILE_W, true) == false )
    {
        SG_UI_Msg_Add(_TL("failed"), false, SG_UI_MSG_STYLE_FAILURE);
        SG_UI_Msg_Add_Error(_TL("unable to create file."));

        return( false );
    }

    int		i, iBuffer, nPointBytes	= m_nPointBytes - 1;

    Stream.Write((void *)PC_FILE_VERSION, 6);
    Stream.Write(&nPointBytes	, sizeof(int));
    Stream.Write(&m_nFields		, sizeof(int));

    for(i=0; i<m_nFields; i++)
    {
        Stream.Write(&m_Field_Type[i], sizeof(TSG_Data_Type));

        iBuffer	= (int)m_Field_Name[i]->Length();
        if( iBuffer >= 1024 - 1 )	iBuffer	= 1024 - 1;
        Stream.Write(&iBuffer, sizeof(int));
        Stream.Write((void *)m_Field_Name[i]->b_str(), sizeof(char), iBuffer);
    }

    _Set_Shape(m_Shapes_Index);

    for(i=0; i<Get_Count() && SG_UI_Process_Set_Progress(i, Get_Count()); i++)
    {
        Stream.Write(m_Points[i] + 1, nPointBytes);
    }

    Set_Modified(false);

    Set_File_Name(sFile_Name, true);

    Save_MetaData(File_Name);

    Get_Projection().Save(SG_File_Make_Path(NULL, File_Name, SG_T("prj")), SG_PROJ_FMT_WKT);

    SG_UI_Msg_Add(_TL("okay"), false, SG_UI_MSG_STYLE_SUCCESS);

    SG_UI_Process_Set_Ready();

    return( true );
}
开发者ID:johanvdw,项目名称:SAGA-GIS-git-mirror,代码行数:54,代码来源:pointcloud.cpp

示例7: LNG

//---------------------------------------------------------
wxString CWKSP_Grid_System::Get_Description(void)
{
	wxString	s;

	s.Printf(wxT("<b>%s</b><table border=\"0\">"), LNG("[CAP] Grid System"));

	s.Append(wxString::Format(wxT("<tr><td>%s</td><td>%s</td></tr>"),
		LNG("[CAP] Name")					, Get_Name().c_str()
	));

	s.Append(wxString::Format(wxT("<tr><td>%s</td><td>%d</td></tr>"),
		LNG("[CAP] Number Of Grids")		, Get_Count()
	));

	s.Append(wxString::Format(wxT("<tr><td>%s</td><td>%d (x) * %d (y) = %ld</td></tr>"),
		LNG("[CAP] Number Of Cells")		, m_System.Get_NX(), m_System.Get_NY(), m_System.Get_NCells()
	));

	s.Append(wxString::Format(wxT("<tr><td>%s</td><td>%f</td></tr>"),
		LNG("[CAP] Cell Size")				, m_System.Get_Cellsize()
	));

	s.Append(wxString::Format(wxT("<tr><td>%s</td><td>[%f] - [%f] = [%f]</td></tr>"),
		LNG("[CAP] West-East")				, m_System.Get_XMin(), m_System.Get_XMax(), m_System.Get_XRange()
	));

	s.Append(wxString::Format(wxT("<tr><td>%s</td><td>[%f] - [%f] = [%f]</td></tr>"),
		LNG("[CAP] South-North")			, m_System.Get_YMin(), m_System.Get_YMax(), m_System.Get_YRange()
	));

	s.Append(wxT("</table>"));

	//-----------------------------------------------------
	return( s );
}
开发者ID:am2222,项目名称:SAGA-GIS,代码行数:36,代码来源:wksp_grid_system.cpp

示例8: r

//---------------------------------------------------------
CSG_Shape * CSG_PointCloud::Get_Shape(TSG_Point Point, double Epsilon)
{
    CSG_Rect	r(Point.x - Epsilon, Point.y - Epsilon, Point.x + Epsilon, Point.y + Epsilon);

    if( r.Intersects(Get_Extent()) != INTERSECTION_None )
    {
        int		iPoint		= -1;
        double	iDistance	= -1.0;

        for(int iRecord=0; iRecord<Get_Count(); iRecord++)
        {
            Set_Cursor(iRecord);

            if( r.Contains(Get_X(), Get_Y()) )
            {
                if( iPoint < 0 || iDistance > SG_Get_Distance(Point.x, Point.y, Get_X(), Get_Y()) )
                {
                    iPoint		= iRecord;
                    iDistance	= SG_Get_Distance(Point.x, Point.y, Get_X(), Get_Y());
                }
            }
        }

        if( iPoint >= 0 )
        {
            return( CSG_Shapes::Get_Shape(iPoint) );
        }
    }

    return( NULL );
}
开发者ID:johanvdw,项目名称:SAGA-GIS-git-mirror,代码行数:32,代码来源:pointcloud.cpp

示例9: CONFIG_Write

//---------------------------------------------------------
bool CWKSP_Module_Manager::Finalise(void)
{
	CONFIG_Write("/MODULES", &m_Parameters);

	CONFIG_Delete(CFG_LIBS);

	for(int i=0, n=0; i<Get_Count(); i++)
	{
		CWKSP_Module_Group	*pGroup	= Get_Group(i);

		for(int j=0; j<pGroup->Get_Count(); j++)
		{
			CSG_Module_Library	*pLibrary	= pGroup->Get_Library(j)->Get_Library();

			if( pLibrary->Get_Type() == MODULE_CHAINS )
			{
				for(int j=0; j<pLibrary->Get_Count(); j++)
				{
					CONFIG_Write(CFG_LIBS, wxString::Format(CFG_LIBF, n++), GET_LIBPATH(pLibrary->Get_File_Name(j)));
				}
			}
			else
			{
				CONFIG_Write(CFG_LIBS, wxString::Format(CFG_LIBF, n++), GET_LIBPATH(pLibrary->Get_File_Name()));
			}
		}
	}

	return( true );
}
开发者ID:Fooway,项目名称:SAGA-GIS-git-mirror,代码行数:31,代码来源:wksp_module_manager.cpp

示例10: SG_T

//---------------------------------------------------------
CSG_String CSG_Module_Library::Get_Summary(bool bHTML)
{
	CSG_String	s;

	if( bHTML )
	{
		s.Printf(
			SG_T("%s: <b>%s</b><br>%s: <i>%s</i><br>%s: <i>%s</i><br>%s: <i>%s</i><hr>%s"),
			LNG("[CAP] Module Library")	, Get_Info(MLB_INFO_Name),
			LNG("[CAP] Author")			, Get_Info(MLB_INFO_Author),
			LNG("[CAP] Version")		, Get_Info(MLB_INFO_Version),
			LNG("[CAP] File")			, Get_File_Name().c_str(),
			Get_Info(MLB_INFO_Description)
		);

		s.Append(CSG_String::Format(SG_T("<hr><b>%s:<ul>"), LNG("[CAP] Modules")));

		for(int i=0; i<Get_Count(); i++)
		{
			s.Append(CSG_String::Format(SG_T("<li>%s</li>"), Get_Module(i)->Get_Name()));
		}

		s.Append(SG_T("</ul>"));

		s.Replace(SG_T("\n"), SG_T("<br>"));
	}
	else
	{
		s.Printf(
			SG_T("%s: %s\n%s: %s\n%s: %s\n%s: %s\n\n%s"),
			LNG("[CAP] Module Library")	, Get_Info(MLB_INFO_Name),
			LNG("[CAP] Author")			, Get_Info(MLB_INFO_Author),
			LNG("[CAP] Version")		, Get_Info(MLB_INFO_Version),
			LNG("[CAP] File")			, Get_File_Name().c_str(),
			Get_Info(MLB_INFO_Description)
		);

		s.Append(CSG_String::Format(SG_T("\n\n%s:\n"), LNG("[CAP] Modules")));

		for(int i=0; i<Get_Count(); i++)
		{
			s.Append(CSG_String::Format(SG_T("- %s\n"), Get_Module(i)->Get_Name()));
		}
	}

	return( s );
}
开发者ID:am2222,项目名称:SAGA-GIS,代码行数:48,代码来源:module_library.cpp

示例11: LNG

//---------------------------------------------------------
wxString CWKSP_TIN_Manager::Get_Description(void)
{
	wxString	s;

	s.Printf(wxT("<b>%s</b>:%d<br>"), LNG("[CAP] TIN"), Get_Count());

	return( s );
}
开发者ID:am2222,项目名称:SAGA-GIS,代码行数:9,代码来源:wksp_tin_manager.cpp

示例12: _TL

//---------------------------------------------------------
wxString CWKSP_PointCloud_Manager::Get_Description(void)
{
	wxString	s;

	s.Printf(wxT("<b>%s</b>:%d<br>"), _TL("PointCloud"), Get_Count());

	return( s );
}
开发者ID:johanvdw,项目名称:SAGA-GIS-git-mirror,代码行数:9,代码来源:wksp_pointcloud_manager.cpp

示例13: _TL

//---------------------------------------------------------
wxString CWKSP_Table_Manager::Get_Description(void)
{
	wxString	s;

	s.Printf(wxT("<b>%s</b>: %d<br>"), _TL("Tables"), Get_Count());

	return( s );
}
开发者ID:Fooway,项目名称:SAGA-GIS-git-mirror,代码行数:9,代码来源:wksp_table_manager.cpp

示例14: Get_Tool

//---------------------------------------------------------
void CWKSP_Tool_Library::Update(void)
{
	int		i;

	for(i=Get_Count()-1; i>=0; i--)	// first remove tools that are not available anymore
	{
		CWKSP_Tool	*pItem	= Get_Tool(i);

		if( !m_pLibrary->Get_Tool(pItem->Get_Tool()->Get_Name()) )
		{
			Del_Item(pItem);

			Get_Control()->Delete(pItem->GetId());
		}
	}

	for(i=0; i<m_pLibrary->Get_Count(); i++)	// then add tools that are not yet present in the list
	{
		CSG_Tool	*pTool	= m_pLibrary->Get_Tool(i);

		if( pTool != NULL && pTool != TLB_INTERFACE_SKIP_TOOL )
		{
			for(int j=0; j<Get_Count() && pTool; j++)
			{
				if( pTool == Get_Tool(j)->Get_Tool() )
				{
					Get_Control()->SetItemText(Get_Tool(j)->GetId(), Get_Tool(j)->Get_Name());	// just in case name has changed

					pTool	= NULL;
				}
			}

			if( pTool )
			{
				CWKSP_Tool	*pItem	= new CWKSP_Tool(pTool, m_pLibrary->Get_Menu().w_str());

				Add_Item(pItem);

				g_pTool_Ctrl->Add_Tool(GetId(), pItem);
			}
		}
	}

	Get_Control()->SortChildren(GetId());
}
开发者ID:johanvdw,项目名称:SAGA-GIS-git-mirror,代码行数:46,代码来源:wksp_tool_library.cpp

示例15: LNG

//---------------------------------------------------------
wxString CWKSP_Module_Manager::Get_Description(void)
{
    wxString	s;

    s.Printf(wxT("<b>%s: %d</b><br><br>%s %d<br>"),
             LNG("[CAP] Module Libraries")	, Get_Count(),
             LNG("[CAP] Modules")			, Get_Items_Count()
            );

    return( s );
}
开发者ID:gregorburger,项目名称:SAGA-GIS,代码行数:12,代码来源:wksp_module_manager.cpp


注:本文中的Get_Count函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。