Commit dac5c130 by Jessica Hawkwell

Starting on libntk

1 parent 8fc1002e
cmake_minimum_required (VERSION 3.10)
project(Nitrogen VERSION 1.0.0.0)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_C_STANDARD 11)
......@@ -8,28 +9,6 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ./build/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ./build/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ./build/lib)
project(nde)
include_directories("/usr/local/include")
add_library(${PROJECT_NAME} SHARED src/libnde/NPosition.cpp)
install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/${PROJECT_NAME})
file(GLOB HEADERS "src/libnde/*.h")
install(FILES ${HEADERS} DESTINATION include/${PROJECT_NAME})
target_include_directories (nde PUBLIC "src/libnde")
project (NitroWin)
find_package(X11)
include_directories("/usr/local/include")
link_libraries(${X11_LIBRARIES})
add_executable(${PROJECT_NAME}
src/NitroWin/NUtils.cpp
src/NitroWin/NWMAction.cpp
src/NitroWin/NWManager.cpp
src/NitroWin/main.cpp)
target_link_libraries(${PROJECT_NAME} LINK_PUBLIC nde)
add_subdirectory(src/libnde)
add_subdirectory(src/libntk)
add_subdirectory(src/NitroWin)
......@@ -17,6 +17,12 @@
<df name="src">
<df name="libnde">
<in>NPosition.cpp</in>
<in>nde.h</in>
</df>
<df name="libntk">
<in>NObject.cpp</in>
<in>NObject.h</in>
<in>ntk.h</in>
</df>
<df name="NitroWin">
<df name="CMakeFiles">
......@@ -37,6 +43,7 @@
<in>NWMAction.h</in>
<in>NWManager.cpp</in>
<in>NWManager.h</in>
<in>NitroWin.h</in>
<in>main.cpp</in>
</df>
</df>
......@@ -130,10 +137,20 @@
</item>
<item path="src/NitroWin/NWManager.h" ex="false" tool="3" flavor2="0">
</item>
<item path="src/NitroWin/NitroWin.h" ex="false" tool="3" flavor2="0">
</item>
<item path="src/NitroWin/main.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="src/libnde/NPosition.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="src/libnde/nde.h" ex="false" tool="3" flavor2="0">
</item>
<item path="src/libntk/NObject.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="src/libntk/NObject.h" ex="false" tool="3" flavor2="0">
</item>
<item path="src/libntk/ntk.h" ex="false" tool="3" flavor2="0">
</item>
</conf>
</confs>
</configurationDescriptor>
cmake_minimum_required (VERSION 3.10)
project (NitroWin)
configure_file(${PROJECT_NAME}.h.in ${PROJECT_NAME}.h)
find_package(X11)
include_directories("/usr/local/include")
......@@ -7,4 +8,4 @@ include_directories("/usr/local/include")
link_libraries(${X11_LIBRARIES})
add_executable(${PROJECT_NAME} NUtils.cpp NWMAction.cpp NWManager.cpp main.cpp)
target_link_libraries(${PROJECT_NAME} LINK_PUBLIC nde)
target_link_libraries(${PROJECT_NAME} LINK_PUBLIC nde ntk)
......@@ -35,6 +35,7 @@
#ifndef NUTILS_H
#define NUTILS_H
#include "NitroWin.h"
#include "NWMAction.h"
#include <X11/Xlib.h>
......
......@@ -176,8 +176,8 @@ void NWMAction::onCreateNotify(XCreateWindowEvent e) {
}
void NWMAction::onDestroyNotify(XDestroyWindowEvent e) {
if (clients->count(e.window)) { NUtils::unFrameWindow(e.window); }
if (clients->count(e.event)) { NUtils::unFrameWindow(e.event); }
//if (clients->count(e.window)) { NUtils::unFrameWindow(e.window); }
//if (clients->count(e.event)) { NUtils::unFrameWindow(e.event); }
}
void NWMAction::onUnmapNotify(XUnmapEvent e) {
......@@ -278,6 +278,7 @@ void NWMAction::onLASTEvent(XAnyEvent e) {
}
void NWMAction::onDefaultEvent(XAnyEvent e) {
if (e.window == *root) { return; } // don't log root window events
std::cout << "Event [" << NUtils::getEventName(e.type) << "] on ";
std::cout << e.window;
if (!frames->count(e.window)) {
......
......@@ -33,7 +33,7 @@
#ifndef NWMACTION_H
#define NWMACTION_H
#include "NitroWin.h"
#include <X11/Xlib.h>
#include <vector>
#include <unordered_map>
......
......@@ -26,6 +26,7 @@
#ifndef NWMANAGER_H
#define NWMANAGER_H
#include "NitroWin.h"
#include <X11/X.h>
#include <X11/Xlib.h>
......
/*
* Copyright (c) 2018, jlhawkwell
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* File: NitroWin.h
* Author: jlhawkwell
*
* Created on March 16, 2018, 12:49 PM
*/
#ifndef NITROWIN_H
#define NITROWIN_H
#define NITROWIN_NAME "NitroWin"
#define NITROWIN_VERSION_MAJOR 1
#define NITROWIN_VERSION_MINOR 0
#define NITROWIN_VERSION_PATCH 0
#define NITROWIN_VERSION_TWEAK 0
#define NITROWIN_VERSION "1.0.0.0"
#endif /* NITROWIN_H */
/*
* Copyright (c) 2018, jlhawkwell
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* File: NitroWin.h
* Author: jlhawkwell
*
* Created on March 16, 2018, 12:49 PM
*/
#ifndef NITROWIN_H
#define NITROWIN_H
#define NITROWIN_NAME "@PROJECT_NAME@"
#define NITROWIN_VERSION_MAJOR @Nitrogen_VERSION_MAJOR@
#define NITROWIN_VERSION_MINOR @Nitrogen_VERSION_MINOR@
#define NITROWIN_VERSION_PATCH @Nitrogen_VERSION_PATCH@
#define NITROWIN_VERSION_TWEAK @Nitrogen_VERSION_TWEAK@
#define NITROWIN_VERSION "@Nitrogen_VERSION_MAJOR@.@Nitrogen_VERSION_MINOR@.@Nitrogen_VERSION_PATCH@.@Nitrogen_VERSION_TWEAK@"
#endif /* NITROWIN_H */
#include "NitroWin.h"
#include <iostream>
#include "NWManager.h"
int main ( int argc, char** argv )
{ NWManager *nwm = new NWManager();
{
std::cout << NITROWIN_NAME << " v" << NITROWIN_VERSION << std::endl;
NWManager *nwm = new NWManager();
nwm->run();
}
cmake_minimum_required (VERSION 3.10)
project (nde)
configure_file(${PROJECT_NAME}.h.in ${PROJECT_NAME}.h)
include_directories("/usr/local/include")
add_library(${PROJECT_NAME} SHARED PUBLIC NPosition.cpp)
add_library(${PROJECT_NAME} SHARED NPosition.cpp)
install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/${PROJECT_NAME})
......
......@@ -24,49 +24,48 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "NPosition.h"
#include <NPosition.h>
#include <string>
template <typename T>
__attribute__ ((__visibility__("default")))
/*template <typename T>
NPosition<T>::NPosition(T x, T y) {
px = x;
py = y;
}
} // */
template <typename T>
__attribute__ ((__visibility__("default")))
/*template <typename T>
NPosition<T>::NPosition(const NPosition<T>& other) {
px = other.px;
py = other.py;
}
} // */
template <typename T>
/*template <typename T>
NPosition<T>& NPosition<T>::operator=(const NPosition<T>&& other) {
px = other.px;
py = other.py;
return *this;
}
} // */
template <typename T>
/*template <typename T>
NPosition<T> NPosition<T>::operator+(const NPosition<T>& other) {
NPosition<T> rt = NPosition<T>(px + other.px, py + other.py);
return rt;
}
} // */
template <typename T>
/*template <typename T>
NPosition<T> NPosition<T>::operator-(const NPosition<T>& other) {
NPosition<T> rt = NPosition<T>(px - other.px, py - other.py);
return rt;
}
} // */
template <typename T>
/*template <typename T>
bool NPosition<T>::operator==(const NPosition<T>& other) const {
if (px != other.getX()) { return false; }
if (py != other.getY()) { return false; }
return true;
}
} // */
template <typename T>
/*template <typename T>
std::string NPosition<T>::toString() {
std::string out = std::string();
out.append("(");
......@@ -75,15 +74,21 @@ std::string NPosition<T>::toString() {
out.append(std::to_string(py));
out.append(")");
return out;
}
} // */
template <typename T>
T NPosition<T>::getX() { return px; }
template <typename T>
T NPosition<T>::getY() { return py; }
/*template <typename T>
T NPosition<T>::getX() { return px; } // */
/*template <typename T>
T NPosition<T>::getY() { return py; } // */
template <typename T>
/*template <typename T>
void NPosition<T>::setZeroIfNegative() {
if (px < 0) { px = 0; }
if (py < 0) { py = 0;}
} // */
void testNPositionInt() {
NPosition<int> rawr = NPosition<int>(1,1);
rawr.getX();
rawr.getY();
}
......@@ -27,44 +27,65 @@
#ifndef NPOSITION_H
#define NPOSITION_H
#include <nde.h>
#include <string>
template <typename T>
class __attribute__ ((__visibility__("default"))) NPosition
class NPosition
{
protected:
T px;
T py;
public:
__attribute__ ((__visibility__("default")))
NPosition<T>(T x, T y);
NPosition<T>(T x, T y) {
px = x;
py = y;
}
__attribute__ ((__visibility__("default")))
NPosition<T>(const NPosition<T>& other);
NPosition<T>(const NPosition<T>& other) {
px = other.px;
py = other.py;
}
__attribute__ ((__visibility__("default")))
NPosition<T>& operator=(const NPosition<T>&& other);
NPosition<T>& operator=(const NPosition<T>&& other) {
px = other.px;
py = other.py;
return *this;
}
__attribute__ ((__visibility__("default")))
NPosition<T> operator+(const NPosition<T>& other);
NPosition<T> operator+(const NPosition<T>& other) {
NPosition<T> rt = NPosition<T>(px + other.px, py + other.py);
return rt;
}
__attribute__ ((__visibility__("default")))
NPosition<T> operator-(const NPosition<T>& other);
NPosition<T> operator-(const NPosition<T>& other) {
NPosition<T> rt = NPosition<T>(px - other.px, py - other.py);
return rt;
}
__attribute__ ((__visibility__("default")))
bool operator==(const NPosition<T>& other) const;
bool operator==(const NPosition<T>& other) const {
if (px != other.getX()) { return false; }
if (py != other.getY()) { return false; }
return true;
}
__attribute__ ((__visibility__("default")))
std::string toString();
std::string toString() {
std::string out = std::string();
out.append("(");
out.append(std::to_string(px));
out.append(", ");
out.append(std::to_string(py));
out.append(")");
return out;
}
__attribute__ ((__visibility__("default")))
T getX();
__attribute__ ((__visibility__("default")))
T getY();
T getX() { return px; }
T getY() { return py; }
__attribute__ ((__visibility__("default")))
void setZeroIfNegative();
void setZeroIfNegative() {
if (px < 0) { px = 0; }
if (py < 0) { py = 0;}
}
};
#endif // NPOSITION_H
......@@ -26,6 +26,7 @@
#ifndef NSIZE_H
#define NSIZE_H
#include <nde.h>
template <class T>
class NSize
......
/*
* Copyright (c) 2018, jlhawkwell
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* File: nde.h
* Author: jlhawkwell
*
* Created on March 16, 2018, 12:49 PM
*/
#ifndef NDE_H
#define NDE_H
#define NDE_NAME "nde"
#define NDE_VERSION_MAJOR 1
#define NDE_VERSION_MINOR 0
#define NDE_VERSION_PATCH 0
#define NDE_VERSION_TWEAK 0
#define NDE_VERSION "1.0.0.0"
#endif /* NDE_H */
/*
* Copyright (c) 2018, jlhawkwell
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* File: nde.h
* Author: jlhawkwell
*
* Created on March 16, 2018, 12:49 PM
*/
#ifndef NDE_H
#define NDE_H
#define NDE_NAME "@PROJECT_NAME@"
#define NDE_VERSION_MAJOR @Nitrogen_VERSION_MAJOR@
#define NDE_VERSION_MINOR @Nitrogen_VERSION_MINOR@
#define NDE_VERSION_PATCH @Nitrogen_VERSION_PATCH@
#define NDE_VERSION_TWEAK @Nitrogen_VERSION_TWEAK@
#define NDE_VERSION "@Nitrogen_VERSION_MAJOR@.@Nitrogen_VERSION_MINOR@.@Nitrogen_VERSION_PATCH@.@Nitrogen_VERSION_TWEAK@"
#endif /* NDE_H */
cmake_minimum_required (VERSION 3.10)
project (ntk)
configure_file(${PROJECT_NAME}.h.in ${PROJECT_NAME}.h)
include_directories("/usr/local/include")
add_library(${PROJECT_NAME} SHARED NObject.cpp)
install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/${PROJECT_NAME})
file(GLOB HEADERS "*.h")
install(FILES ${HEADERS} DESTINATION include/${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} LINK_PUBLIC nde)
target_include_directories (ntk PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
/*
* Copyright (c) 2018, jlhawkwell
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* File: NObject.cpp
* Author: jlhawkwell
*
* Created on March 16, 2018, 11:12 AM
*/
#include <NObject.h>
#include <typeinfo>
using namespace nitrogen;
NObject::NObject() {
}
NObject::NObject(const NObject& orig) {
}
NObject::~NObject() {
}
NObject& NObject::operator()() const {
NObject *tmp = new NObject();
return *tmp;
}
NObject& NObject::operator=(const NObject& right) {
if (this == &right) {
return *this; // Yes, so skip assignment, and just return *this.
}
return *this;
}
bool NObject::operator!=(const NObject& right) const {
bool result = !(*this == right);
return result;
}
bool NObject::operator==(const NObject& right) const {
bool result = false;
return result;
}
std::ostream& operator<<(std::ostream& os, const NObject& obj) {
// Write obj to stream
os << typeid(obj).name();
return os;
}
/*
* Copyright (c) 2018, jlhawkwell
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* File: NObject.h
* Author: jlhawkwell
*
* Created on March 16, 2018, 11:12 AM
*/
#ifndef NOBJECT_H
#define NOBJECT_H
#include <ntk.h>
#include <ostream>
namespace nitrogen {
class NObject {
public:
NObject();
NObject(const NObject& orig);
virtual ~NObject();
virtual NObject& operator()() const;
virtual NObject& operator=(const NObject& right);
virtual bool operator!=(const NObject& right) const;
virtual bool operator==(const NObject& right) const;
friend std::ostream& operator<<(std::ostream& os, const NObject& obj);
private:
};
}
#endif /* NOBJECT_H */
/*
* Copyright (c) 2018, jlhawkwell
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* File: ntk.h
* Author: jlhawkwell
*
* Created on March 16, 2018, 12:49 PM
*/
#ifndef NTK_H
#define NTK_H
#define NTK_NAME "ntk"
#define NTK_VERSION_MAJOR 1
#define NTK_VERSION_MINOR 0
#define NTK_VERSION_PATCH 0
#define NTK_VERSION_TWEAK 0
#define NTK_VERSION "1.0.0.0"
#endif /* NTK_H */
/*
* Copyright (c) 2018, jlhawkwell
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* File: ntk.h
* Author: jlhawkwell
*
* Created on March 16, 2018, 12:49 PM
*/
#ifndef NTK_H
#define NTK_H
#define NTK_NAME "@PROJECT_NAME@"
#define NTK_VERSION_MAJOR @Nitrogen_VERSION_MAJOR@
#define NTK_VERSION_MINOR @Nitrogen_VERSION_MINOR@
#define NTK_VERSION_PATCH @Nitrogen_VERSION_PATCH@
#define NTK_VERSION_TWEAK @Nitrogen_VERSION_TWEAK@
#define NTK_VERSION "@Nitrogen_VERSION_MAJOR@.@Nitrogen_VERSION_MINOR@.@Nitrogen_VERSION_PATCH@.@Nitrogen_VERSION_TWEAK@"
#endif /* NTK_H */
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!