{"action":"created","issue":{"url":"https://api.github.com/repos/schmie/hemeMove/issues/110","labels_url":"https://api.github.com/repos/schmie/hemeMove/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/schmie/hemeMove/issues/110/comments","events_url":"https://api.github.com/repos/schmie/hemeMove/issues/110/events","html_url":"https://github.com/schmie/hemeMove/issues/110","id":94258065,"number":110,"title":"Consider moving some of the methods from geometry into a site class","user":{"login":"schmie","id":6473158,"avatar_url":"https://avatars.githubusercontent.com/u/6473158?v=3","gravatar_id":"","url":"https://api.github.com/users/schmie","html_url":"https://github.com/schmie","followers_url":"https://api.github.com/users/schmie/followers","following_url":"https://api.github.com/users/schmie/following{/other_user}","gists_url":"https://api.github.com/users/schmie/gists{/gist_id}","starred_url":"https://api.github.com/users/schmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schmie/subscriptions","organizations_url":"https://api.github.com/users/schmie/orgs","repos_url":"https://api.github.com/users/schmie/repos","events_url":"https://api.github.com/users/schmie/events{/privacy}","received_events_url":"https://api.github.com/users/schmie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jamespjh","id":55009,"avatar_url":"https://avatars.githubusercontent.com/u/55009?v=3","gravatar_id":"","url":"https://api.github.com/users/jamespjh","html_url":"https://github.com/jamespjh","followers_url":"https://api.github.com/users/jamespjh/followers","following_url":"https://api.github.com/users/jamespjh/following{/other_user}","gists_url":"https://api.github.com/users/jamespjh/gists{/gist_id}","starred_url":"https://api.github.com/users/jamespjh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamespjh/subscriptions","organizations_url":"https://api.github.com/users/jamespjh/orgs","repos_url":"https://api.github.com/users/jamespjh/repos","events_url":"https://api.github.com/users/jamespjh/events{/privacy}","received_events_url":"https://api.github.com/users/jamespjh/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-07-10T09:13:19Z","updated_at":"2015-07-10T09:13:39Z","closed_at":null,"body":"**Reported by jamespjh on 24 Nov 2011 11:03 UTC**\nOur current site_t, an integer label for a site, would, in a natural object oriented design, obviously be a site class, with data members for coordinates, distributions, etc.\r\n\r\nEqually obviously, this would be impractically cumbersome for an efficient code.\r\n\r\nHowever, we can make a site which is just as swift to move and copy as an integer, but which has some methods.\r\n\r\nAs an example:\r\n```\r\nclass Site {\r\npublic:\r\n    bool HasBoundary(int direction){\r\n       return latDat->HasBoundary(siteLabel,direction);\r\n    }\r\n    unsigned int operator *(){\r\n       return latDat->GetSiteData(siteLabel);\r\n... other methods delegated to latDat... \r\n    }\r\n    SiteRef(site_t aSite):siteLabel(aSite){};\r\nprivate:\r\n site_t siteLabel;\r\n static LatticeData *latDat;\r\n}\r\n```\r\nUsed as\r\n```\r\nSite mysite(site_label);\r\nunsigned int site_data=*mysite;\r\nbool boundaryLeft=mysite.HasBoundary(left);\r\n\r\n```\r\n\r\nThis would allow us to continue to be just as efficient as current code, while allowing a more natural object oriented style.\r\n\r\nOnce the pattern was established, we could remove the !LatticeData class and just do everything in Site."},"comment":{"url":"https://api.github.com/repos/schmie/hemeMove/issues/comments/120312536","html_url":"https://github.com/schmie/hemeMove/issues/110#issuecomment-120312536","issue_url":"https://api.github.com/repos/schmie/hemeMove/issues/110","id":120312536,"user":{"login":"schmie","id":6473158,"avatar_url":"https://avatars.githubusercontent.com/u/6473158?v=3","gravatar_id":"","url":"https://api.github.com/users/schmie","html_url":"https://github.com/schmie","followers_url":"https://api.github.com/users/schmie/followers","following_url":"https://api.github.com/users/schmie/following{/other_user}","gists_url":"https://api.github.com/users/schmie/gists{/gist_id}","starred_url":"https://api.github.com/users/schmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schmie/subscriptions","organizations_url":"https://api.github.com/users/schmie/orgs","repos_url":"https://api.github.com/users/schmie/repos","events_url":"https://api.github.com/users/schmie/events{/privacy}","received_events_url":"https://api.github.com/users/schmie/received_events","type":"User","site_admin":false},"created_at":"2015-07-10T09:13:39Z","updated_at":"2015-07-10T09:13:39Z","body":"**Comment by jamespjh on 24 Nov 2011 15:18 UTC**\nOk. Good. I wasn't serious about the template, btw. :-)"}}