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


C++ HelloWorld类代码示例

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


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

示例1: New

 static Handle<Value> New(const Arguments& args)
 {
   HandleScope scope;
   HelloWorld* hw = new HelloWorld();
   hw->Wrap(args.This());
   return args.This();
 }
开发者ID:AlexWei2013,项目名称:Webinos-Platform,代码行数:7,代码来源:HelloWorld.cpp

示例2: main

int main() {
	HelloWorld hw;
	hw.communicate();

	system("PAUSE");
	return 0;
}
开发者ID:Zaiban,项目名称:git-harkka,代码行数:7,代码来源:Source.cpp

示例3:

void TestScene3::doClose(Ref* sender)
{
	HelloWorld* hello;
	auto scene = HelloWorld::createScene();
	Director::getInstance()->replaceScene(hello->createTransition( 1, scene));

}
开发者ID:jhghdi,项目名称:MyStudy,代码行数:7,代码来源:TestScene3.cpp

示例4: lock

void PubSubKeepAllTransientReader::read(uint16_t lastvalue, const std::chrono::seconds &seconds)
{
    std::unique_lock<std::mutex> lock(mutex_);
    lastvalue_ = lastvalue;
    while(!msgs_.empty() && lastvalue_ == *msgs_.rbegin())
    {
        if(data_received_)
        {
            HelloWorld hello;
            SampleInfo_t info;

            if(subscriber_->takeNextData((void*)&hello, &info))
            {
                if(info.sampleKind == ALIVE)
                {
                    newNumber(hello.index());
                }
            }

            --data_received_;
        }
        else
        {
            if(cv_.wait_for(lock, seconds) == std::cv_status::timeout)
                break;
        }
    }
}
开发者ID:soonhooi,项目名称:Fast-RTPS,代码行数:28,代码来源:PubSubKeepAllTransientReader.cpp

示例5: main

int main(int argc, char* argv[])
{
    std::cout << "Hello world, I'm the main thread, tid=" << pthread_self() << std::endl; 
    HelloWorld hello;
    hello.start();
    return 0;
} 
开发者ID:jiangxilong,项目名称:zieckey-study-code-svn-to-git,代码行数:7,代码来源:thread_memfunc.cpp

示例6: TEST

TEST(HelloWorld, sum) {
  HelloWorld hello;

  int result = hello.sum(2, 3);

  EXPECT_EQ(result, 5);
}
开发者ID:AlexDenisov,项目名称:mutang,代码行数:7,代码来源:HelloWorld.cpp

示例7: execute

 virtual bool execute(Event* e,Object* data){
     CCScene* scene = CCScene::create();
     HelloWorld* hw = HelloWorld::create();
     scene->addChild(hw);
     hw->setManager(getSector()->getManager());
     CCDirector::sharedDirector()->replaceScene(scene);
     return true;
 };
开发者ID:plter,项目名称:AndroidLessons20130708,代码行数:8,代码来源:HelloWorldSceneSector.cpp

示例8: _tmain

int _tmain(int argc, _TCHAR* argv[])
{
	HelloWorld hw;

	hw.SayThis(L"I'm a native client");

	return 0;
}
开发者ID:boolship,项目名称:Interop101Series,代码行数:8,代码来源:HelloWorld.cpp

示例9: main

int main (int argc, char **argv) {
        HelloWorld hello;

        // The first 3 parameters are identical to the fuse_main function.
        // The last parameter gives a pointer to a class instance, which is
        // required for static methods to access instance variables/ methods.
        return hello.main (argc, argv, NULL, &hello);
}
开发者ID:kyhhdm,项目名称:TPlatform,代码行数:8,代码来源:testHello.cpp

示例10: main

int main()
{
	// Lets Greet the World!
	HelloWorld GreetMe;
	GreetMe.SayHello();

	system("pause");
	return 0;
}
开发者ID:creatti,项目名称:HelloWorld,代码行数:9,代码来源:main.cpp

示例11: showmsg

void FrontCoverLayer::showmsg(const char *msg)
{
    CCNode* parent = this->getParent();
    HelloWorld* helloworld = dynamic_cast<HelloWorld*>(parent);
    if(helloworld)
    {
        helloworld->showMessage(msg);
    }
}
开发者ID:niuzb,项目名称:hellopetclient,代码行数:9,代码来源:FrontCoverLayer.cpp

示例12: shoot

void Projectile::shoot(float dt){

	//CCLog("[Enemy] shoot");
	Vec2 p = this->getPosition();
	p.x = p.x - this->getContentSize().width / 2;
	p.y = p.y - this->getContentSize().height * 0.05;

	HelloWorld* helloWorld = (HelloWorld*) this->getParent();
	helloWorld->shoot(p);
}
开发者ID:Ratel13,项目名称:cc2dx33_wp8Game,代码行数:10,代码来源:Projectile.cpp

示例13: deserialize

bool HelloWorldType::deserialize(SerializedPayload_t* payload, void* data)
{
	HelloWorld* hw = (HelloWorld*) data;
	// Object that manages the raw buffer.
	eprosima::fastcdr::FastBuffer fastbuffer((char*)payload->data, payload->length);
	// Object that serializes the data.
	eprosima::fastcdr::Cdr deser(fastbuffer);
	//serialize the object:
	hw->deserialize(deser);
	return true;
}
开发者ID:codebot,项目名称:Fast-RTPS,代码行数:11,代码来源:HelloWorldType.cpp

示例14: HelloWorld

HelloWorld* HelloWorld::create(PhysicsWorld* world,int level)
{
	HelloWorld* pRet = new HelloWorld();
	if (pRet && pRet->init(world,level)){
		pRet->autorelease();
		return pRet;
	}
	delete pRet;
	pRet = NULL;
	return NULL;
}
开发者ID:JimmyCheung94,项目名称:1,代码行数:11,代码来源:HelloWorldScene.cpp

示例15: waitDiscovery

void ReqRepHelloWorldReplier::newNumber(SampleIdentity sample_identity, uint16_t number)
{
    waitDiscovery();

    WriteParams wparams;
    HelloWorld hello;
    hello.index(number);
    hello.message("GoodBye");
    wparams.related_sample_identity(sample_identity);
    ASSERT_EQ(reply_publisher_->write((void*)&hello, wparams), true);
}
开发者ID:esteve,项目名称:Fast-RTPS,代码行数:11,代码来源:ReqRepHelloWorldReplier.cpp


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