本文整理汇总了C++中List函数的典型用法代码示例。如果您正苦于以下问题:C++ List函数的具体用法?C++ List怎么用?C++ List使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了List函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FlowSimulator
FlowSimulator(
const images::Image& flow_map_image,
GLuint first_tex_unit
): size(1024)
, prog(size)
, holder(size, first_tex_unit, flow_map_image)
, screen(List("Position")("TexCoord").Get(), shapes::Screen(), prog)
{
Uniform<SLtoCpp<SLDataType::Sampler2D>> flow_map(prog, "FlowMap");
flow_map.Set(holder.FlowMapUnit());
fbo.Bind(Framebuffer::Target::Draw);
Framebuffer::AttachColorTexture(
Framebuffer::Target::Draw,
0,
holder.BumpMap(),
0
);
}
示例2: Abstract
void ISymbol::DeepCopy(ISymbolPtr c)
{
c->Name()=Name();
c->Abstract() = Abstract();
c->Atomic() = Atomic();
c->Attributes() = Attributes();
c->BaseTypeName() = BaseTypeName();
c->Compositor() = Compositor();
c->DerivedType() = DerivedType();
c->Dimension() = Dimension();
c->Enumerations() = Enumerations();
c->FacetKinds() = FacetKinds();
c->Facets() = Facets();
c->Global() = Global();
c->Level() = Level();
c->List() = List();
c->ListSize() = ListSize();
c->ListType() = ListType();
c->LowerBounds() = LowerBounds();
c->Namespace() = Namespace();
c->Optional() = Optional();
c->OuterElementName() = OuterElementName();
c->OuterElementTypeName() = OuterElementTypeName();
c->Parent() = Parent();
c->Parsed() = Parsed();
c->PrimitiveType() = PrimitiveType();
c->Required() = Required();
c->SimpleContent() = SimpleContent();
c->SimpleType() = SimpleType();
c->SqlCount() = SqlCount();
c->SqlType() = SqlType();
c->SubstitutionGroupAffiliation() = SubstitutionGroupAffiliation();
c->SubstitutionList() = SubstitutionList();
c->SubTypes() = SubTypes();
c->SuperTypes() = SuperTypes();
c->Type() = Type();
c->TypeName() = TypeName();
c->UpperBounds() = UpperBounds();
c->Variable() = Variable();
c->Visited() = Visited();
c->XercesType() = XercesType();
}
示例3: FBTexExample
FBTexExample(void)
: gl()
, vertex_shader(ObjectDesc("Vertex"))
, prog(make_prog())
, projection_matrix(prog, "ProjectionMatrix")
, camera_matrix(prog, "CameraMatrix")
, model_matrix(prog, "ModelMatrix")
, cube(List("Position")("Normal")("TexCoord").Get(), shapes::Cube(), prog)
, width(800)
, height(600)
{
UniformSampler(prog, "TexUnit").Set(0);
Uniform<Vec3f>(prog, "LightPos").Set(40.0f, 40.0f, -80.0f);
Texture::Active(0);
tex.Bind(Texture::Target::_2D);
Use();
}
示例4: FBTexThread
FBTexThread(FBTexExample& example)
: gl()
, prog(make_prog(example))
, projection_matrix(prog, "ProjectionMatrix")
, camera_matrix(prog, "CameraMatrix")
, model_matrix(prog, "ModelMatrix")
, shape(List("Position")("Normal")("TexCoord").Get(), shapes::TwistedTorus(), prog)
, tex_side(512)
, parent_ready(example.parent_ready)
{
example.thread_ready = &thread_ready;
Uniform<Vec3f>(prog, "LightPos").Set(20.0f, 30.0f, 40.0f);
Texture::Active(0);
gl.Bound(Texture::Target::_2D, example.tex)
.MinFilter(TextureMinFilter::Linear)
.MagFilter(TextureMagFilter::Linear)
.WrapS(TextureWrap::Repeat)
.WrapT(TextureWrap::Repeat)
.Image2D(
0,
PixelDataInternalFormat::RGBA,
tex_side, tex_side,
0,
PixelDataFormat::RGBA,
PixelDataType::UnsignedByte,
nullptr
);
gl.Bound(Renderbuffer::Target::Renderbuffer, rbo)
.Storage(
PixelDataInternalFormat::DepthComponent,
tex_side,
tex_side
);
gl.Bound(Framebuffer::Target::Draw, fbo)
.AttachTexture(FramebufferAttachment::Color, example.tex, 0)
.AttachRenderbuffer(FramebufferAttachment::Depth, rbo);
Use();
}
示例5: insertModule
void insertModule(int i, QString module)
{
_lists.insert(i, List());
// insert new option
if(_lists.size() > _ld->levelOptionsCount())
{
QVector<BtMiniLevelOption> os;
for(int ii = 0; ii < _ld->levelOptionsCount(); ++ii)
os.append(_ld->levelOption(ii));
os.insert(i, _ld->levelOption(i));
for(int ii = 0; ii < os.size(); ++ii)
_ld->setLevelOption(ii, os[ii]);
}
setupModule(i, module);
}
示例6: CWXListCtrl
BOOL CDlgEmployee::OnInitDialog()
{
CDialog::OnInitDialog();
std::vector<SWXLISTCTROLCOLUMN> vecTitle;
vecTitle.push_back(SWXLISTCTROLCOLUMN(0,"员工号", LVCFMT_LEFT, 50));
vecTitle.push_back(SWXLISTCTROLCOLUMN(1,"姓名", LVCFMT_LEFT, 74));
vecTitle.push_back(SWXLISTCTROLCOLUMN(2,"部门", LVCFMT_LEFT, 100));
vecTitle.push_back(SWXLISTCTROLCOLUMN(3,"性别", LVCFMT_LEFT, 50));
vecTitle.push_back(SWXLISTCTROLCOLUMN(4,"生日", LVCFMT_LEFT, 110));
vecTitle.push_back(SWXLISTCTROLCOLUMN(5,"手机", LVCFMT_LEFT, 80));
vecTitle.push_back(SWXLISTCTROLCOLUMN(6,"座机", LVCFMT_LEFT, 80));
vecTitle.push_back(SWXLISTCTROLCOLUMN(7,"职位", LVCFMT_LEFT, 60));
vecTitle.push_back(SWXLISTCTROLCOLUMN(8,"当前状态", LVCFMT_LEFT, 60));
CWXListCtrl(&this->m_list).SetColTitle(vecTitle);
List();
if(E_START_TYPE_SELECTION==m_eStartType)
{
this->GetDlgItem(IDC_BUTTON1)->ShowWindow(0);
this->GetDlgItem(IDC_BUTTON8)->ShowWindow(0);
EnabaleOk();
}
else
{
this->GetDlgItem(IDOK)->ShowWindow(0);
if(!BNS::Power()->GetEmployeePower(BNS::Login()->GetLoginID()).IsCreatePower())
{
this->GetDlgItem(IDC_BUTTON1)->ShowWindow(0);
}
if(!BNS::Power()->GetEmployeePower(BNS::Login()->GetLoginID()).IsEditPower())
{
this->GetDlgItem(IDC_BUTTON8)->ShowWindow(0);
}
}
return TRUE; // 除非将焦点设置到控件,否则返回 TRUE
}
示例7: List
void CDirectory::Clear(BSTR path)
{
VARIANT vList;
List(path, 0, &vList);
long upperBound;
::SafeArrayGetUBound(vList.parray, 1, &upperBound);
for(long i = 0; i < upperBound; i++)
{
VARIANT vListEntry;
::SafeArrayGetElement(vList.parray, &i, &vListEntry);
IListEntry* listEntry;
vListEntry.pdispVal->QueryInterface(__uuidof(listEntry),
(LPVOID*) &listEntry);
BSTR name;
listEntry->get_Name(&name);
TCHAR newPath[MAX_PATH];
::StringCchCopy(newPath, MAX_PATH, path);
::PathAppend(newPath, name);
::SysFreeString(name);
BOOL bDir;
listEntry->get_IsDirectory(&bDir);
if(bDir)
{
Clear(newPath);
}
else
{
::DeleteFile(newPath);
}
listEntry->Release();
}
::SafeArrayDestroy(vList.parray);
::RemoveDirectory(path);
}
示例8: switch
void Application::run()
{
if (!MMEnu)
{
cout << "Pas de menu accocher à l'application en cours! " << endl;
return;
}
this->Again = true;
do
{
this->MMEnu->display(cout);
switch (this->MMEnu->askChoice(cout))
{
case eCREATE: Create(); break;
case eREAD: Read(); break;
case eUPDATE: Update(); break;
case eDELETE: Delete(); break;
case eDELETEALL: DeleteAll(); break;
case eLIST: List(); break;
case eFIRST: First(); break;
case eNEXT: Next(); break;
case eLAST: Last(); break;
case ePREVIOUS: Previous(); break;
case eSORT: Sort(); break;
case eSEARCH: Shearch(); break;
case eERROR: Error(); break;
case eQUIT: Quit(); break;
default: Bydefault(); break;
}
} while (this->Again);
}
示例9: List
void CSpaceObjectList::NotifyOnObjEnteredGate (CSpaceObject *pGatingObj, CTopologyNode *pDestNode, const CString &sDestEntryPoint, CSpaceObject *pStargate)
// NotifyOnObjEnteredGate
//
// Notify all objects in the list that the given object has entered a stargate.
{
int i;
if (GetCount() > 0)
{
TArray<CSpaceObject *> List(m_List);
for (i = 0; i < List.GetCount(); i++)
{
CSpaceObject *pObj = List[i];
if (!pObj->IsDestroyed())
pObj->FireOnObjEnteredGate(pGatingObj, pDestNode, sDestEntryPoint, pStargate);
}
}
}
示例10: CubeExample
CubeExample(void)
: cube(
List("Position")("Normal")("TexCoord").Get(),
shapes::Cube(),
cube_prog
)
{
// setup the texture
{
GLuint tex_side = 512;
auto image = images::NewtonFractal(
tex_side, tex_side,
Vec3f(0.2f, 0.1f, 0.4f),
Vec3f(0.8f, 0.8f, 1.0f),
Vec2f(-1.0f, -1.0f),
Vec2f( 1.0f, 1.0f),
images::NewtonFractal::X4Minus1(),
images::NewtonFractal::DefaultMixer()
);
gl.Bound(Texture::Target::_2D, cube_tex)
.Image2D(image)
.GenerateMipmap()
.BorderColor(Vec4f(0.8f, 0.8f, 1.0f, 1.0f))
.MinFilter(TextureMinFilter::LinearMipmapLinear)
.MagFilter(TextureMagFilter::Linear)
.WrapS(TextureWrap::Repeat)
.WrapT(TextureWrap::Repeat);
}
cube_prog.cube_tex = 0;
cube_prog.light_position.Set(4.0f, 4.0f, -8.0f);
gl.ClearColor(0.8f, 0.8f, 0.7f, 0.0f);
gl.ClearDepth(1.0f);
gl.Enable(Capability::DepthTest);
gl.Enable(Capability::CullFace);
gl.CullFace(Face::Back);
}
示例11: CRowSet
CRowSet* Inventory::List( EVEItemFlags _flag, uint32 forOwner ) const
{
DBRowDescriptor* header = new DBRowDescriptor;
header->AddColumn( "itemID", DBTYPE_I4 );
header->AddColumn( "typeID", DBTYPE_I2 );
header->AddColumn( "ownerID", DBTYPE_I4 );
header->AddColumn( "locationID", DBTYPE_I4 );
header->AddColumn( "flagID", DBTYPE_I2 );
header->AddColumn( "singleton", DBTYPE_BOOL );
header->AddColumn( "quantity", DBTYPE_I4 );
header->AddColumn( "groupID", DBTYPE_I2 );
header->AddColumn( "categoryID", DBTYPE_UI1 );
header->AddColumn( "customInfo", DBTYPE_STR );
header->AddColumn( "stacksize" , DBTYPE_I4 );
CRowSet* rowset = new CRowSet( &header );
List( rowset, _flag, forOwner );
return rowset;
}
示例12: allocVector
SEXP aRTconn::Summary()
{
SEXP info, element, names;
info = allocVector(VECSXP, aRTconnSSum); // List containing the connection attributes
names = allocVector(STRSXP, aRTconnSSum); // Names Vector
STRING_LIST_ITEM(info, names, aRTconnSClass, "class", Class());
STRING_LIST_ITEM(info, names, aRTconnSUser, "user", User);
STRING_LIST_ITEM(info, names, aRTconnSPassword, "password", Password);
STRING_LIST_ITEM(info, names, aRTconnSHost, "host", Host);
INTEGER_LIST_ITEM(info, names, aRTconnSPort, "port", Port);
SET_STRING_ELT(names, aRTconnSDatabases, mkChar("databases"));
element = List();
SET_VECTOR_ELT(info, aRTconnSDatabases, element);
setAttrib(info, R_NamesSymbol, names); // Set the names of the list
return info;
}
示例13: verify_attached
ValueType Object::get_property_value_impl(ContextType& ctx, const Property &property)
{
verify_attached();
size_t column = property.table_column;
if (is_nullable(property.type) && m_row.is_null(column)) {
return ctx.null_value();
}
if (is_array(property.type) && property.type != PropertyType::LinkingObjects) {
REALM_ASSERT(property.type == PropertyType::Object);
return ctx.box(List(m_realm, m_row.get_linklist(column)));
}
switch (property.type & ~PropertyType::Flags) {
case PropertyType::Bool: return ctx.box(m_row.get_bool(column));
case PropertyType::Int: return ctx.box(m_row.get_int(column));
case PropertyType::Float: return ctx.box(m_row.get_float(column));
case PropertyType::Double: return ctx.box(m_row.get_double(column));
case PropertyType::String: return ctx.box(m_row.get_string(column));
case PropertyType::Data: return ctx.box(m_row.get_binary(column));
case PropertyType::Date: return ctx.box(m_row.get_timestamp(column));
case PropertyType::Any: return ctx.box(m_row.get_mixed(column));
case PropertyType::Object: {
auto linkObjectSchema = m_realm->schema().find(property.object_type);
TableRef table = ObjectStore::table_for_object_type(m_realm->read_group(), property.object_type);
return ctx.box(Object(m_realm, *linkObjectSchema, table->get(m_row.get_link(column))));
}
case PropertyType::LinkingObjects: {
auto target_object_schema = m_realm->schema().find(property.object_type);
auto link_property = target_object_schema->property_for_name(property.link_origin_property_name);
TableRef table = ObjectStore::table_for_object_type(m_realm->read_group(), target_object_schema->name);
auto tv = m_row.get_table()->get_backlink_view(m_row.get_index(), table.get(), link_property->table_column);
return ctx.box(Results(m_realm, std::move(tv)));
}
default: REALM_UNREACHABLE();
}
}
示例14: main
main()
{
int a;
while(1)
{
List();
printf("\t请选择:");
while(scanf("%d",&a)!=1||a<0||a>7)
{
printf("\t输入错误!\n\t重新选择:");
getchar();
}
switch(a){
case 1:
fuli1();
break;
case 2:
fuli2();
break;
case 3:
danli();
break;
case 4:
benjin();
break;
case 5:
shijian();
break;
case 6:
benxi();
break;
case 7:
benxi();
break;
}
}
}
示例15: BarDisplay
BarDisplay(void)
: gl()
, side(128)
, shadow_size(512)
, cube(
List("Position")("Normal").Get(),
shapes::Cube(0.95, 1.0, 0.95, 0.0, 0.5, 0.0)
), display_vao(cube.VAOForProgram(display_prog))
, shadow_vao(cube.VAOForProgram(shadow_prog))
{
init_shadows();
init_heights();
init_offsets();
auto light_proj = CamMatrixf::PerspectiveX(
Degrees(74),
1.0,
1, 3*side
);
display_prog.light_proj_matrix.Set(light_proj);
shadow_prog.projection_matrix.Set(light_proj);
gl.PolygonOffset(4.0, 4.0);
}