• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ printValue函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: main

int main() {
	int a,b,x;
	generate(&a);
	b=5;
	x=printValue(sum(&a,&b));
	return printValue(x);
}
开发者ID:mohamed,项目名称:resp-sim,代码行数:7,代码来源:test_reconfig.c


示例2: printPointsToSet

//
// Print out a points-to set.
//
static void printPointsToSet(raw_ostream &Stream, const PointsToSet &Set) {
  PointsToSet::iterator PTIt = Set.begin(), PTItEnd = Set.end();
  Stream << "printing points to set...\n";
  for (; PTIt != PTItEnd; ++PTIt) {
    PointsToNode *Node = PTIt->first;
    const Field &F = PTIt->second;

    Stream << "  - ";

    switch (Node->Kind) {
      case PointsToNode::TYPE_SAFE:
        Stream << "(";
        printValue(Stream, Node->getAllocationSite());
        Stream << ", ";
        F.print(Stream);
        Stream << ")";
        break;
      case PointsToNode::TYPE_UNSAFE:
        Stream << "(";
        printValue(Stream, Node->getAllocationSite());
        Stream << ", collapsed)";
      case PointsToNode::EXTERNAL:
        Stream << "(";
        if (Node->getAllocationSite() == 0)
          Stream << "external";
        else
          printValue(Stream, Node->getAllocationSite());
        Stream << ", collapsed)";
        break;
    }

    Stream << "\n";
  }
}
开发者ID:sdasgup3,项目名称:symbolic-analysis,代码行数:37,代码来源:PointsToGraph.cpp


示例3: printValue

void
ArxDbgEdInputContextReactor::printPointIn(const AcGePoint3d* pointIn) const
{
	CString str;
	if (pointIn != NULL)
		printValue(_T("POINT IN"), ArxDbgUtils::ptToStr(*pointIn, str));
	else
		printValue(_T("POINT IN"), _T("Null"));
}
开发者ID:kevinzhwl,项目名称:ObjectARXMod,代码行数:9,代码来源:ArxDbgEdInputContextReactor.cpp


示例4: main

int main() {
  Foo my_foo(4.2);
  double my_double(1.0);

  printValue(my_foo);
  printValue(my_double);

  return 0;
}
开发者ID:ajbennieston,项目名称:cpp,代码行数:9,代码来源:28-non-explicit-ctor.cpp


示例5: print

