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


C++ Ptr::address方法代码示例

本文整理汇总了C++中function::Ptr::address方法的典型用法代码示例。如果您正苦于以下问题:C++ Ptr::address方法的具体用法?C++ Ptr::address怎么用?C++ Ptr::address使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在function::Ptr的用法示例。


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

示例1: edgeOrganization

void
CfgEmitter::selectFunctionCallees(const Function::Ptr &function) {
    // Use an iteration rather than a traversal because we want to consider all vertices that belong to the function, including
    // those not reachable from the entry vertex.
    BOOST_FOREACH (const ControlFlowGraph::VertexNode &vertex, graph_.vertices()) {
        if (vertexOrganization(vertex).isSelected() && owningFunction(vertex) == function) {
            BOOST_FOREACH (const ControlFlowGraph::EdgeNode &edge, vertex.outEdges()) {
                if (isInterFunctionEdge(edge)) {
                    if (!edgeOrganization(edge).isSelected()) {
                        edgeOrganization(edge).select();
                        edgeOrganization(edge).label(edgeLabel(edge));
                        edgeOrganization(edge).attributes(edgeAttributes(edge));
                    }
                    
                    Organization &tgt = vertexOrganization(edge.target());
                    if (!tgt.isSelected()) {
                        tgt.select();
                        Function::Ptr callee = owningFunction(edge.target());
                        if (callee && edge.target()->value().type() == V_BASIC_BLOCK &&
                            edge.target()->value().address() == callee->address()) {
                            // target is the entry block of a function
                            tgt.label(functionLabel(callee));
                            tgt.attributes(functionAttributes(callee));
                        } else {
                            // target is some block that isn't a function entry
                            tgt.label(vertexLabel(edge.target()));
                            tgt.attributes(vertexAttributes(edge.target()));
                        }
                    }
                }
            }
        }
    }
开发者ID:Sciumo,项目名称:rose,代码行数:33,代码来源:GraphViz.C

示例2:

bool
sortFunctionsByAddress(const Function::Ptr &a, const Function::Ptr &b) {
    ASSERT_not_null(a);
    ASSERT_not_null(b);
    return a->address() < b->address();
}
开发者ID:Federico2014,项目名称:edg4x-rose,代码行数:6,代码来源:Utility.C


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