← Back

ofxCMS

github.com/markkorput/ofxCMS · @markkorput
OF 0.9 Utilities

Key-value based Model and Collection classes for OpenFrameworks, inspired by Backbone.js

0 1 Last commit 9y ago Created 12y ago

Branches ahead of master

These branches have commits not yet on master — could be unmerged fixes or work in progress worth a look.

topic 105 commits ahead · last commit 9y ago
dev 102 commits ahead · last commit 9y ago

README

ofxCMS



Key-value based Model and Collection classes for OpenFrameworks, inspired by Backbone.js

Features



Parse JSON Find and update existing models or create new ones String-based key-value attributes Event hooks for collection and attribute changes Auto-syncing collections Auto-filtering collections

Quick Start



CMS::Collection<CMS::Model> records; CMS::Model *record;

record = new CMS::Model(); record->set("id", "1"); record->set("name", "Bill"); record->set("sex", "male"); records.add(record);

record = new CMS::Model(); record->set("id", "2"); record->set("name", "Jane"); record->set("sex", "female"); records.add(record);

records.filterBy("sex", "female");

for(int i=0; i<records.count(); i++){ ofLog() << records.at(i)->get("name"); }

Get this addon

HTTPS
SSH