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


C++ CBGetObject函数代码示例

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


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

示例1: CBInitStringByCopyingCString

bool CBInitStringByCopyingCString(CBString * self,char * string){
	self->string = malloc(strlen(string));
	strcpy(self->string,string);
	if (!CBInitObject(CBGetObject(self)))
		return false;
	return true;
}
开发者ID:graingert,项目名称:cbitcoin,代码行数:7,代码来源:CBString.c

示例2: CBInitByteArraySubReference

void CBInitByteArraySubReference(CBByteArray * self, CBByteArray * ref, uint32_t offset, uint32_t length) {
    CBInitObject(CBGetObject(self), false);
    self->sharedData = ref->sharedData;
    self->sharedData->references++; // Since a new reference to the shared data is being made, an increase in the reference count must be made.
    self->length = length;
    self->offset = ref->offset + offset;
}
开发者ID:josselin-c,项目名称:cbitcoin,代码行数:7,代码来源:CBByteArray.c

示例3: CBNewStringByTakingCString

CBString * CBNewStringByTakingCString(char * string){
	objectNum++;
	CBString * self = malloc(sizeof(*self));
	CBAddVTToObject(CBGetObject(self), &VTStore, CBCreateStringVT);
	CBInitStringByTakingCString(self,string);
	return self;
}
开发者ID:graingert,项目名称:cbitcoin,代码行数:7,代码来源:CBString.c

示例4: CBNewScript

CBScript * CBNewScript(CBNetworkParameters * params,CBByteArray * program,CBEvents * events){
	CBScript * self = malloc(sizeof(*self));
	objectNum++;
	CBAddVTToObject(CBGetObject(self), &VTStore, CBCreateScriptVT);
	CBInitScript(self,params,program,events);
	return self;
}
开发者ID:graingert,项目名称:cbitcoin,代码行数:7,代码来源:CBScript.c

示例5: CBNewNode

CBNode * CBNewNode(CBDepObject database, CBNodeFlags flags, CBNodeCallbacks nodeCallbacks, CBNetworkCommunicatorCallbacks commCallbacks, CBOnMessageReceivedAction (*onMessageReceived)(CBNode *, CBPeer *, CBMessage *)){
	CBNode * self = malloc(sizeof(*self));
	CBGetObject(self)->free = CBFreeNode;
	if (CBInitNode(self, database, flags, nodeCallbacks, commCallbacks, onMessageReceived))
		return self;
	free(self);
	return NULL;
}
开发者ID:favioflamingo,项目名称:cbitcoin,代码行数:8,代码来源:CBNode.c

示例6: CBInitByteArrayWithData

void CBInitByteArrayWithData(CBByteArray * self, uint8_t * data, uint32_t size) {
    CBInitObject(CBGetObject(self), false);
    self->sharedData = malloc(sizeof(*self->sharedData));
    self->sharedData->data = data;
    self->sharedData->references = 1;
    self->length = size;
    self->offset = 0;
}
开发者ID:josselin-c,项目名称:cbitcoin,代码行数:8,代码来源:CBByteArray.c

示例7: CBNewBlockHeadersFromData

CBBlockHeaders * CBNewBlockHeadersFromData(CBByteArray * data) {
	
	CBBlockHeaders * self = malloc(sizeof(*self));
	CBGetObject(self)->free = CBFreeBlockHeaders;
	CBInitBlockHeadersFromData(self, data);
	
	return self;
	
}
开发者ID:01BTC10,项目名称:cbitcoin,代码行数:9,代码来源:CBBlockHeaders.c

示例8: CBNewBlockHeaders

CBBlockHeaders * CBNewBlockHeaders() {
	
	CBBlockHeaders * self = malloc(sizeof(*self));
	CBGetObject(self)->free = CBFreeBlockHeaders;
	CBInitBlockHeaders(self);
	
	return self;
	
}
开发者ID:01BTC10,项目名称:cbitcoin,代码行数:9,代码来源:CBBlockHeaders.c

示例9: CBNewInventoryFromData

CBInventory * CBNewInventoryFromData(CBByteArray * data) {
	
	CBInventory * self = malloc(sizeof(*self));
	CBGetObject(self)->free = CBFreeInventory;
	CBInitInventoryFromData(self, data);
	
	return self;
	
}
开发者ID:KBryan,项目名称:cbitcoin,代码行数:9,代码来源:CBInventory.c

示例10: CBNewInventory

CBInventory * CBNewInventory() {
	
	CBInventory * self = malloc(sizeof(*self));
	CBGetObject(self)->free = CBFreeInventory;
	CBInitInventory(self);
	
	return self;
	
}
开发者ID:KBryan,项目名称:cbitcoin,代码行数:9,代码来源:CBInventory.c

示例11: CBInitByteArrayFromString

void CBInitByteArrayFromString(CBByteArray * self, char * string, bool terminator) {
    CBInitObject(CBGetObject(self), false);
    self->length = (uint32_t)(strlen(string) + terminator);
    self->sharedData = malloc(sizeof(*self->sharedData));
    self->sharedData->data = malloc(self->length);
    self->sharedData->references = 1;
    self->offset = 0;
    memcpy(self->sharedData->data, string, self->length);
}
开发者ID:josselin-c,项目名称:cbitcoin,代码行数:9,代码来源:CBByteArray.c

示例12: CBNewAlert

CBAlert * CBNewAlert(int32_t version, int64_t relayUntil, int64_t expiration, int32_t ID, int32_t cancel, int32_t minVer, int32_t maxVer, int32_t priority, CBByteArray * hiddenComment, CBByteArray * displayedComment, CBByteArray * reserved) {
	
	CBAlert * self = malloc(sizeof(*self));
	CBGetObject(self)->free = CBFreeAlert;
	CBInitAlert(self, version, relayUntil, expiration, ID, cancel, minVer, maxVer, priority, hiddenComment, displayedComment, reserved);
	
	return self;
	
}
开发者ID:01BTC10,项目名称:cbitcoin,代码行数:9,代码来源:CBAlert.c

示例13: CBNewAlertFromData

CBAlert * CBNewAlertFromData(CBByteArray * data) {
	
	CBAlert * self = malloc(sizeof(*self));
	CBGetObject(self)->free = CBFreeAlert;
	CBInitAlertFromData(self, data);
	
	return self;
	
}
开发者ID:01BTC10,项目名称:cbitcoin,代码行数:9,代码来源:CBAlert.c

示例14: CBNewPingPongFromData

CBPingPong * CBNewPingPongFromData(CBByteArray * data) {
	
	CBPingPong * self = malloc(sizeof(*self));
	CBGetObject(self)->free = CBFreePingPong;
	CBInitPingPongFromData(self, data);
	
	return self;
	
}
开发者ID:01BTC10,项目名称:cbitcoin,代码行数:9,代码来源:CBPingPong.c

示例15: CBNewPingPong

CBPingPong * CBNewPingPong(long long int ID) {
	
	CBPingPong * self = malloc(sizeof(*self));
	CBGetObject(self)->free = CBFreePingPong;
	CBInitPingPong(self, ID);
	
	return self;
	
}
开发者ID:01BTC10,项目名称:cbitcoin,代码行数:9,代码来源:CBPingPong.c


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