void SensorWidget::paintSystemSensorData()
{
  const SystemSensorData& data = sensorView.systemSensorData;
  print("System sensor data:", "");
  print(" Cpu temperatur", printValue(ValueType::temperatur, data.cpuTemperature));
  print(" Battery current", printValue(ValueType::current, data.batteryCurrent));
  print(" Battery level", printValue(ValueType::ratio, data.batteryLevel));
  print(" Battery temperatur", printValue(ValueType::ratio, data.batteryTemperature));
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:9,代码来源:SensorView.cpp


示例6: main

int main() {
  Foo my_foo(4.2);
  double my_double(1.0);

  printValue(my_foo);
  printValue(my_double);  // Error: no implicit conversion

  return 0;
}
开发者ID:ajbennieston,项目名称:cpp,代码行数:9,代码来源:29-explicit-ctor.cpp


示例7: printReactorMessage

void
ArxDbgEdInputContextReactor::endDragSequence(Acad::PromptStatus returnStatus,
                    AcGePoint3d& pickPoint, AcGeVector3d& vec)
{
	printReactorMessage(_T("End Drag Sequence"));

	if (m_showDetails) {
		CString str;
		printReturnStatus(returnStatus);
		printValue(_T("PICK POINT"), ArxDbgUtils::ptToStr(pickPoint, str));
		printValue(_T("VECTOR"), ArxDbgUtils::vectorToStr(vec, str));
	}
}
开发者ID:kevinzhwl,项目名称:ObjectARXMod,代码行数:13,代码来源:ArxDbgEdInputContextReactor.cpp


示例8: printValue

//
// Print out a summary of the points-to sets of the graph.
//
void PointsToGraph::printGraph(raw_ostream &Stream) {
  const char *Break = "------------------------------\n";

  Stream << "SCALAR MAP\n";

  //
  // Write out the scalar map.
  //
  ScalarMapTy::iterator SMIt = ScalarMap.begin(), SMItEnd = ScalarMap.end();
  for (; SMIt != SMItEnd; ++SMIt) {
    const Value *Pointer = SMIt->first;
    const PointsToSet &PTS = SMIt->second;

    Stream << Break;
    Stream << "Pointer: ";
    printValue(Stream, Pointer);
    Stream << "\n";
    Stream << "Points-to set:\n";
    printPointsToSet(Stream, PTS);
  }

  Stream << "POINTS-TO GRAPH\n";

  //
  // Write out the nodes in the points-to graph.
  //
  NodeMapTy::iterator NMIt = GraphNodes.begin(), NMItEnd = GraphNodes.end();
  for (; NMIt != NMItEnd; ++NMIt) {
    PointsToNode *Node = NMIt->second;
    Value *AllocSite = Node->getAllocationSite();

    Stream << Break;

    Stream << "Allocation site: ";
    printValue(Stream, AllocSite);
    Stream << "\n";

    EdgeMap &Edges = Node->getEdges();
    EdgeMap::iterator EIt = Edges.begin(), EItEnd = Edges.end();
    for (; EIt != EItEnd; ++EIt) {
      const Field &F = EIt->first;
      const PointsToSet &PTS = EIt->second;

      Stream << " At field ";
      F.print(Stream);
      Stream << ":\n";

      printPointsToSet(Stream, PTS);
    }
  }
}
开发者ID:sdasgup3,项目名称:symbolic-analysis,代码行数:54,代码来源:PointsToGraph.cpp


示例9: CEF_REQUIRE_UI_THREAD

void PhantomJSHandler::OnAfterCreated(CefRefPtr<CefBrowser> browser)
{
  CEF_REQUIRE_UI_THREAD();

  qCDebug(handler) << browser->GetIdentifier();

  auto& browserInfo = m_browsers[browser->GetIdentifier()];
  browserInfo.browser = browser;
  if (!m_popupToParentMapping.isEmpty()) {
    auto parentBrowser = m_popupToParentMapping.dequeue();
    // we don't open about:blank for popups
    browserInfo.firstLoadFinished = true;
    emitSignal(m_browsers.value(parentBrowser).browser, QStringLiteral("onPopupCreated"),
               {browser->GetIdentifier()}, true);
  }

#if CHROME_VERSION_BUILD >= 2526
  if (PRINT_SETTINGS) {
    auto prefs = browser->GetHost()->GetRequestContext()->GetAllPreferences(true);
    CefDictionaryValue::KeyList keys;
    prefs->GetKeys(keys);
    for (const auto& key : keys) {
      printValue(key, prefs->GetValue(key));
    }
  }
#endif
}
开发者ID:KDAB,项目名称:phantomjs-cef,代码行数:27,代码来源:handler.cpp


示例10: wxPanel

wxCustomSpinCtrl::wxCustomSpinCtrl( wxWindow*         parent,
                                    wxWindowID        id,
                                    float             min,
                                    float             max,
                                    float             initial,
                                    float             increment,
                                    int               digits )
    :
    wxPanel    ( parent    ),
    m_Parent   ( parent    ),
    m_ID       ( id        ),
    m_Value    ( initial   ),
    m_MaxValue ( max       ),
    m_MinValue ( min       ),
    m_Increment( increment ),
    m_Digits   ( digits    )
{
    m_TextControl = new wxTextCtrl( this, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );

    m_SpinButton  = new wxSpinButton( this, wxID_ANY );
    m_SpinButton->SetRange( -100000, +100000 );
    m_SpinButton->SetValue( 0 );

    wxBoxSizer*  topSizer = new wxBoxSizer( wxHORIZONTAL );
    topSizer->Add( m_TextControl, 0, wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL );
    topSizer->Add( m_SpinButton,  0, wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL );

    SetSizerAndFit( topSizer );

    printValue( m_Value );
}
开发者ID:pc1cp,项目名称:pappsdr,代码行数:31,代码来源:spinctrl.cpp


示例11: printAttribute

static int
printAttribute(D4printer* out, NCD4node* attr, int depth)
{
    int ret = NC_NOERR;
    int i = 0;
    char* fqn = NULL;

    INDENT(depth); CAT("<Attribute");
    printXMLAttributeName(out,"name",attr->name);
    if(attr->basetype->subsort <=  NC_MAX_ATOMIC_TYPE)
	printXMLAttributeName(out,"type",attr->basetype->name);
    else {
	printXMLAttributeName(out,"type",(fqn = NCD4_makeFQN(attr->basetype)));
    }
    CAT(">\n");
    depth++;
    for(i=0;i<nclistlength(attr->attr.values);i++) {
	printValue(out,(const char*)nclistget(attr->attr.values,i),depth);
	CAT("\n");
    }
    depth--;
    INDENT(depth);
    CAT("</Attribute>");

    nullfree(fqn);
    return THROW(ret);
}
开发者ID:dschwen,项目名称:libmesh,代码行数:27,代码来源:d4printer.c


示例12: recursivePrintValue

/* prints the elements in the same value */
void recursivePrintValue(FILE *f, NodeT *node, int level)
{
    if (level < node->level)
    {
        return;
    }
    if (level == node->level)
    {
        printValue(f, node);
        fprintf(f, " ");
        if (node == printNull)
        {
            return;
        }
    }
    if (node->left->value == -1)
    {
        node->left->level = node->level+1;
    }
    recursivePrintValue(f, node->left, level);
    if (node->value == -1)
    {
        node->level--;
    }
    if (node->right->value == -1)
    {
        node->right->level = node->level+1;
    }
    recursivePrintValue(f, node->right, level);
}
开发者ID:KovaxG,项目名称:aut-eng-2014,代码行数:31,代码来源:main.c


示例13: printValue

void PrintStatement::evaluate(SymTab &symTab, std::unique_ptr<FuncTab> &funcTab) {
	for (auto &l: _rhsList ) {
        printValue( l->evaluate(symTab, funcTab).get() );
		std::cout << ' ';
	}
	std::cout << std::endl;
}
开发者ID:ezquire,项目名称:Interpreter,代码行数:7,代码来源:Statements.cpp


示例14: QAbstractSpinBox

SpinBoxDecimale::SpinBoxDecimale(int value, QWidget *parent): QAbstractSpinBox(parent)
{
    setReadOnly(true);
    setAlignment(Qt::AlignRight);
    setValue(value);
    printValue();
}
开发者ID:MPercieduSert,项目名称:NoteCpp,代码行数:7,代码来源:SpinBoxDecimale.cpp


示例15: setRegistryValue

void setRegistryValue(bool registryNum[8], bool value[8]) {
	try{
	bool* output = new bool[8];
	bool tmpCheck = 0;
	bool* low = new bool[8];
	bool* high = new bool[8];
	if ( Eightto1bit(tmpCheck, lessthan(output, registryNum, low))) throw 10;
	if ( Eightto1bit(tmpCheck, greaterthan(output, registryNum, high))) throw 10;
	value[0] = registry[to_int8(registryNum)][0];
	value[1] = registry[to_int8(registryNum)][1];
	value[2] = registry[to_int8(registryNum)][2];
	value[3] = registry[to_int8(registryNum)][3];
	value[4] = registry[to_int8(registryNum)][4];
	value[5] = registry[to_int8(registryNum)][5];
	value[6] = registry[to_int8(registryNum)][6];
	value[7] = registry[to_int8(registryNum)][7];
	}
	catch (int e) {
		std::cout<<"Reg(";
		printValueInDecimal(registryNum);
		std::cout<<") = ";
		printValue(registryNum);
		std::cout<<'\n';
	}
}
开发者ID:dverona,项目名称:TAMU312,代码行数:25,代码来源:p6.cpp


示例16: printTree

// Prints the tree to the screen in a readable fashion. It should look just like
// Racket code; use parentheses to indicate subtrees.
void printTree(Value *tree){
    if (tree->type == NULL_TYPE) {
        return;
    }
    //if the current head of tree is a cons type, then go to its car
    else if (tree->type == CONS_TYPE) {
        //if the car is a cons type as well, enclose it in parentheses and recurse 
        if (car(tree)->type == CONS_TYPE) {
            printf("(");
            printTree(car(tree));
            printf(")");
            //adds a space after the end of a subtree (for formatting reasons)
            if (cdr(tree)->type != NULL_TYPE){
                printf(" ");
            }
            //recurse on the rest of the tree
            printTree(cdr(tree));
        }
        //if the car is not a cons type, print the car and recurse on the rest of the tree
        else{
            printTree(car(tree));
            if (cdr(tree)->type != NULL_TYPE){
                printf(" ");
            }
            printTree(cdr(tree));
        }
    } 
    //if the current head is not a cons type, print it
    else {
        printValue(tree);
        return;
    }
}
开发者ID:gloery,项目名称:Racket-Interpreter,代码行数:35,代码来源:parser.c


示例17: printTypeAndValue

void printTypeAndValue(llvm::raw_ostream &out, EValuePtr ev)
{
    printName(out, ev->type.ptr());
    out << "(";
    printValue(out, ev);
    out << ")";
}
开发者ID:DawidvC,项目名称:clay,代码行数:7,代码来源:printer.cpp


示例18: getTable

SEXP getTable(const std::shared_ptr<cpptoml::table>& t, bool verbose=false) {
    Rcpp::StretchyList sl;
    for (auto & p : *t) {
        if (p.second->is_table()) {
            auto ga = std::dynamic_pointer_cast<cpptoml::table>(p.second);
            if (verbose) Rcpp::Rcout << "Table: " << p.first << std::endl;
            sl.push_front(Rcpp::Named(p.first) = getTable(ga, verbose));
        } else if (p.second->is_array()) {
            auto ga = std::dynamic_pointer_cast<cpptoml::array>(p.second);
            if (verbose) {
                Rcpp::Rcout << "Array: " << p.first << std::endl;
                printArray(Rcpp::Rcout, *ga);
            }
            sl.push_front(Rcpp::Named(p.first) = getArray(*ga)); 
        } else if (p.second->is_value()) {
            if (verbose) {
                Rcpp::Rcout << "Value: " << p.first << "\n  :";
                printValue(Rcpp::Rcout, p.second);
                Rcpp::Rcout << std::endl;
            }
            sl.push_front(Rcpp::Named(p.first) = getValue(p.second)); 
            
        } else {
            Rcpp::Rcout << "Other: " << p.first << std::endl;
            sl.push_front(p.first); 
        }
    }
    return Rcpp::as<Rcpp::List>(sl);
}
开发者ID:renkun-ken,项目名称:rcpptoml,代码行数:29,代码来源:parse.cpp


示例19: while

// Render an array to text
int
aJsonClass::printArray(aJsonObject *item, FILE* stream)
{
  if (item == NULL)
    {
      //nothing to do
      return 0;
    }
  aJsonObject *child = item->child;
  if (fputc('[', stream) == EOF)
    {
      return EOF;
    }
  while (child)
    {
      if (printValue(child, stream) == EOF)
        {
          return EOF;
        }
      child = child->next;
      if (child)
        {
          if (fputc(',', stream) == EOF)
            {
              return EOF;
            }
        }
    }
  if (fputc(']', stream) == EOF)
    {
      return EOF;
    }
  return 0;
}
开发者ID:simonleber,项目名称:6LoWPAN_SN,代码行数:35,代码来源:aJSON.cpp


示例20: createRandomTile

void createRandomTile(struct tile ** board, int size, int pos_rel, int multi) {
    time_t t;
    srand((unsigned) time(&t));
    //randomize the col and row position
    int row = rand() % size;
    int col = rand() % size;
    int value = board[row][col].value;
    //check if the board is filled up
    bool filled = fillUpTile(board, size);

    //that position is blank
    if (value == 0) {
        board[row][col].value = random_2_4();
        printTile(board[row][col], row, col, pos_rel);
        printValue(board, size, pos_rel);
    } else {
        //the random tile is not empty and the board has not been filled up
        while (value != 0 && filled == false) {
            row = rand() % size;
            col = rand() % size;
            //the random tile is not empty
            if (board[row][col].value != 0) {
                value = board[row][col].value;
                filled = fillUpTile(board, size);
            } else {
                //random between value 2 and 4
                board[row][col].value = random_2_4();
                printTile(board[row][col], row, col, pos_rel);
                printValue(board, size, pos_rel);
                filled = fillUpTile(board, size);
                break;
            }
        }
    }
    //check the board has possible moves
    bool move = canMove(board, size);

    //the board is filled up and there is no move left for 1 player only
    if (multi == 0) {
        if (filled == true && move == false) {
            //delete win
            mvprintw(25, 2, "                            ");
            //print game over
            mvprintw(15, 2, "Game over!!");
        }
    }
}
开发者ID:VuXuanLoc,项目名称:COSC2451-2048,代码行数:47,代码来源:tile.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ printVersion函数代码示例发布时间:2022-05-30
下一篇:
C++ printTree函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap