本文整理汇总了C++中setNodeType函数的典型用法代码示例。如果您正苦于以下问题:C++ setNodeType函数的具体用法?C++ setNodeType怎么用?C++ setNodeType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setNodeType函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: setNodeType
void TypeCheckerVisitor::visitReturnNode(ReturnNode* node) {
if (node->returnExpr()) {
node->returnExpr()->visit(this);
setNodeType(node, getNodeType(node->returnExpr()));
} else {
setNodeType(node, VT_VOID);
}
}
开发者ID:nvmd,项目名称:spbau-mathvm,代码行数:8,代码来源:typechecker.cpp
示例2: checkForSymbol
UTI NodeConstant::checkAndLabelType()
{
UTI it = Nav;
bool stubcopy = m_state.isClassAStub(m_state.getCompileThisIdx());
//instantiate, look up in class block; skip if stub copy and already ready.
if(!stubcopy && m_constSymbol == NULL)
checkForSymbol();
else
{
stubcopy = m_state.hasClassAStub(m_state.getCompileThisIdx()); //includes ancestors
}
if(m_constSymbol)
{
it = m_constSymbol->getUlamTypeIdx();
}
else if(isReadyConstant() && stubcopy)
{
assert(m_state.okUTItoContinue(m_constType));
setNodeType(m_constType); //t3565, t3640, t3641, t3642, t3652
//stub copy case: still wants uti mapping
it = NodeTerminal::checkAndLabelType();
}
else if(stubcopy)
{
// still need its symbol for a value
// use the member class (unlike checkForSymbol)
}
// map incomplete UTI
if(!m_state.isComplete(it)) //reloads to recheck
{
std::ostringstream msg;
msg << "Incomplete " << prettyNodeName().c_str() << " for type: ";
msg << m_state.getUlamTypeNameBriefByIndex(it).c_str();
msg << ", used with constant symbol name '";
msg << m_state.getTokenDataAsString(m_token).c_str() << "'";
MSG(getNodeLocationAsString().c_str(), msg.str().c_str(), WAIT);
//wait until updateConstant tried.
}
setNodeType(it);
Node::setStoreIntoAble(TBOOL_FALSE);
//copy m_constant from Symbol into NodeTerminal parent.
if(!isReadyConstant())
m_ready = updateConstant(); //sets ready here
if(!isReadyConstant())
{
it = Hzy;
if(!stubcopy)
m_constSymbol = NULL; //lookup again too! (e.g. inherited template instances)
m_state.setGoAgain();
}
return it;
} //checkAndLabelType
开发者ID:StStep,项目名称:ULAM,代码行数:58,代码来源:NodeConstant.cpp
示例3: indexFirstAlnum
int SHMParser::generateTree(SHMList<SHMString> list, int pos, SHMTreeNode* &root, bool first) {
if (pos > list.size()) return -1;
if (!root) return -1;
int depth = 0;
int i = 0;
if (first) {
root->setNodeType("fileRoot");
} else {
depth = indexFirstAlnum(list[pos]);
root->setLineContents(list[pos].substr(depth));
setNodeFamily(root);
setNodeType(root);
setNodeLineNumbers(root);
setNodeAttributes(root);
i = pos+1;
}
while (i<list.size()) {
int nextDepth = indexFirstAlnum(list[i]);
if (nextDepth > depth) {
SHMTreeNode *nextSon = new SHMTreeNode();
nextSon->setLineStart(root->lineStart());
nextSon->setLineEnd(root->lineEnd());
i = generateTree(list, i,nextSon,false);
root->appendChild(nextSon);
} else {
break;
}
}
return i;
}
开发者ID:ramongtx,项目名称:shaman,代码行数:30,代码来源:shmparser.cpp
示例4: MSG
UlamValue NodeBinaryOpArithDivide::makeImmediateBinaryOp(UTI type, u32 ldata, u32 rdata, u32 len)
{
UlamValue rtnUV;
if(rdata == 0)
{
MSG(getNodeLocationAsString().c_str(), "Possible Divide By Zero Attempt", ERR);
rtnUV.setUlamValueTypeIdx(Nav);
setNodeType(Nav); //compiler counts
return rtnUV;
}
ULAMTYPE typEnum = m_state.getUlamTypeByIndex(type)->getUlamTypeEnum();
switch(typEnum)
{
case Int:
rtnUV = UlamValue::makeImmediate(type, _BinOpDivideInt32(ldata, rdata, len), len);
break;
case Unsigned:
rtnUV = UlamValue::makeImmediate(type, _BinOpDivideUnsigned32(ldata, rdata, len), len);
break;
case Bool:
rtnUV = UlamValue::makeImmediate(type, _BinOpDivideBool32(ldata, rdata, len), len);
break;
case Unary:
rtnUV = UlamValue::makeImmediate(type, _BinOpDivideUnary32(ldata, rdata, len), len);
break;
case Bits:
default:
m_state.abortUndefinedUlamPrimitiveType();
break;
};
return rtnUV;
} //makeImmediateBinaryOp
开发者ID:DaveAckley,项目名称:ULAM,代码行数:34,代码来源:NodeBinaryOpArithDivide.cpp
示例5: AudioBasicInspectorNode
AnalyserNode::AnalyserNode(AudioContext* context, float sampleRate)
: AudioBasicInspectorNode(context, sampleRate, 2)
{
ScriptWrappable::init(this);
setNodeType(NodeTypeAnalyser);
initialize();
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:7,代码来源:AnalyserNode.cpp
示例6: MSG
UlamValue NodeBinaryOpArithRemainder::makeImmediateLongBinaryOp(UTI type, u64 ldata, u64 rdata, u32 len)
{
UlamValue rtnUV;
if(rdata == 0)
{
MSG(getNodeLocationAsString().c_str(), "Possible Division By Zero Attempt in Modulus", ERR);
rtnUV.setUlamValueTypeIdx(Nav);
setNodeType(Nav); //compiler counts
return rtnUV;
}
ULAMTYPE typEnum = m_state.getUlamTypeByIndex(type)->getUlamTypeEnum();
switch(typEnum)
{
case Int:
rtnUV = UlamValue::makeImmediateLong(type, _BinOpModInt64(ldata, rdata, len), len);
break;
case Unsigned:
rtnUV = UlamValue::makeImmediateLong(type, _BinOpModUnsigned64(ldata, rdata, len), len);
break;
case Bool:
rtnUV = UlamValue::makeImmediateLong(type, _BinOpModBool64(ldata, rdata, len), len);
break;
case Unary:
rtnUV = UlamValue::makeImmediateLong(type, _BinOpModUnary64(ldata, rdata, len), len);
break;
case Bits:
default:
assert(0);
break;
};
return rtnUV;
} //makeImmediateLongBinaryOp
开发者ID:StStep,项目名称:ULAM,代码行数:34,代码来源:NodeBinaryOpArithRemainder.cpp
示例7: AudioBasicProcessorNode
BiquadFilterNode::BiquadFilterNode(AudioContext* context, float sampleRate)
: AudioBasicProcessorNode(context, sampleRate)
{
// Initially setup as lowpass filter.
m_processor = std::move(std::unique_ptr<WebCore::AudioProcessor>(new BiquadProcessor(context, sampleRate, 1, false)));
setNodeType(NodeTypeBiquadFilter);
}
开发者ID:tmpvar,项目名称:LabSound,代码行数:7,代码来源:BiquadFilterNode.cpp
示例8: setFlag
Node::Node(const ZbProperty_t &zbProperty, Topology *topology)
{
setFlag(ItemIsMovable);
setFlag(ItemIsSelectable);
setFlag(ItemSendsGeometryChanges);
setCacheMode(DeviceCoordinateCache);
startColor.setRgba(qRgba(0, 255, 255, 255));
stopColor.setRgba(qRgba(0, 168, 168, 255));
statue = 0; //表示可移动状态
blinkStatue = 0; //表示节点没有闪烁
blinkTimer = new QTimer;
connect(blinkTimer, SIGNAL(timeout()), this, SLOT(onBlink()));
pressTimer = new QTimer(this);
connect(pressTimer, SIGNAL(timeout()), this, SLOT(onPressTimeout()));
myTopology = topology;
setText(converSensorName(ZigbeeIOClass::sensorName[zbProperty.sensorType]));
setNodeType(zbProperty.deviceType);
setZbProperty(zbProperty);
pressStaue = 0;
board = NULL;
}
开发者ID:LuckJC,项目名称:qt_project,代码行数:29,代码来源:node.cpp
示例9: region_alloc
FunctionDesc *newExternalFD(Node *type, Region *r) {
FunctionDesc *desc = (FunctionDesc *) region_alloc(r, sizeof(FunctionDesc));
memset(desc, 0, sizeof(FunctionDesc));
desc->exprType = type;
setNodeType(desc, N_FD_EXTERNAL);
return desc;
}
开发者ID:DICE-UNC,项目名称:iRODS-FUSE-Mod,代码行数:7,代码来源:restructs.c
示例10: newRes
Res* newRes(Region *r) {
Res *res1 = (Res *) region_alloc(r,sizeof (Res));
memset(res1, 0, sizeof(Res));
setNodeType(res1, N_VAL);
setIOType(res1, IO_TYPE_INPUT);
return res1;
}
开发者ID:DICE-UNC,项目名称:iRODS-FUSE-Mod,代码行数:7,代码来源:restructs.c
示例11: MSG
UTI NodeBinaryOpEqualArith::checkAndLabelType()
{
UTI nodeType = NodeBinaryOpEqual::checkAndLabelType();
UlamType * nut = m_state.getUlamTypeByIndex(nodeType);
// common part of name
ULAMTYPE enodetyp = nut->getUlamTypeEnum();
if(enodetyp == Bits)
{
// can happen with op-equal operations when both sides are the same type
MSG(getNodeLocationAsString().c_str(), "Arithmetic Operations are invalid on 'Bits' type", ERR);
nodeType = Nav;
}
if(enodetyp == Bool)
{
// can happen with op-equal operations when both sides are the same type
MSG(getNodeLocationAsString().c_str(), "Arithmetic Operations are invalid on 'Bool' type", ERR);
nodeType = Nav;
}
if((nodeType != Nav) && !nut->isScalar())
{
std::ostringstream msg;
msg << "Non-scalars require a loop for operator" << getName();
MSG(getNodeLocationAsString().c_str(), msg.str().c_str(), ERR);
nodeType = Nav;
}
setNodeType(nodeType);
return nodeType;
} //checkAndLabelType
开发者ID:StStep,项目名称:ULAM,代码行数:32,代码来源:NodeBinaryOpEqualArith.cpp
示例12: AudioNode
PannerNode::PannerNode(AudioContext* context, float sampleRate)
: AudioNode(context, sampleRate)
, m_panningModel(Panner::PanningModelHRTF)
, m_distanceModel(DistanceEffect::ModelInverse)
, m_position(0, 0, 0)
, m_orientation(1, 0, 0)
, m_velocity(0, 0, 0)
, m_isAzimuthElevationDirty(true)
, m_isDistanceConeGainDirty(true)
, m_isDopplerRateDirty(true)
, m_lastGain(-1.0)
, m_cachedAzimuth(0)
, m_cachedElevation(0)
, m_cachedDistanceConeGain(1.0f)
, m_cachedDopplerRate(1)
, m_connectionCount(0)
{
// Load the HRTF database asynchronously so we don't block the Javascript thread while creating the HRTF database.
// The HRTF panner will return zeroes until the database is loaded.
m_hrtfDatabaseLoader = HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary(context->sampleRate());
ScriptWrappable::init(this);
addInput();
addOutput(AudioNodeOutput::create(this, 2));
// Node-specific default mixing rules.
m_channelCount = 2;
m_channelCountMode = ClampedMax;
m_channelInterpretation = AudioBus::Speakers;
setNodeType(NodeTypePanner);
initialize();
}
开发者ID:smil-in-javascript,项目名称:blink,代码行数:34,代码来源:PannerNode.cpp
示例13: AudioBasicProcessorNode
BiquadFilterNode::BiquadFilterNode(AudioContext* context, float sampleRate)
: AudioBasicProcessorNode(context, sampleRate)
{
// Initially setup as lowpass filter.
m_processor = adoptPtr(new BiquadProcessor(context, sampleRate, 1, false));
setNodeType(NodeTypeBiquadFilter);
}
开发者ID:ZECTBynmo,项目名称:LabSound,代码行数:7,代码来源:BiquadFilterNode.cpp
示例14: ComTdbDDL
///////////////////////////////////////////////////////////////////////////
//
// Methods for class ComTdbDDL
//
///////////////////////////////////////////////////////////////////////////
ComTdbDDLwithStatus::ComTdbDDLwithStatus(char * ddl_query,
ULng32 ddl_querylen,
Int16 ddl_querycharset,
char * schemaName,
ULng32 schemaNameLen,
ex_expr * input_expr,
ULng32 input_rowlen,
ex_expr * output_expr,
ULng32 output_rowlen,
ex_cri_desc * work_cri_desc,
const unsigned short work_atp_index,
ex_cri_desc * given_cri_desc,
ex_cri_desc * returned_cri_desc,
queue_index down,
queue_index up,
Lng32 num_buffers,
ULng32 buffer_size)
: ComTdbDDL(ddl_query, ddl_querylen, ddl_querycharset,
schemaName, schemaNameLen,
input_expr, input_rowlen,
output_expr, output_rowlen,
work_cri_desc, work_atp_index,
given_cri_desc, returned_cri_desc,
down, up,
num_buffers, buffer_size),
flags2_(0)
{
setNodeType(ComTdb::ex_DDL_WITH_STATUS);
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:34,代码来源:ComTdbDDL.cpp
示例15: ComTdbGenericUtil
///////////////////////////////////////////////////////////////////////////
//
// Methods for class ComTdbDDL
//
///////////////////////////////////////////////////////////////////////////
ComTdbDDL::ComTdbDDL(char * ddl_query,
ULng32 ddl_querylen,
Int16 ddl_querycharset,
char * schemaName,
ULng32 schemaNameLen,
ex_expr * input_expr,
ULng32 input_rowlen,
ex_expr * output_expr,
ULng32 output_rowlen,
ex_cri_desc * work_cri_desc,
const unsigned short work_atp_index,
ex_cri_desc * given_cri_desc,
ex_cri_desc * returned_cri_desc,
queue_index down,
queue_index up,
Lng32 num_buffers,
ULng32 buffer_size)
: ComTdbGenericUtil(ddl_query, ddl_querylen, ddl_querycharset, schemaName, schemaNameLen,
input_expr, input_rowlen,
output_expr, output_rowlen,
work_cri_desc, work_atp_index,
given_cri_desc, returned_cri_desc,
down, up,
num_buffers, buffer_size),
flags_(0)
{
setNodeType(ComTdb::ex_DDL);
memset(fillersComTdbDDL_, sizeof(fillersComTdbDDL_), 0);
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:35,代码来源:ComTdbDDL.cpp
示例16: AudioBasicProcessorNode
BiquadFilterNode::BiquadFilterNode(AudioContext& context, float sampleRate)
: AudioBasicProcessorNode(context, sampleRate)
{
// Initially setup as lowpass filter.
m_processor = std::make_unique<BiquadProcessor>(context, sampleRate, 1, false);
setNodeType(NodeTypeBiquadFilter);
}
开发者ID:emutavchi,项目名称:WebKitForWayland,代码行数:7,代码来源:BiquadFilterNode.cpp
示例17: AudioBasicInspectorNode
AnalyserNode::AnalyserNode(AudioContext* context, float sampleRate)
: AudioBasicInspectorNode(context, sampleRate, 2)
{
setNodeType(NodeTypeAnalyser);
initialize();
}
开发者ID:AndriyKalashnykov,项目名称:webkit,代码行数:7,代码来源:AnalyserNode.cpp
示例18: AudioNode
PannerNode::PannerNode(AudioContext* context, float sampleRate)
: AudioNode(context, sampleRate)
, m_panningModel(Panner::PanningModelHRTF)
, m_lastGain(-1.0)
, m_connectionCount(0)
{
// Load the HRTF database asynchronously so we don't block the Javascript thread while creating the HRTF database.
m_hrtfDatabaseLoader = HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary(context->sampleRate());
addInput(std::make_unique<AudioNodeInput>(this));
addOutput(std::make_unique<AudioNodeOutput>(this, 2));
// Node-specific default mixing rules.
m_channelCount = 2;
m_channelCountMode = ClampedMax;
m_channelInterpretation = AudioBus::Speakers;
m_distanceGain = AudioParam::create(context, "distanceGain", 1.0, 0.0, 1.0);
m_coneGain = AudioParam::create(context, "coneGain", 1.0, 0.0, 1.0);
m_position = FloatPoint3D(0, 0, 0);
m_orientation = FloatPoint3D(1, 0, 0);
m_velocity = FloatPoint3D(0, 0, 0);
setNodeType(NodeTypePanner);
initialize();
}
开发者ID:biddyweb,项目名称:switch-oss,代码行数:28,代码来源:PannerNode.cpp
示例19: setErrorMessage
void TypeCheckerVisitor::visitWhileNode(WhileNode* node) {
node->whileExpr()->visit(this);
if (getNodeType(node->whileExpr()) == VT_VOID) {
setErrorMessage(node, "Should be not void");
}
node->loopBlock()->visit(this);
setNodeType(node, getNodeType(node->loopBlock()));
}
开发者ID:nvmd,项目名称:spbau-mathvm,代码行数:8,代码来源:typechecker.cpp
示例20: AudioBasicProcessorNode
BiquadFilterNode::BiquadFilterNode(AudioContext* context, float sampleRate)
: AudioBasicProcessorNode(context, sampleRate)
{
ScriptWrappable::init(this);
// Initially setup as lowpass filter.
m_processor = adoptPtrWillBeNoop(new BiquadProcessor(context, sampleRate, 1, false));
setNodeType(NodeTypeBiquadFilter);
}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:8,代码来源:BiquadFilterNode.cpp
注:本文中的setNodeType函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论