本文整理汇总了C++中REGISTER函数的典型用法代码示例。如果您正苦于以下问题:C++ REGISTER函数的具体用法?C++ REGISTER怎么用?C++ REGISTER使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了REGISTER函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: REGISTER
// Set the 4 digits Int value
void SEVENSEGHW::setIntValue(unsigned int value, unsigned int pos_dot)
{
REGISTER( IO_SLOT(wishboneSlot), 7 ) = int_to_7seg( value %10) | (pos_dot==4 ? 0x80:0x00);
REGISTER( IO_SLOT(wishboneSlot), 6 ) = int_to_7seg((value/10 )%10) | (pos_dot==3 ? 0x80:0x00);
REGISTER( IO_SLOT(wishboneSlot), 5 ) = int_to_7seg((value/100 )%10) | (pos_dot==2 ? 0x80:0x00);
REGISTER( IO_SLOT(wishboneSlot), 4 ) = int_to_7seg((value/1000)%10) | (pos_dot==1 ? 0x80:0x00);
}
开发者ID:chcbaram,项目名称:FPGA,代码行数:8,代码来源:SevenSegHW.cpp
示例2: ompt_initialize
int ompt_initialize(ompt_function_lookup_t lookup, const char *runtime_version, int ompt_version) {
printf("Init: %s ver %i\n",runtime_version,ompt_version);
LOOKUP(lookup,ompt_get_parallel_id);
LOOKUP(lookup,ompt_set_callback);
REGISTER(ompt_event_parallel_begin);
REGISTER(ompt_event_parallel_end);
return 1;
}
开发者ID:haraldservat,项目名称:ompt-test-suite,代码行数:8,代码来源:level1-unit.c
示例3: Pigeon_init
void Pigeon_init(void *_self)
{
if (!_self)
return;
Pigeon *self = _self;
INIT(Entity, self->parent); // init super class
INIT_ENT("pigeon", Pigeon, self);
INIT(TransformComponent, self->transform_cmp);
INIT(PhysicsComponent, self->physics_cmp);
INIT(RenderComponent, self->render_cmp);
/* Register Each Component To Itself */
/* Extra Components Can Be Added Externally */
REGISTER(self->parent, Component, self->transform_cmp);
REGISTER(self->parent, Component, self->physics_cmp);
REGISTER(self->parent, Component, self->render_cmp);
sprintf(self->render_cmp.image_filename, "%s", "./res/images/Pigeon64x32.png");
self->render_cmp.src_rect.w = 64;
self->render_cmp.src_rect.h = 32;
self->render_cmp.src_rect.x=0;
self->render_cmp.src_rect.y=0;
self->render_cmp.src_rect.w=64;
self->render_cmp.src_rect.h=32;
self->render_cmp.dst_rect.x=0;
self->render_cmp.dst_rect.y=0;
self->render_cmp.dst_rect.w=64;
self->render_cmp.dst_rect.h=32;
self->transform_cmp.x = 320;
/*
// Iterate through components_list
Component *cmp = NULL;
GSList *iterator = NULL;
for (iterator = self->component_list; iterator; iterator = iterator->next)
{
cmp = iterator->data;
_INFO("%s", cmp->component_type);
}
*/
}
开发者ID:RedFT,项目名称:ECS,代码行数:50,代码来源:en_entity.c
示例4: CUiWindowFactory
CUiWindowFactory()
{
REGISTER(IUiWindow, CUiButton, "button");
REGISTER(IUiWindow, CUiCheck, "check");
REGISTER(IUiWindow, CUiEdit, "edit");
REGISTER(IUiWindow, CUiImage, "image");
REGISTER(IUiWindow, CUiList, "list");
// REGISTER(IUiWindow, CUiScene, "scene");
REGISTER(IUiWindow, CUiProgress, "progress");
REGISTER(IUiWindow, CUiSlider, "slider");
REGISTER(IUiWindow, CUiText, "text");
REGISTER(IUiWindow, CUiTooltip, "tooltip");
REGISTER(IUiWindow, CUiWindowBase, "window");
};
开发者ID:newobj,项目名称:taz,代码行数:14,代码来源:uiwindowfactory.cpp
示例5: if
// Get Dot position
unsigned int SEVENSEGHW::getDotPosition()
{
if ((REGISTER( IO_SLOT(wishboneSlot), 7 ) & 0x80) == 0x80)
{
return 1;
} else if ((REGISTER( IO_SLOT(wishboneSlot), 6 ) & 0x80) == 0x80)
{
return 2;
} else if ((REGISTER( IO_SLOT(wishboneSlot), 5 ) & 0x80) == 0x80)
{
return 3;
} else if ((REGISTER( IO_SLOT(wishboneSlot), 4 ) & 0x80) == 0x80)
{
return 4;
}
return 0;
}
开发者ID:chcbaram,项目名称:FPGA,代码行数:19,代码来源:SevenSegHW.cpp
示例6: Entity_registerComponent
void Entity_registerComponent(void *_self, Component *component)
{
if (!_self)
return;
Entity *self = _self;
self->component_list = g_slist_append(self->component_list, component);
REGISTER(*component, Entity, *self)
_INFO("Added %s to %s's Component list", component->component_type, self->entity_type);
}
开发者ID:RedFT,项目名称:ECS,代码行数:10,代码来源:en_entity.c
示例7: SceneManager_init
void SceneManager_init(void *_self)
{
if (!_self)
return;
SceneManager *self = _self;
INIT(Manager, self->parent); // init superclass
INIT_MAN("scenemanager", SceneManager, self); // assign function pointers
self->registerApp = SceneManager_registerApp;
INIT(EventSubsystem, self->event_ssys);
INIT(MovementSubsystem, self->move_ssys);
REGISTER(self->parent, Subsystem, self->event_ssys);
REGISTER(self->parent, Subsystem, self->move_ssys);
_INFO("Initialized %s", self->manager_type);
}
开发者ID:RedFT,项目名称:ECS,代码行数:19,代码来源:mn_scene.c
示例8: assign_record
RecordingStatus::Enum assign_record(Thread & thread, Instruction const & inst, Instruction const ** pc) {
*pc = assign_op(thread,inst);
Value& r = REGISTER(thread, inst.c);
//Inline this logic here would make the recorder more fragile,
// so for now we simply construct the pointer again:
if(r.isFuture()) {
thread.trace.outputs.push_back(thread.frame.environment->makePointer((String)inst.a));
thread.trace.Commit(thread);
}
//thread.trace.SetMaxLiveRegister(thread.base,inst.c);
return RecordingStatus::NO_ERROR;
}
开发者ID:yl2,项目名称:riposte,代码行数:12,代码来源:recording.cpp
示例9: REGISTER
int DeviceRegistry::getPPSPin(int masterslot, int offset, int shift)
{
unsigned count = REGISTER(SYSCTLBASE, 32+shift);
//unsigned i;
register_t startreg = ®ISTER(SYSCTLBASE, 64);
//for (i=0;i<count;i++) {
while(count--) {
unsigned val = *startreg++;//REGISTER(SYSCTLBASE, 64+i);
unsigned char dev = (val>>shift)&0xff;
if (dev!=masterslot) {
continue;
} else {
int pin = (val>>(8+shift))&0xff;
if (offset==0)
return pin;
offset--;
}
}
return -1;
}
开发者ID:DaveAckley,项目名称:ISHW,代码行数:21,代码来源:DeviceRegistry.cpp
示例10: main
int main() {
REGISTER(RA);
REGISTER(RB);
REGISTER(RC);
int a, b;
printf("Numbers A, B:\n");
scanf("%i %i", &a, &b);
store(RA, a);
store(RB, b);
add(RA, RB, RC);
printf("\n\n");
dump(RA);
dump(RB);
printf("--------------------\n");
dump(RC);
return 0;
}
开发者ID:Eugeny,项目名称:Labs,代码行数:22,代码来源:1.c
示例11: spiRec32
static uint32_t spiRec32(uint8_t wishboneSlot) {
spiSend(0XFF);
spiSend(0XFF);
spiSend(0XFF);
spiSend(0XFF);
// Serial.print(USPIDATA&0xff);
// Serial.print(" ");
//return USPIDATA&0xff;
//return USPIDATA;
//return SPI.transfer32(0xFFFFFFFF);
//REGISTER(IO_SLOT(12),5) = 0xFFFFFFFF;
return REGISTER(IO_SLOT(wishboneSlot),1);
//return SPI.transfer32(0xFFFFFFFF);
}
开发者ID:GadgetFactory,项目名称:DesignLab_Examples,代码行数:14,代码来源:Sd2Card.cpp
示例12: CachedReadAccessorUnitTest
CachedReadAccessorUnitTest(bool keep_temp_bundle)
: BaseClass("CachedReadAccessorUnitTest"),
keep_temp_bundle_(keep_temp_bundle) {
REGISTER(TestCacheBlockAddress);
REGISTER(TestCacheBlock);
REGISTER(TestCachedReadAccessorBasics);
REGISTER(TestCachedReadAccessorPread);
REGISTER(TestCachedReadAccessorPreadPerformance);
// Create a temporary test segment.
// WARNING: this directory will be deleted on exit!
segment_size_ = 100 * 1024 * 1024;
file_bundle_size_ = segment_size_ / 3;
path_base_ = "/tmp/tests/cachedreadaccessor_unittest_data/";
test_buffer_ = new char[file_bundle_size_];
char next_char = 0;
for(uint32 i = 0; i < file_bundle_size_; ++i) {
test_buffer_[i] = next_char++;
}
bundle_name_ = path_base_ + "TestBasics";
if (khDirExists(path_base_)) {
khPruneDir(path_base_);
}
CreateTestBundle();
}
开发者ID:zhanghaoit445,项目名称:earthenterprise,代码行数:24,代码来源:cachedreadaccessor_unittest.cpp
示例13: via_padlock_attach
void
via_padlock_attach(void)
{
#define VIA_ACE (CPUID_VIA_HAS_ACE|CPUID_VIA_DO_ACE)
if ((cpu_feature_padlock & VIA_ACE) != VIA_ACE)
return;
struct via_padlock_softc *vp_sc;
if ((vp_sc = malloc(sizeof(*vp_sc), M_DEVBUF, M_NOWAIT)) == NULL)
return;
memset(vp_sc, 0, sizeof(*vp_sc));
vp_sc->sc_cid = crypto_get_driverid(0);
if (vp_sc->sc_cid < 0) {
printf("PadLock: Could not get a crypto driver ID\n");
free(vp_sc, M_DEVBUF);
return;
}
/*
* Ask the opencrypto subsystem to register ourselves. Although
* we don't support hardware offloading for various HMAC algorithms,
* we will handle them, because opencrypto prefers drivers that
* support all requested algorithms.
*/
#define REGISTER(alg) \
crypto_register(vp_sc->sc_cid, alg, 0, 0, \
via_padlock_crypto_newsession, via_padlock_crypto_freesession, \
via_padlock_crypto_process, vp_sc);
REGISTER(CRYPTO_AES_CBC);
REGISTER(CRYPTO_MD5_HMAC_96);
REGISTER(CRYPTO_MD5_HMAC);
REGISTER(CRYPTO_SHA1_HMAC_96);
REGISTER(CRYPTO_SHA1_HMAC);
REGISTER(CRYPTO_RIPEMD160_HMAC_96);
REGISTER(CRYPTO_RIPEMD160_HMAC);
REGISTER(CRYPTO_SHA2_HMAC);
printf("PadLock: registered support for AES_CBC\n");
}
开发者ID:lacombar,项目名称:netbsd-alc,代码行数:41,代码来源:via_padlock.c
示例14: initialize
//------------------------------------------------------------------------------
//!
void initialize()
{
#define REGISTER( sTypeVar, str, type ) \
sTypeVar = str; \
Stimulus::registerStimulus( sTypeVar, create<Stimulus,type> )
REGISTER( _sType_ActionCompleted, "actionCompleted", ActionCompleted );
REGISTER( _sType_Begin , "begin" , BeginStimulus );
REGISTER( _sType_ContactBegin , "contactBegin" , ContactBeginStimulus );
REGISTER( _sType_ContactEnd , "contactEnd" , ContactEndStimulus );
REGISTER( _sType_Fall , "fall" , FallStimulus );
REGISTER( _sType_Land , "land" , LandStimulus );
#undef REGISTER
}
开发者ID:LudoSapiens,项目名称:Dev,代码行数:17,代码来源:EventStimuli.cpp
示例15: settings_init
void
settings_init()
{
memset(setting_data, 0, sizeof(void*) * MAX_KEY);
REGISTER(TRIGGER_KEY, hotkey_t, __hotkey_enc, __hotkey_dec);
REGISTER(ENG_KEY, hotkey_t, __hotkey_enc, __hotkey_dec);
REGISTER(ICBAR_POS, position_t, __position_enc, __position_dec);
REGISTER(PREEDIT_OPACITY, double, __double_enc, __double_dec);
REGISTER(PREEDIT_COLOR, varchar, __varchar_enc, __varchar_dec);
REGISTER(PREEDIT_FONT, varchar, __varchar_enc, __varchar_dec);
REGISTER(PREEDIT_FONT_COLOR, varchar, __varchar_enc, __varchar_dec);
REGISTER(CANDIDATES_SIZE, int, __int_enc, __int_dec);
__init_default_values();
}
开发者ID:XueWei,项目名称:sunpinyin,代码行数:16,代码来源:settings.c
示例16: main
int
main(int argc, gchar **argv)
{
BenchmarkData data;
BenchReporter *reporter;
gint n = 1000;
grn_init();
bench_init(&argc, &argv);
data.report_result = g_getenv("GROONGA_BENCH_REPORT_RESULT") != NULL;
data.context = g_new(grn_ctx, 1);
{
const gchar *groonga_bench_n;
groonga_bench_n = g_getenv("GROONGA_BENCH_N");
if (groonga_bench_n) {
n = atoi(groonga_bench_n);
}
}
reporter = bench_reporter_new();
#define REGISTER(label, setup) \
bench_reporter_register(reporter, label, n, \
bench_setup_ ## setup, \
bench_geo_distance, \
bench_teardown, \
&data)
REGISTER("rectangular (WGS84)", rectangular_wgs84);
REGISTER("rectangular (TOKYO)", rectangular_tgs);
REGISTER("spherical (WGS84)", spherical_wgs84);
REGISTER("spherical (TOKYO)", spherical_tgs);
REGISTER("hubeny (WGS84)", hubeny_wgs84);
REGISTER("hubeny (TOKYO)", hubeny_tgs);
#undef REGISTER
bench_reporter_run(reporter);
g_object_unref(reporter);
g_free(data.context);
bench_quit();
grn_fin();
return 0;
}
开发者ID:darashi,项目名称:groonga,代码行数:47,代码来源:bench-geo-distance.c
示例17: null_init
static int
null_init(void)
{
dprintk("%s(%p)\n", __FUNCTION__, null_init);
null_id = crypto_get_driverid(0);
if (null_id < 0)
panic("ocfnull: crypto device cannot initialize!");
crypto_register(null_id, CRYPTO_DES_CBC,
0, 0, null_newsession, null_freesession, null_process, NULL);
#define REGISTER(alg) \
crypto_register(null_id,alg,0,0,NULL,NULL,NULL,NULL)
REGISTER(CRYPTO_3DES_CBC);
REGISTER(CRYPTO_RIJNDAEL128_CBC);
REGISTER(CRYPTO_MD5);
REGISTER(CRYPTO_SHA1);
REGISTER(CRYPTO_MD5_HMAC);
REGISTER(CRYPTO_SHA1_HMAC);
#undef REGISTER
return 0;
}
开发者ID:robacklin,项目名称:ts7800,代码行数:24,代码来源:ocfnull.c
示例18: JNI_OnLoad
// DalvikVM calls this on startup, so we can statically register all our native methods.
jint JNI_OnLoad(JavaVM* vm, void*) {
JNIEnv* env;
if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
ALOGE("JavaVM::GetEnv() failed");
abort();
}
ScopedLocalFrame localFrame(env);
#define REGISTER(FN) extern void FN(JNIEnv*); FN(env)
REGISTER(register_android_system_OsConstants);
// REGISTER(register_java_lang_StringToReal);
REGISTER(register_java_lang_invoke_MethodHandle);
REGISTER(register_java_math_NativeBN);
REGISTER(register_java_util_regex_Matcher);
REGISTER(register_java_util_regex_Pattern);
REGISTER(register_libcore_icu_ICU);
REGISTER(register_libcore_icu_NativeConverter);
REGISTER(register_libcore_icu_TimeZoneNames);
REGISTER(register_libcore_io_AsynchronousCloseMonitor);
REGISTER(register_libcore_io_Memory);
REGISTER(register_libcore_io_Posix);
REGISTER(register_libcore_util_NativeAllocationRegistry);
REGISTER(register_org_apache_harmony_dalvik_NativeTestTarget);
REGISTER(register_org_apache_harmony_xml_ExpatParser);
REGISTER(register_sun_misc_Unsafe);
#undef REGISTER
return JNI_VERSION_1_6;
}
开发者ID:multi-os-engine,项目名称:libcore,代码行数:31,代码来源:Register.cpp
示例19: render_camera_init
void
render_camera_init(render_camera_t *camera, int threads)
{
camera->type = RENDER_CAMERA_PERSPECTIVE;
camera->view_num = 1;
camera->view_list = (render_camera_view_t *) bu_malloc (sizeof(render_camera_view_t), "render_camera_init");
camera->dof = 0;
camera->tilt = 0;
/* The camera will use a thread for every cpu the machine has. */
camera->thread_num = threads ? threads : (uint8_t)bu_avail_cpus();
bu_semaphore_init(TIE_SEM_LAST);
/* Initialize camera to rendering surface normals */
render_normal_init(&camera->render, NULL);
camera->rm = RENDER_METHOD_PHONG;
if (shaders == NULL) {
#define REGISTER(x) render_shader_register((const char *)#x, render_##x##_init);
REGISTER(component);
REGISTER(cut);
REGISTER(depth);
REGISTER(flat);
REGISTER(flos);
REGISTER(grid);
REGISTER(normal);
REGISTER(path);
REGISTER(phong);
REGISTER(spall);
REGISTER(surfel);
#undef REGISTER
}
}
开发者ID:kanzure,项目名称:brlcad,代码行数:35,代码来源:camera.c
示例20: REGISTER
void ZPUino_2::writeLEDs(unsigned long value)
{
REGISTER(IO_SLOT(wishboneSlot),0) = value;
}
开发者ID:nanodude,项目名称:DesignLab_Examples,代码行数:4,代码来源:ZPUino_2.cpp
注:本文中的REGISTER函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论