本文整理汇总了C++中data类的典型用法代码示例。如果您正苦于以下问题:C++ data类的具体用法?C++ data怎么用?C++ data使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了data类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: TODO
bool y::ldap::account::load(const data& d) {
_uidNumber.readFromLdap(d);
if(_uidNumber().get() == 0) {
return false;
}
for(int i = 0; i < d.elms("objectClass"); i++) {
if(d.getValue("objectClass", i) == "schoolPerson") {
_hasSchoolPersonClass = true;
break;
}
}
_uid .readFromLdap(d);
_dn .readFromLdap(d);
_cn .readFromLdap(d);
_sn .readFromLdap(d);
_fullName .readFromLdap(d);
_homeDir .readFromLdap(d);
_wisaID .readFromLdap(d);
_wisaName .readFromLdap(d);
_mail .readFromLdap(d);
_mailAlias .readFromLdap(d);
_birthDay .readFromLdap(d);
_password .readFromLdap(d);
_role .readFromLdap(d);
_groupID .readFromLdap(d);
_schoolClass .readFromLdap(d);
_classChange .readFromLdap(d);
_birthPlace .readFromLdap(d);
_gender .readFromLdap(d);
_adminGroup .readFromLdap(d);
_registerID .readFromLdap(d);
_nationality .readFromLdap(d);
_stemID .readFromLdap(d);
_schoolID .readFromLdap(d);
_houseNumber .readFromLdap(d);
_houseNumberAdd.readFromLdap(d);
_city .readFromLdap(d);
_postalCode .readFromLdap(d);
_street .readFromLdap(d);
_country .readFromLdap(d);
if(_role().get() == ROLE::NONE) {
y::utils::Log().add("a user exists without a valid schoolrole: ");
y::utils::Log().add(_dn().get());
}
if(d.getValue("krbName" ).size()) _hasKrbName = true;
TODO(this can be removed later)
if(_fullName().get() == "System User") {
string fn = _cn().get();
fn += " ";
fn += _sn().get();
_fullName(FULL_NAME(fn), false);
}
_new = false;
return !_new;
}
开发者ID:yvanvds,项目名称:yATools,代码行数:60,代码来源:account.cpp
示例2: strcmp
bool operator< (const data& d1, const data& d2)
{
// return true if d1 is "less than" d2, false otherwise
return strcmp(d1.getName(), d2.getName()) < 0;
}
开发者ID:james276657,项目名称:code,代码行数:7,代码来源:data.cpp
示例3: strcpy
data::data(const data & aData)
{
char tempName[100];
char tempPhone[100];
char tempProduct[100];
char tempEvents[100];
aData.getName(tempName);
this->name = new char[strlen(tempName) + 1];
strcpy(name, tempName);
aData.getPhone(tempPhone);
this->phone = new char[strlen(tempPhone) + 1];
strcpy(phone, tempPhone);
aData.getProduct(tempProduct);
this->product = new char[strlen(tempProduct) + 1];
strcpy(product, tempProduct);
aData.getEvents(tempEvents);
this->events = new char [strlen(tempEvents) + 1];
strcpy(events, tempEvents);
}
开发者ID:nathanrodman,项目名称:HashTree,代码行数:25,代码来源:data.cpp
示例4: Serialize
void Serialize(Archive& ar, const unsigned int /* version */)
{
using data::CreateNVP;
ar & CreateNVP(normalNodeMaxNumChildren, "normalNodeMaxNumChildren");
ar & CreateNVP(splitHistory, "splitHistory");
}
开发者ID:AmesianX,项目名称:mlpack,代码行数:7,代码来源:x_tree_auxiliary_information.hpp
示例5:
data::data(data& h)
{
this->address = h.getAddress();
this->features = h.getFeatures();
this->sqFeet = h.getSqFeet();
this->bedrooms = h.getBedrooms();
this->bathrooms = h.getBathrooms();
}
开发者ID:Gabers-,项目名称:csfiles,代码行数:8,代码来源:data.cpp
示例6: Model
AuthorsBooks::AuthorsBooks(data attributes): Model("AuthorsBooks")
{
data::iterator iterator;
for (iterator = attributes.begin(); iterator != attributes.end(); iterator++)
{
modelData[iterator->first] = iterator->second;
}
}
开发者ID:Fabel,项目名称:pgsql,代码行数:8,代码来源:AuthorsBooks.cpp
示例7: Serialize
void Serialize(Archive& ar, const unsigned int /* version */)
{
using data::CreateNVP;
ar & CreateNVP(firstBound, "firstBound");
ar & CreateNVP(secondBound, "secondBound");
ar & CreateNVP(bound, "bound");
ar & CreateNVP(lastDistance, "lastDistance");
}
开发者ID:Andrew-He,项目名称:mlpack,代码行数:9,代码来源:neighbor_search_stat.hpp
示例8: CreateNVP
void DrusillaSelect<MatType>::Serialize(Archive& ar,
const unsigned int /* version */)
{
using data::CreateNVP;
ar & CreateNVP(candidateSet, "candidateSet");
ar & CreateNVP(candidateIndices, "candidateIndices");
ar & CreateNVP(l, "l");
ar & CreateNVP(m, "m");
}
开发者ID:YaweiZhao,项目名称:mlpack,代码行数:10,代码来源:drusilla_select_impl.hpp
示例9: CreateNVP
void EMFit<InitialClusteringType, CovarianceConstraintPolicy>::Serialize(
Archive& ar,
const unsigned int /* version */)
{
using data::CreateNVP;
ar & CreateNVP(maxIterations, "maxIterations");
ar & CreateNVP(tolerance, "tolerance");
ar & CreateNVP(clusterer, "clusterer");
ar & CreateNVP(constraint, "constraint");
}
开发者ID:YaweiZhao,项目名称:mlpack,代码行数:11,代码来源:em_fit_impl.hpp
示例10: Serialize
void Serialize(Archive& ar, const unsigned int /* version */)
{
using data::CreateNVP;
// We just need to serialize each of the members.
ar & CreateNVP(mean, "mean");
ar & CreateNVP(covariance, "covariance");
ar & CreateNVP(covLower, "covLower");
ar & CreateNVP(invCov, "invCov");
ar & CreateNVP(logDetCov, "logDetCov");
}
开发者ID:shenzebang,项目名称:mlpack,代码行数:11,代码来源:gaussian_distribution.hpp
示例11: Serialize
void CF::Serialize(Archive& ar, const unsigned int /* version */)
{
// This model is simple; just serialize all the members. No special handling
// required.
using data::CreateNVP;
ar & CreateNVP(numUsersForSimilarity, "numUsersForSimilarity");
ar & CreateNVP(rank, "rank");
ar & CreateNVP(w, "w");
ar & CreateNVP(h, "h");
ar & CreateNVP(cleanedData, "cleanedData");
}
开发者ID:AmesianX,项目名称:mlpack,代码行数:12,代码来源:cf_impl.hpp
示例12:
bool operator< (const data & aData1, const data & aData2)
{
char name1[100];
char name2[100];
aData1.getName(name1);
aData2.getName(name2);
if (strcmp(name1, name2) == -1)
return true;
else
return false;
}
开发者ID:nathanrodman,项目名称:HashTree,代码行数:13,代码来源:data.cpp
示例13: CreateNVP
void DecisionStump<MatType>::Serialize(Archive& ar,
const unsigned int /* version */)
{
using data::CreateNVP;
// This is straightforward; just serialize all of the members of the class.
// None need special handling.
ar & CreateNVP(classes, "classes");
ar & CreateNVP(bucketSize, "bucketSize");
ar & CreateNVP(splitDimension, "splitDimension");
ar & CreateNVP(split, "split");
ar & CreateNVP(binLabels, "binLabels");
}
开发者ID:AmesianX,项目名称:mlpack,代码行数:13,代码来源:decision_stump_impl.hpp
示例14: fast_proj
animator_type fast_proj(const data& d, const solver_type& solver, const force_type& f, const math::natural& steps) {
return [&d, solver,f, &steps](math::real t, math::real dt) {
// projections
dof::velocity last;
dof::velocity v;
phys::solver::task task(v);
phys::constraint::bilateral::vector lambda;
task.lambda = λ
task.momentum = d.momentum( f(t, dt), dt );
for(math::natural i = 0; i < steps; ++i) {
// generates solver and evaluates constraints
auto s = solver();
task.bilateral =
(1/dt) * d.system.constraint.bilateral.corrections + d.system.constraint.bilateral.matrix * v
;
s.solve( task );
// muhahahaha
d.engine.correct( (0.5 * dt ) * (v - last) );
task.momentum = d.system.mass * v;
last = v;
}
d.engine.set(v, d.system.mass * v);
};
}
开发者ID:Jorjor70,项目名称:meuh,代码行数:35,代码来源:fast_proj.cpp
示例15: insert
void hashTree::insert(treeNode*& root, data& aData)
{
char key[100];
char compare[100];
if (root)
{
root->item->getName(compare);
aData.getName(key);
}
if(!root)
{
root = new treeNode(&aData);
size++;
}
else if(strcmp(key, compare) < 0)
{
insert(root->left, aData);
}
else
{
insert(root->right, aData);
}
}
开发者ID:nathanrodman,项目名称:HashTree,代码行数:28,代码来源:hashTree.cpp
示例16: Serialize
void HilbertRTreeAuxiliaryInformation<TreeType ,HilbertValueType>::
Serialize(Archive& ar, const unsigned int /* version */)
{
using data::CreateNVP;
ar & CreateNVP(hilbertValue, "hilbertValue");
}
开发者ID:YaweiZhao,项目名称:mlpack,代码行数:7,代码来源:hilbert_r_tree_auxiliary_information_impl.hpp
示例17: test_pbes_expression
void test_pbes_expression()
{
namespace p = pbes_system::pbes_expr;
variable x1("x1", basic_sort("X"));
pbes_expression e = x1;
data_expression x2 = mcrl2::pbes_system::accessors::val(e);
BOOST_CHECK(x1 == x2);
}
开发者ID:gijskant,项目名称:mcrl2-pmc,代码行数:9,代码来源:pbes_test.cpp
示例18: train
train_root
(
const data& X, // data points
const train_options& opt // training options
) :
root <T>(
opt.books, // C
capacity(X.length(), opt), // J
split(X.length(), opt.books) // dim
)
{
for (size_t c = 0; c < C; c++)
{
msg::head(info, "training codebook ", c);
child[c] = train(X, dim[c], opt);
msg::nl(info);
}
}
开发者ID:iavr,项目名称:drvq,代码行数:18,代码来源:root.hpp
示例19: write_log
void firms::write_log(data& _log)
{
for (map<int, firm>::iterator i = _firms.begin(); i != _firms.end(); ++i)
{
_log.setfirmsalary(i->first, (i->second).getsalary());
_log.setfirmprice(i->first, (i->second).getprice());
_log.setfirmsold(i->first, (i->second).getsold());
_log.setfirmworkers(i->first, (i->second).getworkers());
_log.setfirmmoney(i->first, (i->second).getmoney());
_log.setfirmprofit(i->first, (i->second).getprofit());
_log.setfirmdesired(i->first, (i->second).getdesired());
_log.setfirmstock(i->first, (i->second).getstock());
_log.setfirmaction(i->first, (i->second).getaction());
}
}
开发者ID:omelyanchikd,项目名称:ace0.3,代码行数:15,代码来源:firms.cpp
示例20: log_writeData
// log and write 関数
void log_writeData(clock::time_point time_, const data& data_){
if(is_active()){
ofs << data_.strGPGGA() << std::endl;
/*
ofs << time_to_hms(time_) << FILE_DEVIDE_CHARS << data_.getUseGPS()
<< FILE_DEVIDE_CHARS << data_.getPos().x << FILE_DEVIDE_CHARS << data_.getPos().y
<< FILE_DEVIDE_CHARS << data_.getHeight() << FILE_DEVIDE_CHARS << time_to_hms(data_.getUTC())
<< FILE_DEVIDE_CHARS << data_.getFail() << FILE_DEVIDE_CHARS << data_.getErr()
<< std::endl;
*/
}
}
开发者ID:HomuraVehicle,项目名称:HomuraViewer,代码行数:13,代码来源:GPSFileAgent.hpp
注:本文中的data类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论