本文整理汇总了C++中StringCollection::getCurrent方法的典型用法代码示例。如果您正苦于以下问题:C++ StringCollection::getCurrent方法的具体用法?C++ StringCollection::getCurrent怎么用?C++ StringCollection::getCurrent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringCollection
的用法示例。
在下文中一共展示了StringCollection::getCurrent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: beforeCall
void beforeCall() {
ogdf::PlanarizationGridLayout *pgl = static_cast<ogdf::PlanarizationGridLayout*>(ogdfLayoutAlgo);
if (dataSet != NULL) {
double dval = 0;
StringCollection sc;
if (dataSet->get("page ratio", dval))
pgl->pageRatio(dval);
if (dataSet->get(ELT_PLANARSUBGRAPH, sc)) {
if (sc.getCurrent() == ELT_FASTPLANAR) {
pgl->setSubgraph(new ogdf::FastPlanarSubgraph());
}
else {
pgl->setSubgraph(new ogdf::MaximalPlanarSubgraphSimple());
}
}
if (dataSet->get(ELT_EDGEINSERTION, sc)) {
if (sc.getCurrent() == ELT_FIXEDEMBEDDING) {
pgl->setInserter(new ogdf::FixedEmbeddingInserter());
}
else {
pgl->setInserter(new ogdf::VariableEmbeddingInserter);
}
}
}
}
示例2: beforeCall
void beforeCall() {
ogdf::TreeLayout *tree = static_cast<ogdf::TreeLayout*>(ogdfLayoutAlgo);
if (dataSet != NULL) {
double dval = 0;
bool bval = false;
StringCollection sc;
if (dataSet->get("siblings distance", dval))
tree->siblingDistance(dval);
if (dataSet->get("subtrees distance", dval))
tree->subtreeDistance(dval);
if (dataSet->get("levels distance", dval))
tree->levelDistance(dval);
if (dataSet->get("trees distance", dval))
tree->treeDistance(dval);
if (dataSet->get("orthogonal layout", bval))
tree->orthogonalLayout(bval);
if (dataSet->get(ELT_ORIENTATION, sc)) {
if (sc.getCurrent() == ELT_TOPTOBOTTOM) {
tree->orientation(ogdf::topToBottom);
}
else if (sc.getCurrent() == ELT_BOTTOMTOTOP) {
tree->orientation(ogdf::bottomToTop);
}
else if (sc.getCurrent() == ELT_LEFTTORIGHT) {
tree->orientation(ogdf::leftToRight);
}
else {
tree->orientation(ogdf::rightToLeft);
}
}
if (dataSet->get(ELT_ROOTSELECTION, sc)) {
if (sc.getCurrent() == ELT_ROOTSOURCE) {
tree->rootSelection(ogdf::TreeLayout::rootIsSource);
}
else if (sc.getCurrent() == ELT_ROOTSINK) {
tree->rootSelection(ogdf::TreeLayout::rootIsSink);
}
else {
tree->rootSelection(ogdf::TreeLayout::rootByCoord);
}
}
}
}
示例3: beforeCall
void OGDFGemFrick::beforeCall() {
ogdf::GEMLayout *gem = static_cast<ogdf::GEMLayout*>(ogdfLayoutAlgo);
if (dataSet != NULL) {
int ival = 0;
double dval = 0;
StringCollection sc;
if (dataSet->get("number of rounds", ival)) {
gem->numberOfRounds(ival);
}
if (dataSet->get("minimal temperature", dval)) {
gem->minimalTemperature(dval);
}
if (dataSet->get("initial temperature", dval)) {
gem->initialTemperature(dval);
}
if (dataSet->get("gravitational constant", dval)) {
gem->gravitationalConstant(dval);
}
if (dataSet->get("desired length", dval)) {
gem->desiredLength(dval);
}
if (dataSet->get("maximal disturbance", dval)) {
gem->maximalDisturbance(dval);
}
if (dataSet->get("rotation angle", dval)) {
gem->rotationAngle(dval);
}
if (dataSet->get("oscillation angle", dval)) {
gem->oscillationAngle(dval);
}
if (dataSet->get("rotation sensitivity", dval)) {
gem->rotationSensitivity(dval);
}
if (dataSet->get("oscillation sensitivity", dval)) {
gem->oscillationSensitivity(dval);
}
if (dataSet->get(ELT_ATTRACTIONFORMULA, sc)) {
gem->attractionFormula(sc.getCurrent() + 1);
}
if (dataSet->get("minDistCC", dval))
gem->minDistCC(dval);
if (dataSet->get("pageRatio", dval))
gem->pageRatio(dval);
}
}
示例4: beforeCall
void beforeCall() {
ogdf::SugiyamaLayout *sugiyama = static_cast<ogdf::SugiyamaLayout*>(ogdfLayoutAlgo);
if (dataSet != NULL) {
int ival = 0;
double dval = 0;
bool bval = false;
StringCollection sc;
if (dataSet->get("fails", ival))
sugiyama->fails(ival);
if (dataSet->get("runs", ival))
sugiyama->runs(ival);
if (dataSet->get("arrangeCCS", bval))
sugiyama->arrangeCCs(bval);
if (dataSet->get("minDistCC", dval))
sugiyama->minDistCC(dval);
if (dataSet->get("pageRatio", dval))
sugiyama->pageRatio(dval);
if (dataSet->get("alignBaseClasses", bval))
sugiyama->alignBaseClasses(bval);
if (dataSet->get("alignSiblings", bval))
sugiyama->alignSiblings(bval);
if (dataSet->get(ELT_RANKING, sc)) {
if (sc.getCurrent() == ELT_LONGESTPATHRANKING) {
sugiyama->setRanking(new ogdf::LongestPathRanking());
}
else if(sc.getCurrent() == ELT_OPTIMALRANKING) {
sugiyama->setRanking(new ogdf::OptimalRanking());
}
else
sugiyama->setRanking(new ogdf::CoffmanGrahamRanking());
}
if (dataSet->get(ELT_TWOLAYERCROSS, sc)) {
if (sc.getCurrent() == ELT_BARYCENTER) {
sugiyama->setCrossMin(new ogdf::BarycenterHeuristic());
}
else if (sc.getCurrent() == ELT_MEDIAN) {
sugiyama->setCrossMin(new ogdf::MedianHeuristic());
}
else if(sc.getCurrent()==ELT_SPLIT) {
sugiyama->setCrossMin(new ogdf::SplitHeuristic());
}
else if(sc.getCurrent()==ELT_SIFTING) {
sugiyama->setCrossMin(new ogdf::SiftingHeuristic());
}
else if(sc.getCurrent()==ELT_GREEDYINSERT) {
sugiyama->setCrossMin(new ogdf::GreedyInsertHeuristic());
}
else
sugiyama->setCrossMin(new ogdf::GreedySwitchHeuristic());
}
if(dataSet->get(ELT_HIERARCHYLAYOUT, sc)) {
double nodeDistance = 3;
double layerDistance = 3;
bool fixedLayerDistance = true;
dataSet->get("node distance", nodeDistance);
dataSet->get("layer distance", layerDistance);
dataSet->get("fixed layer distance", fixedLayerDistance);
if(sc.getCurrent()==ELT_FASTHIERARCHY) {
ogdf::FastHierarchyLayout *fhl = new FastHierarchyLayout();
fhl->nodeDistance(nodeDistance);
fhl->layerDistance(layerDistance);
fhl->fixedLayerDistance(fixedLayerDistance);
sugiyama->setLayout(fhl);
}
else {
sugiyama->setLayout(new ogdf::FastSimpleHierarchyLayout(static_cast<int>(nodeDistance), static_cast<int>(layerDistance)));
}
}
}
}