Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F2730369
attachments.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Mar 13, 10:33 PM
Size
636 B
Mime Type
text/x-c++
Expires
Sun, Mar 15, 10:33 PM (1 d, 13 h)
Engine
blob
Format
Raw Data
Handle
243023
Attached To
rXR Xreate
attachments.cpp
View Options
//
// Created by pgess on 3/15/15.
//
#include "attachments.h"
namespace xreate {
void* xreate::Attachments::put(unsigned int key, void *data) {
auto result = __data.emplace(key, data);
void* ptrOld = nullptr;
if (!result.second){
ptrOld = result.first->second;
result.first->second = data;
}
return ptrOld;
}
void *xreate::Attachments::get(unsigned int key) {
assert(__data.count(key));
return __data.at(key);
}
bool
xreate::Attachments::exists(unsigned int key)
{
return __data.count(key)>0;
}
}
Event Timeline
Log In to Comment